* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f7f9;
    color: #1f2933;
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

.site-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #dde3ea;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 14px 24px;
}

.brand {
    align-items: center;
    color: #111827;
    display: inline-flex;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.brand__logo {
    border-radius: 8px;
    height: 42px;
    object-fit: contain;
    width: 42px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nav a {
    color: #2563eb;
    text-decoration: none;
}

.container {
    margin: 0 auto;
    max-width: 960px;
    padding: 32px 20px;
}

.panel {
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 24px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    font-weight: 700;
    gap: 6px;
}

input,
select,
textarea {
    border: 1px solid #c8d1dc;
    border-radius: 6px;
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.button,
button {
    background: #2563eb;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 16px;
    text-decoration: none;
}

.button.secondary {
    background: #4b5563;
}

.field-error,
.alert.error {
    color: #b91c1c;
}

.alert {
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert.success {
    background: #ecfdf3;
    color: #166534;
}

.alert.error {
    background: #fef2f2;
}

.details {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.details div {
    border-bottom: 1px solid #edf0f4;
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
}

.details dt {
    color: #667085;
    font-size: 14px;
}

.details dd {
    margin: 0;
}

.placeholder {
    background: #f9fafb;
    border: 1px dashed #a7b0bd;
    border-radius: 8px;
    padding: 18px;
}

.muted {
    color: #667085;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.full {
    grid-column: 1 / -1;
}

.button.secondary {
    background: #4b5563;
}

.table-wrap {
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid #edf0f4;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f3f6fa;
}

.status,
.bank-card {
    background: #eef2ff;
    border-radius: 999px;
    color: #3730a3;
    display: inline-block;
    font-size: 13px;
    padding: 4px 10px;
}

.status-stack,
.bank-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bank-list {
    margin: 16px 0;
}

.bank-card {
    border-radius: 8px;
    display: grid;
}

.page-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.sub-panel {
    background: #f9fafb;
    border: 1px solid #edf0f4;
    border-radius: 8px;
    margin: 18px 0;
    padding: 16px;
}

.compact {
    margin: 10px 0;
}

.tracking {
    margin-top: 20px;
}

.timeline {
    display: grid;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.timeline li {
    border-left: 4px solid #c8d1dc;
    padding: 8px 0 8px 12px;
}

.timeline li.is-done {
    border-color: #2563eb;
    color: #1d4ed8;
    font-weight: 700;
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.page-title {
    margin-bottom: 20px;
}

.page-title h1,
.auction-summary h1 {
    margin: 0 0 8px;
}

.page-title p,
.muted {
    color: #667085;
}

.auction-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.auction-card {
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    overflow: hidden;
}

.auction-card img,
.auction-media img {
    background: #eef2f6;
    display: block;
    object-fit: cover;
    width: 100%;
}

.auction-card img {
    aspect-ratio: 4 / 3;
}

.auction-card__body {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.auction-card__body h2 {
    font-size: 18px;
    margin: 0;
}

.auction-card__top {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.auction-detail {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    margin-bottom: 20px;
}

.auction-media img {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
}

.auction-meta {
    display: grid;
    gap: 8px;
    margin: 0;
}

.auction-meta div {
    border-bottom: 1px solid #edf0f4;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 8px;
}

.auction-meta dt {
    color: #667085;
}

.auction-meta dd {
    font-weight: 700;
    margin: 0;
    text-align: right;
}

.badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
}

.status-active,
.status-won {
    background: #dcfce7;
    color: #166534;
}

.status-ended {
    background: #e0e7ff;
    color: #3730a3;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.countdown {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #9a3412;
    font-weight: 700;
    margin: 0;
    padding: 10px 12px;
}

.bid-form,
.callout {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 720px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid #edf0f4;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f9fafb;
}

@media (max-width: 720px) {
    .auction-detail {
        grid-template-columns: 1fr;
    }
}

/* Boutique member and auction polish */
:root {
    --ink: #15171b;
    --muted: #65707a;
    --line: rgba(21, 23, 27, 0.12);
    --panel: rgba(255, 255, 255, 0.88);
    --paper: #fffaf4;
    --teal: #0d7665;
    --teal-dark: #0a4f47;
    --coral: #c84f3b;
    --plum: #5a3d6b;
    --gold: #bd8b2f;
    --shadow: 0 20px 55px rgba(21, 23, 27, 0.13);
}

body {
    background:
        radial-gradient(circle at 8% 0%, rgba(200, 79, 59, 0.12), transparent 28%),
        radial-gradient(circle at 92% 8%, rgba(13, 118, 101, 0.14), transparent 30%),
        linear-gradient(180deg, #fffaf4 0%, #f4efe8 48%, #ffffff 100%);
    color: var(--ink);
    font-family: "Noto Sans Thai", Tahoma, Arial, sans-serif;
}

a {
    color: var(--teal-dark);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 250, 244, 0.9);
    border-bottom-color: rgba(21, 23, 27, 0.1);
    box-shadow: 0 14px 38px rgba(21, 23, 27, 0.06);
    backdrop-filter: blur(18px);
}

.brand {
    color: var(--ink);
    letter-spacing: 0;
}

.nav a {
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    min-height: 38px;
    padding: 7px 10px;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a:hover {
    background: rgba(13, 118, 101, 0.1);
    color: var(--ink);
    transform: translateY(-1px);
}

.container {
    max-width: 1120px;
    padding: 42px 20px 72px;
}

.page-title,
.page-head {
    margin-bottom: 22px;
}

.page-title h1,
.page-head h1,
.auction-summary h1,
.panel h1 {
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.16;
}

.page-title h1,
.page-head h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

.panel,
.sub-panel,
.bid-form,
.callout,
.placeholder,
.table-wrap,
.auction-card {
    background: var(--panel);
    border-color: var(--line);
    box-shadow: 0 14px 38px rgba(21, 23, 27, 0.08);
    backdrop-filter: blur(12px);
}

.panel,
.sub-panel,
.bid-form,
.callout,
.auction-card,
.auction-media img {
    border-radius: 8px;
}

.auction-grid {
    gap: 22px;
}

.auction-card {
    overflow: hidden;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auction-card:hover {
    border-color: rgba(13, 118, 101, 0.28);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.auction-card img,
.auction-media img {
    background:
        linear-gradient(135deg, rgba(13, 118, 101, 0.1), rgba(189, 139, 47, 0.12)),
        #efe8df;
}

.auction-card__body h2 a:hover {
    color: var(--teal-dark);
}

.auction-detail {
    gap: clamp(22px, 4vw, 44px);
}

.auction-summary {
    position: sticky;
    top: 104px;
}

.auction-meta div,
.details div,
td,
th {
    border-color: rgba(21, 23, 27, 0.09);
}

th {
    background: rgba(13, 118, 101, 0.09);
    color: var(--teal-dark);
}

.badge,
.status,
.bank-card {
    border: 1px solid rgba(13, 118, 101, 0.18);
    background: rgba(13, 118, 101, 0.1);
    color: var(--teal-dark);
}

.status-ended {
    background: rgba(90, 61, 107, 0.12);
    color: var(--plum);
}

.status-cancelled {
    background: rgba(200, 79, 59, 0.12);
    color: #963728;
}

.countdown {
    background: rgba(189, 139, 47, 0.12);
    border-color: rgba(189, 139, 47, 0.28);
    color: #805915;
}

input,
select,
textarea {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(21, 23, 27, 0.16);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(13, 118, 101, 0.62);
    box-shadow: 0 0 0 4px rgba(13, 118, 101, 0.12);
    outline: none;
}

.button,
button {
    background: linear-gradient(135deg, var(--ink), var(--teal-dark));
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(13, 118, 101, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover,
button:hover {
    box-shadow: 0 18px 34px rgba(13, 118, 101, 0.24);
    transform: translateY(-1px);
}

.button.secondary,
.btn-secondary {
    background: linear-gradient(135deg, #4b5563, var(--plum));
}

.details {
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(21, 23, 27, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.details div {
    align-items: start;
    grid-template-columns: minmax(130px, 0.36fr) 1fr;
    padding: 14px 16px;
}

.details div:last-child {
    border-bottom: 0;
}

.details dd {
    color: var(--ink);
    font-weight: 700;
}

.bank-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.bank-card {
    border-radius: 8px;
    gap: 4px;
    padding: 14px 16px;
}

.bank-card strong {
    color: var(--ink);
    font-size: 1.02rem;
}

.actions a:not(.button),
td.actions a {
    border: 1px solid rgba(13, 118, 101, 0.2);
    border-radius: 8px;
    color: var(--teal-dark);
    display: inline-flex;
    font-weight: 800;
    min-height: 36px;
    align-items: center;
    padding: 7px 11px;
    transition: background 160ms ease, transform 160ms ease;
}

.actions a:not(.button):hover,
td.actions a:hover {
    background: rgba(13, 118, 101, 0.1);
    transform: translateY(-1px);
}

.timeline {
    counter-reset: steps;
    gap: 0;
    margin: 18px 0;
    overflow: hidden;
    border: 1px solid rgba(21, 23, 27, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
}

.timeline li {
    position: relative;
    border-left: 0;
    border-bottom: 1px solid rgba(21, 23, 27, 0.08);
    color: var(--muted);
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.timeline li:last-child {
    border-bottom: 0;
}

.timeline li::before {
    counter-increment: steps;
    content: counter(steps);
    display: grid;
    flex: 0 0 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: rgba(101, 112, 122, 0.14);
    color: var(--muted);
    font-weight: 900;
}

.timeline li.is-done {
    color: var(--teal-dark);
}

.timeline li.is-done::before {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: #fffaf4;
}

.field-error {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.js-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-countdown].is-ended {
    background: rgba(90, 61, 107, 0.12);
    color: var(--plum);
}

@media (max-width: 720px) {
    .auction-summary {
        position: static;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .details div {
        grid-template-columns: 1fr;
    }
}
