:root {
    /* Brand palette (VISUAL.md) */
    --navy: #0B2341;        /* logo, headings, menu, footer, icons */
    --gold: #D8B06A;        /* CTA, VIP, decorative lines */
    --gold-ink: #8a6a1c;    /* darkened gold for price text (AA on white) */
    --gold-soft: #FFF8EE;   /* gold-tinted surfaces */
    --teal: #49978E;        /* logistics: delivery, tracking, calculator */
    --teal-deep: #2F7F78;   /* hover & active states */

    /* Surfaces */
    --bg: #F7F8F6;          /* main background */
    --bg-warm: #FFF8EE;     /* how-it-works, tariffs, reviews */
    --bg-sea: #E1EFF5;      /* hero, calculator, info blocks */

    /* Text */
    --ink: #101214;         /* main text */
    --muted: #514741;       /* secondary text */
    --text-light: #4F6076;  /* captions, service info, dates */

    /* Lines & semantic */
    --line: #e4e7e3;
    --danger: #c0392b;      /* validation, blocked, negative amounts */
    --success: #2e7d32;
    --ring: rgba(11, 35, 65, .16);

    /* Primary interactive accent maps to the navy brand colour */
    --accent: #0B2341;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    border-bottom: 3px solid var(--gold);
    background: var(--navy);
    color: #eaf0f7;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
}
.brand-mark { width: 32px; height: 32px; display: block; flex: 0 0 auto; }
/* Wordmark mirrors the marketing mock-up: uppercase ANATANI · gold dot · gold SHOP. */
.brand-word { display: inline-flex; align-items: center; gap: .5rem; }
.brand .brand-name { font-size: 1.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: .26em; color: #fff; }
.brand .brand-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--gold); }
.brand .brand-suffix { font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .42em; color: var(--gold); align-self: center; }

.home-link { color: #cdd7e4; text-decoration: none; }
.home-link:hover { color: var(--gold); }

.nav { display: flex; gap: 1.25rem; align-items: center; }
.nav a { color: #cdd7e4; text-decoration: none; }
.nav a:hover { color: var(--gold); }
/* Sign-out sits in the navy header, so it needs light styling rather than the navy link default. */
.site-header .btn-link { color: #cdd7e4; }
.site-header .btn-link:hover { color: var(--gold); }

/* The language switcher anchors the right section (everything except the logo and Home).
   Built as a <details> dropdown so it matches the nav links instead of a native <select>. */
.culture-switch { margin-left: auto; position: relative; }
.lang-toggle {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem;
    color: #cdd7e4; user-select: none;
}
.lang-toggle::-webkit-details-marker { display: none; }
.lang-toggle::marker { content: ""; }
.lang-toggle:hover, .lang-menu[open] .lang-toggle { color: var(--gold); }
.lang-caret { width: 14px; height: 14px; transition: transform .15s ease; }
.lang-menu[open] .lang-caret { transform: rotate(180deg); }
.lang-pop {
    position: absolute; top: calc(100% + .6rem); right: 0; z-index: 40; margin: 0;
    display: flex; flex-direction: column; min-width: 9rem; padding: .3rem;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.lang-option {
    text-align: left; background: none; border: 0; cursor: pointer; font: inherit;
    color: var(--ink); padding: .45rem .6rem; border-radius: 6px;
}
.lang-option:hover { background: var(--bg); color: var(--accent); }
.lang-option.is-current { font-weight: 600; color: var(--accent); }

.content { max-width: 960px; margin: 0 auto; padding: 3rem 2rem; }

.hero { text-align: center; padding: 4rem 2rem; background: var(--bg-sea); border-radius: 20px; margin: 1rem 0; }
.hero-slogan { font-size: 2.75rem; margin: 0 0 .5rem; color: var(--navy); }
.hero-slogan::after { content: ""; display: block; width: 64px; height: 3px; margin: 1rem auto 0; background: var(--gold); border-radius: 2px; }
.hero-tagline { font-size: 1.15rem; color: var(--text-light); }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem;
}

.site-footer {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    color: #aab6c6;
    background: var(--navy);
    border-top: 3px solid var(--gold);
}

/* Forms & tables (Stage 1) */
.form-panel { max-width: 540px; }
.form-panel label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
/* Unified control appearance across the auth, customer, and management areas. */
.acct-main input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
.acct-main select,
.acct-main textarea,
.form-panel input:not([type=checkbox]):not([type=hidden]), .form-panel select, .form-panel textarea,
.country-search {
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px;
    font: inherit; background: #fff; color: var(--ink); box-sizing: border-box;
}
/* Full width inside vertical form layouts only (filter rows keep their natural width). */
.acct-main .topup-form input:not([type=checkbox]):not([type=hidden]):not([type=file]),
.acct-main .topup-form select,
.acct-main .topup-form textarea,
.form-panel input:not([type=checkbox]):not([type=hidden]), .form-panel select, .form-panel textarea,
.country-search {
    width: 100%;
}
.acct-main input:focus, .acct-main select:focus, .acct-main textarea:focus,
.form-panel input:focus, .form-panel select:focus, .form-panel textarea:focus, .country-search:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring);
}
.form-panel label.check { font-weight: 400; display: flex; align-items: center; gap: .5rem; }
.form-panel label.check input { width: auto; }
/* Match label weight in the gap-based account/management forms. */
.topup-form > label { font-weight: 600; margin-top: .25rem; }
.topup-form label.check { font-weight: 400; flex-direction: row; align-items: center; gap: .5rem; }
.topup-form label.check input { width: auto; }

/* Searchable country selector */
.country-select { position: relative; }
.country-list {
    list-style: none; margin: .25rem 0 0; padding: .25rem; position: absolute; z-index: 30; width: 100%;
    max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
    border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .1);
}
.country-list li { padding: .5rem .6rem; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.country-list li:hover { background: var(--bg); }

/* Phone with dial-code prefix */
.phone-field { display: flex; align-items: stretch; }
.phone-field .dial-code {
    display: inline-flex; align-items: center; justify-content: center; min-width: 3.75rem; padding: 0 .6rem;
    border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px;
    background: var(--bg); color: var(--muted); font-weight: 600;
}
.phone-field .dial-code:empty::before { content: "+"; }
/* Specific enough to beat the general `.form-panel input…` radius so the left corners
   stay square and the input visually joins the dial-code prefix. */
.form-panel .phone-field input.phone-local { width: auto; flex: 1; border-radius: 0 6px 6px 0; }
.agreements { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.validation-summary, .field-validation-error, span.text-danger { color: var(--danger); font-size: .9rem; }
.validation-summary ul { margin: 0; padding: 0; list-style: none; text-align: left; }
.field-hint { display: block; color: var(--muted); font-size: .82rem; margin: .25rem 0 0; }
.pw-strength { height: 6px; background: var(--line); border-radius: 3px; margin: .4rem 0 .1rem; overflow: hidden; }
.pw-strength span { display: block; height: 100%; width: 0; background: transparent; transition: width .2s ease, background .2s ease; }
.password-field { position: relative; display: block; }
.password-toggle {
    position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; padding: .25rem; margin: 0; cursor: pointer;
    color: var(--muted); line-height: 0;
}
.password-toggle:hover { color: var(--ink); }
.password-toggle svg { width: 20px; height: 20px; }
.notice { color: var(--success); font-weight: 600; }
.btn-primary { background: var(--gold); color: var(--navy); border: 0; padding: .6rem 1.2rem; border-radius: 6px; cursor: pointer; margin-top: 1rem; font-weight: 600; transition: background .15s ease, color .15s ease; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); padding: .4rem .9rem; border-radius: 6px; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.btn-secondary:hover { border-color: var(--teal-deep); color: var(--teal-deep); }
.btn-link { background: none; border: 0; color: var(--navy); cursor: pointer; padding: 0; font: inherit; }
.btn-link:hover { color: var(--teal-deep); }
/* These button classes are also used on <a> links — render them as buttons, not underlined text. */
a.btn-primary, a.btn-secondary { display: inline-block; text-decoration: none; }
.nav-inline { display: inline; }
.inline-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0; }
.row-actions form { display: inline; }

/* Wide variant for catalog browsing — uses the available width (≈8 cards per row)
   on large screens, staying fluid below. */
.content--wide { max-width: 1400px; }

/* ---------- Account area ---------- */
.content--account { max-width: 1180px; }

.acct-shell { display: grid; grid-template-columns: 248px 1fr; gap: 2rem; align-items: start; }

/* Sidebar */
.acct-sidebar {
    position: sticky; top: 1.5rem;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1rem;
    display: flex; flex-direction: column;
}
.acct-id { display: flex; gap: .75rem; align-items: center; padding: .35rem .4rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
.acct-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.acct-id-text { display: flex; flex-direction: column; min-width: 0; }
.acct-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-level { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; padding: .12rem .5rem; border-radius: 999px; align-self: flex-start; margin-top: .3rem; }
.lvl-new { background: #eceeec; color: var(--text-light); }
.lvl-verified { background: #e7f3e8; color: var(--success); }
.lvl-vip { background: #f7ecd0; color: #8a6a1c; }
.lvl-blocked { background: #fbe3e0; color: var(--danger); }

.acct-nav { display: flex; flex-direction: column; gap: .12rem; }
.acct-link {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: .92rem; position: relative; text-align: left;
}
.acct-link svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-linecap: round; stroke-linejoin: round; }
.acct-link:not(.is-soon):not(.is-active):hover { background: var(--bg); color: var(--ink); }
.acct-link.is-active { background: rgba(11, 35, 65, .06); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.acct-link.is-soon { color: #b8b2a8; cursor: default; }
.acct-soon { margin-left: auto; font-style: normal; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: #b8b2a8; border: 1px solid var(--line); border-radius: 999px; padding: .05rem .42rem; }
.acct-nav-divider { height: 1px; background: var(--line); margin: .6rem .4rem; }
.acct-signout { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.acct-link.as-button { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; }

/* Main column */
.acct-main { min-width: 0; }
.acct-head { margin-bottom: 1.5rem; }
.acct-greeting { color: var(--muted); margin: 0 0 .1rem; font-size: .95rem; }
.acct-head h1 { margin: 0; font-size: 1.9rem; line-height: 1.1; }

.acct-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.acct-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; }
.acct-card--accent { background: linear-gradient(135deg, #ffffff, var(--bg-warm)); border-color: rgba(216, 176, 106, .45); }
.acct-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.acct-card-head h2 { margin: 0; font-size: 1.05rem; }
.acct-card-lead { color: var(--muted); margin: 0 0 1rem; }

.acct-facts { margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.acct-facts > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.acct-facts dt { color: var(--muted); margin: 0; font-size: .9rem; }
.acct-facts dd { margin: 0; font-weight: 500; text-align: right; word-break: break-word; }
.acct-cardlink { display: inline-block; margin-top: 1.2rem; color: var(--accent); text-decoration: none; font-size: .9rem; font-weight: 600; }

.acct-copy { display: flex; gap: .5rem; }
.acct-copy input { flex: 1; min-width: 0; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.btn-copy { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; font: inherit; white-space: nowrap; }
.btn-copy.is-copied { background: var(--success); border-color: var(--success); }

.acct-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.acct-tile { background: #fff; border: 1px dashed var(--line); border-radius: 16px; padding: 1.25rem; display: flex; flex-direction: column; gap: .45rem; }
.acct-tile svg { width: 22px; height: 22px; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); opacity: .65; }
.acct-tile-name { font-weight: 600; }
.acct-tile-soon { font-size: .78rem; color: var(--muted); }

@media (max-width: 860px) {
    .acct-shell { grid-template-columns: 1fr; gap: 1.25rem; }
    .acct-sidebar { position: static; }
    .acct-cards, .acct-tiles { grid-template-columns: 1fr; }
}

/* --- Balance & top-ups (Stage 2) --- */
.bal-amount { font-size: 2rem; font-weight: 700; margin: .25rem 0; color: var(--gold-ink); }
.bal-amount--muted { color: var(--muted); }
.bal-hint { color: var(--muted); font-size: .9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.bal-history { margin-top: 1.5rem; }
.bal-filter { margin: .5rem 0 1rem; align-items: center; }
.bal-empty { color: var(--muted); }
.bal-grid td.num, .bal-grid th.num, .grid td.num, .grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bal-grid .pos, .grid td.num.pos { color: #1e7e34; }
.bal-grid .neg, .grid td.num.neg { color: var(--danger); }
.bal-pager { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.bal-pageinfo { color: var(--muted); }

.topup-form { display: flex; flex-direction: column; gap: .35rem; }
.topup-methods { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 1rem 0; display: grid; gap: .5rem; }
.topup-method { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; }
.topup-method em { color: var(--muted); font-style: normal; font-size: .82rem; }
.topup-bank { list-style: none; padding: 0; display: grid; gap: .3rem; }
.field-errors { color: var(--danger); font-size: .9rem; }

.checkout-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; }
.balance-summary { display: flex; gap: 2rem; margin: 1rem 0; }
.balance-summary div { display: flex; flex-direction: column; }
.balance-summary .muted { color: var(--muted); font-size: .85rem; }
.balance-summary strong { font-size: 1.5rem; color: var(--gold-ink); }
.row-actions { display: flex; gap: .5rem; }
.acct-tile--link { text-decoration: none; color: inherit; cursor: pointer; }
.acct-tile--link:hover { border-color: var(--teal-deep); }

/* --- Manager transactions + manual top-up (Stage 2) --- */
.txn-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin: 1rem 0; }
.txn-filters label { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); gap: .2rem; }
.txn-filters input, .txn-filters select { min-width: 9rem; }
.txn-grid td { vertical-align: top; }
.txn-lines { list-style: none; margin: 0; padding: 0; font-size: .85rem; display: grid; gap: .15rem; }
.txn-lines li { display: flex; gap: .6rem; justify-content: space-between; }
.txn-acct { color: var(--muted); }
.txn-lines .pos { color: #1e7e34; }
.txn-lines .neg { color: var(--danger); }
.form-notice { color: #1e7e34; background: #e9f7ee; border: 1px solid #b6e0c4; border-radius: 6px; padding: .6rem .8rem; }

/* --- Orders (Stage 3) --- */
.acct-head-action { display: inline-block; margin-top: .8rem; text-decoration: none; }
.acct-card + .acct-card, .order-alert + .acct-card { margin-top: 1.25rem; }
.acct-card h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.order-desc { max-width: 22rem; }
/* Manager order "request" card: item identity on the left, plain context on the right, paired
   row-by-row so the two columns stay aligned. */
.order-request-grid { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .9rem; }
.order-request-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.order-request-row > div { word-break: break-word; }
@media (max-width: 720px) { .order-request-row { grid-template-columns: 1fr; gap: .3rem; } }
.order-status { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .18rem .6rem; border-radius: 999px; background: var(--line); color: var(--ink); white-space: nowrap; }
.order-status--new { background: #eef1f5; color: #4a5568; }
.order-status--waitingforcustomerconfirmation { background: #fef3e0; color: #9a6700; }
.order-status--confirmationreceived, .order-status--negotiatingwithseller { background: #e7f1ff; color: #1b5fb0; }
.order-status--waitingforwarehousearrival, .order-status--receivedatwarehouse { background: #eef7ee; color: #2e7d32; }
.order-status--packed, .order-status--shipped { background: #e9f7ee; color: #1e7e34; }
.order-status--cancelled { background: #fbeaea; color: var(--danger); }
.order-price-total { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .3rem; }
.order-price-total dt { font-weight: 700; font-size: 1.05rem; }
.order-price-total dd { font-weight: 700; font-size: 1.05rem; color: var(--gold-ink); }
.order-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.1rem; }
.order-actions form { margin: 0; }
.order-actions .btn-primary, .order-actions .btn-secondary { margin-top: 0; }
.order-alert { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; background: var(--bg-warm); border: 1px solid rgba(216, 176, 106, .55); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.25rem; }
.order-alert p { margin: 0; }
.order-alert .btn-primary { margin-top: 0; text-decoration: none; }
.order-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.order-timeline li { display: flex; gap: 1rem; align-items: baseline; padding-left: 1rem; border-left: 2px solid var(--line); }
.order-timeline-when { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-timeline-what { font-weight: 500; }

/* --- Warehouse & parcels (Stage 5) --- */
.customs-decl { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: .85rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; margin: 0; }
.order-status--created { background: #eef1f5; color: #4a5568; }
.order-status--waitingforpacking, .order-status--waitingforshippingpayment { background: #fef3e0; color: #9a6700; }
.order-status--packed, .order-status--intransit { background: #e7f1ff; color: #1b5fb0; }
.order-status--delivered { background: #e9f7ee; color: #1e7e34; }

/* --- Catalogue config + services (Stage 6) --- */
.row-inactive { opacity: .5; }
.row-actions { display: flex; gap: .4rem; align-items: center; }
.row-actions form { margin: 0; }
/* Config list action cells: keep the <td> a normal table cell (a flex <td> breaks the row),
   and put the flex on an inner wrapper. Compact icon buttons stay on one line, right-aligned. */
.actions-cell { white-space: nowrap; text-align: right; width: 1%; }
.actions-cell .row-actions { justify-content: flex-end; }
.row-actions--icons { flex-wrap: nowrap; margin: 0; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.btn-icon:hover { border-color: var(--teal-deep); color: var(--teal-deep); }
.btn-icon svg { width: 18px; height: 18px; }
a.btn-icon { text-decoration: none; }
.btn-icon--danger:hover { border-color: var(--danger); color: var(--danger); }
.service-buttons { flex-wrap: wrap; }
.service-buttons form { margin: 0; }

/* --- Notifications (Stage 8) --- */
.notif-bell { position: relative; display: inline-flex; align-items: center; color: inherit; }
.notif-badge { position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 .25rem; border-radius: 999px; display: grid; place-items: center; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notif { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.notif--unread { font-weight: 500; }
.notif--unread .notif-body strong::before { content: "● "; color: var(--danger); font-size: .7em; vertical-align: middle; }
.notif-body { display: flex; flex-direction: column; gap: .2rem; }
.notif-when { color: var(--muted); font-size: .8rem; }
.notif-actions { display: flex; gap: .4rem; flex: 0 0 auto; }
.notif-actions form { margin: 0; }

/* --- Rich-text editor (CMS) --- */
.rich-editor { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: .35rem; background: #fff; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.rich-btn { font: inherit; font-size: .8rem; line-height: 1; padding: .35rem .55rem; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; color: var(--ink); }
.rich-btn:hover { border-color: var(--teal-deep); color: var(--teal-deep); }
.rich-btn.rt-b { font-weight: 700; }
.rich-btn.rt-i { font-style: italic; }
.rich-area { min-height: 12rem; padding: .8rem 1rem; outline: none; line-height: 1.6; }
.rich-area:focus { box-shadow: inset 0 0 0 2px var(--ring); }
.rich-area h2, .rich-area h3 { margin: .8rem 0 .4rem; }
.rich-area ul, .rich-area ol { margin: .4rem 0 .4rem 1.4rem; }
.rich-area blockquote { margin: .6rem 0; padding-left: .9rem; border-left: 3px solid var(--line); color: var(--muted); }

/* --- Public content presentation --- */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.content-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.content-cover { width: 100%; height: 160px; object-fit: cover; display: block; }
.content-card-body { padding: .9rem 1rem; }
.content-card-body h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
.content-card-body h2 a { color: var(--ink); text-decoration: none; }
.content-card-body h2 a:hover { color: var(--accent); }
.content-date { display: block; color: var(--muted); font-size: .8rem; margin-bottom: .4rem; }
.content-more { color: var(--accent); text-decoration: none; font-size: .9rem; }
.content-article { max-width: 760px; margin: 0 auto; }
.content-hero { width: 100%; max-height: 380px; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; }
.content-body { line-height: 1.7; }
.content-body h2, .content-body h3, .content-body h4 { margin: 1.4rem 0 .5rem; }
.content-body p { margin: .7rem 0; }
.content-body ul, .content-body ol { margin: .7rem 0 .7rem 1.5rem; }
.content-body blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--gold); color: var(--muted); }
.content-body a { color: var(--teal-deep); }
.footer-nav { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.footer-nav a { color: #aab6c6; text-decoration: none; font-size: .85rem; }
.footer-nav a:hover { color: var(--gold); }
.filter-row { display: flex; gap: .6rem; margin-bottom: .8rem; }

.agreement-link { color: var(--accent); text-decoration: underline; }
.agreement-link:hover { text-decoration: none; }

.agreement-updates { list-style: none; padding: 0; margin: 1rem 0; }
.agreement-updates li { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.agreement-version { color: var(--muted); font-size: .85rem; }

/* --- Address book --- */
.address-list { display: grid; gap: .8rem; margin-bottom: 1.2rem; }
.address-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.address-body p { margin: .3rem 0 0; color: var(--muted); }
.address-default { display: inline-block; margin-left: .5rem; font-size: .75rem; color: #8a6a1c; border: 1px solid var(--gold); border-radius: 4px; padding: 0 .35rem; }
.address-actions { display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; flex: 0 0 auto; }
.address-actions form { margin: 0; }

/* --- Support chat --- */
.chat-list { display: grid; gap: .6rem; margin-top: 1rem; }
.chat-row { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; }
.chat-row:hover { border-color: var(--accent); }
.chat-meta { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .85rem; }
.chat-status { display: inline-block; margin-left: .5rem; font-size: .72rem; padding: .05rem .4rem; border-radius: 4px; border: 1px solid var(--line); }
.chat-status.is-open { color: #1e7e34; border-color: #1e7e34; }
.chat-status.is-closed { color: var(--muted); }
.chat-unread { background: var(--danger); color: #fff; border-radius: 999px; min-width: 1.3rem; text-align: center; padding: .05rem .4rem; font-size: .75rem; }
.chat-thread { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.chat-msg { display: flex; }
.chat-msg.is-mine { justify-content: flex-end; }
.chat-bubble { max-width: 75%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.chat-msg.is-mine .chat-bubble { background: var(--bg-sea); border-color: #bcd9e6; }
.chat-author { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: .2rem; }
.chat-body { margin: 0; white-space: pre-wrap; }
.chat-time { display: block; font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.chat-ref { color: var(--teal-deep); font-weight: 600; text-decoration: underline; }
.chat-ref:hover { color: var(--navy); }
/* Read receipt on the viewer's own messages: muted "Sent" until the other party reads it. */
.chat-receipt { display: block; font-size: .68rem; color: var(--muted); margin-top: .1rem; }
.chat-receipt.is-read { color: var(--gold-ink); font-weight: 600; }
.chat-receipt.is-read::before { content: "✓✓ "; }
.chat-receipt:not(.is-read)::before { content: "✓ "; }
.chat-attachments { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.chat-thumb { max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.chat-file { font-size: .85rem; color: var(--teal-deep); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .5rem; }
.chat-composer textarea { resize: vertical; }
.message-us { margin-top: .6rem; }
.message-us .btn-secondary { margin-top: 0; }

/* --- Top-bar user status --- */
/* The pill lives in the navy header, so it stays translucent with a gold hairline
   rather than a stark white chip. */
.topbar-group { display: inline-flex; align-items: center; gap: .75rem; padding: .25rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(216, 176, 106, .4); color: #eaf0f7; }
.topbar-user { display: inline-flex; flex-direction: column; line-height: 1.15; text-decoration: none; color: inherit; }
.topbar-user:hover .topbar-name { color: var(--gold); }
.topbar-name { font-weight: 600; font-size: .9rem; color: #fff; }
.topbar-balance { font-size: .8rem; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Scoped under .nav so the alert colour out-specifies `.nav a` — otherwise the danger icon
   inherits the light nav-link colour and blends into its own pale background. */
.nav .topbar-alert { display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; padding: .2rem .5rem; border-radius: 999px;
    background: #fbeae8; color: var(--danger); border: 1px solid #f0cfc9; font-size: .85rem; font-weight: 600; }
.nav .topbar-alert.is-parcel { background: #eef4ec; color: #1e7e34; border-color: #cfe3cf; }
.nav .topbar-alert svg { width: 16px; height: 16px; }
/* Keep the alert's own colour on hover — `.nav a:hover` would otherwise turn the icon gold. */
.nav .topbar-alert:hover { filter: brightness(.96); color: var(--danger); }
.nav .topbar-alert.is-parcel:hover { color: #1e7e34; }

/* --- Service requests on entity pages --- */
.service-reqs { list-style: none; margin: 0 0 1rem; padding: 0; }
.service-reqs li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.service-reqs li .num { margin-left: auto; font-variant-numeric: tabular-nums; }
.svc-status { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.svc-status.svc-completed { color: #1e7e34; border-color: #cfe3cf; }
.svc-status.svc-cancelled { color: var(--muted); text-decoration: line-through; }

/* ============================================================
   Landing page (home) — ported from the marketing mock-up
   ============================================================ */
.content--home { max-width: none; padding: 0; }
.home-wrap { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }

/* --- Hero --- */
.home-hero { position: relative; background: var(--bg-sea); padding: 3.5rem 0 9rem; overflow: hidden; }
.home-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.home-hero-content { position: relative; z-index: 1; }
.home-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; margin-bottom: 2rem;
    border-radius: 999px; background: rgba(255, 248, 238, .8); border: 1px solid rgba(216, 176, 106, .35);
    color: #7c5a27; font-size: .9rem; font-weight: 500; }
.home-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.home-hero-title { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; line-height: .95; letter-spacing: -.04em;
    color: var(--navy); margin: 0 0 1.5rem; }
.home-hero-title .accent { color: var(--gold); }
.home-hero-text { font-size: 1.15rem; line-height: 1.7; color: var(--muted); max-width: 34rem; margin: 0 0 2.5rem; }
.home-cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.home-btn { display: inline-flex; align-items: center; justify-content: center; padding: .95rem 2rem; border-radius: 999px;
    font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease; }
.home-btn--primary { background: var(--teal); color: #fff; box-shadow: 0 14px 30px rgba(73, 151, 142, .3); }
.home-btn--primary:hover { background: var(--teal-deep); transform: translateY(-2px); }
.home-btn--ghost { background: rgba(255, 255, 255, .7); border-color: #fff; color: var(--teal); }
.home-btn--ghost:hover { background: #fff; color: var(--teal-deep); }
.home-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 3.5rem; }
.home-stat-value { font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.home-stat-label { color: var(--muted); margin-top: .25rem; }

/* Hero glass card */
.home-hero-visual { position: relative; display: flex; justify-content: center; }
.home-hero-visual::before { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
    background: rgba(134, 187, 184, .3); filter: blur(80px); z-index: 0; }
.home-card { position: relative; z-index: 1; width: 100%; max-width: 32rem; padding: 2.5rem;
    background: rgba(255, 255, 255, .65); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .7); border-radius: 36px; box-shadow: 0 30px 60px rgba(0, 0, 0, .1); }
.home-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.home-card-kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .4em; color: var(--gold-ink); font-weight: 600; margin-bottom: .5rem; }
.home-card-title { font-size: 1.7rem; font-weight: 800; line-height: 1.15; color: var(--navy); margin: 0; }
.home-card-emblem { width: 60px; height: 60px; flex: 0 0 auto; border-radius: 18px; display: grid; place-items: center;
    font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, var(--teal), var(--gold)); box-shadow: 0 10px 24px rgba(73, 151, 142, .4); }
.home-card-items { display: flex; flex-direction: column; gap: 1.1rem; }
.home-card-item { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; border-radius: 22px;
    background: rgba(255, 255, 255, .7); border: 1px solid #fff; }
.home-card-icon { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center;
    font-size: 1.2rem; font-weight: 800; color: var(--teal); background: rgba(73, 151, 142, .1); }
.home-card-item-title { font-weight: 700; color: var(--ink); }
.home-card-item-desc { font-size: .9rem; color: var(--muted); margin-top: .2rem; }
.home-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0, 0, 0, .06); }
.home-card-concept-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .25em; color: var(--muted); margin-bottom: .3rem; }
.home-card-concept { font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.home-card-more { padding: .7rem 1.4rem; border-radius: 999px; background: var(--gold); color: var(--navy);
    font-weight: 700; border: 0; cursor: pointer; text-decoration: none; box-shadow: 0 10px 24px rgba(216, 176, 106, .35);
    transition: background .15s ease, color .15s ease; }
.home-card-more:hover { background: var(--teal-deep); color: #fff; }

/* Wave divider into the features section */
.home-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; z-index: 1; }
.home-wave svg { width: 100%; height: 140px; display: block; }

/* Shared section heads */
.home-section-head { text-align: center; max-width: 48rem; margin: 0 auto 4rem; }
.home-kicker { font-size: .85rem; text-transform: uppercase; letter-spacing: .35em; margin-bottom: 1rem; }
.home-section-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.04em;
    color: var(--navy); margin: 0 0 1.5rem; line-height: 1.12; }
.home-section-lead { font-size: 1.15rem; line-height: 1.7; color: var(--muted); margin: 0; }
.home-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

/* --- Features --- */
.home-features { background: linear-gradient(to bottom, #fcfbfb, var(--bg-warm)); padding: 6rem 0; margin-top: -1px; }
.home-features .home-kicker { color: var(--teal); }
.home-feature { background: #fff; border: 1px solid rgba(0, 0, 0, .05); border-radius: 32px; padding: 2.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03); transition: transform .2s ease, box-shadow .2s ease; }
.home-feature:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0, 0, 0, .08); }
.home-feature-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
    font-size: 1.8rem; background: rgba(73, 151, 142, .1); margin-bottom: 1.75rem; }
.home-feature h3 { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin: 0 0 1rem; }
.home-feature p { color: var(--muted); line-height: 1.7; margin: 0; }

/* --- How it works --- */
.home-steps { background: var(--bg-warm); padding: 6rem 0; }
.home-steps .home-kicker { color: var(--gold-ink); }
.home-step { background: #fff; border: 1px solid rgba(216, 176, 106, .2); border-radius: 32px; padding: 2.5rem; }
.home-step-num { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
    font-size: 1.3rem; font-weight: 800; margin-bottom: 1.75rem; }
.home-step h3 { font-size: 1.7rem; font-weight: 800; color: var(--navy); margin: 0 0 1.25rem; line-height: 1.15; }
.home-step p { color: var(--muted); line-height: 1.7; font-size: 1.05rem; margin: 0; }
.home-step--1 .home-step-num { background: #fff4df; color: #c08a3e; }
.home-step--2 .home-step-num { background: #eaf6f4; color: var(--teal); }
.home-step--3 .home-step-num { background: #eef7f6; color: var(--teal-deep); }

@media (max-width: 900px) {
    .home-hero { padding-bottom: 7rem; }
    .home-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .home-grid3 { grid-template-columns: 1fr; }
}

/* ---------- UpGarage catalog (Stage 12) ---------- */
.upg-searchbar { display: flex; gap: .6rem; margin: 1rem 0 1.5rem; }
.upg-searchbar input { flex: 1; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.upg-searchbar .btn-primary { margin-top: 0; }

.upg-filters { margin: 1rem 0 1.5rem; }
.upg-filter-row { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: end; margin-top: .8rem; }
.upg-filter { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--muted); }
.upg-filter select,
.upg-filter input { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
.upg-filter input { width: 8rem; }
.upg-filter select:focus, .upg-filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.upg-conditions { display: flex; flex-wrap: wrap; gap: .8rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; margin: 0; }
.upg-conditions legend { font-size: .82rem; color: var(--muted); padding: 0 .3rem; }
.upg-conditions .check { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; }

/* Category landing: three root categories per row (responsive), each a card listing its
   top subcategories (the manager-curated highest-weight ones — see MarketplaceCategory.Weight). */
.cat-roots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.upg-catgroup { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 1rem 1.1rem; }
.upg-catgroup h2 { font-size: 1.05rem; margin: 0 0 .6rem; padding-bottom: .5rem; border-bottom: 2px solid var(--gold); }
.upg-catgroup h2 a { color: var(--navy); text-decoration: none; }
.upg-catgroup h2 a:hover { color: var(--teal-deep); }
.upg-catlist { list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .05rem .6rem; }
.upg-catlist a { display: block; padding: .3rem .45rem; border-radius: 6px; color: var(--ink); text-decoration: none;
    font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upg-catlist a:hover { background: var(--bg-sea); color: var(--teal-deep); }
@media (max-width: 860px) { .cat-roots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-roots { grid-template-columns: 1fr; } }

/* Search result cards reuse .content-card */
.upg-card-img { display: block; aspect-ratio: 1 / 1; background: var(--bg); overflow: hidden; }
.upg-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upg-price { font-weight: 800; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.upg-price--lg { font-size: 1.8rem; margin-bottom: 1rem; }
.upg-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.upg-cond { border: 1px solid var(--line); border-radius: 999px; padding: .05rem .5rem; }

/* Dense catalog grid (≈8 across on a wide screen, like the source sites): compact
   vertical cards shared by the UpGarage and Yahoo result/seller pages, so the
   customer sees many items before scrolling. */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-top: 1rem; }
.catalog-grid .content-card-body { padding: .5rem .6rem .6rem; display: flex; flex-direction: column; }
.catalog-grid .upg-card-img { position: relative; }
.catalog-grid .content-card-body h2 { font-size: .82rem; line-height: 1.3; margin: 0 0 .35rem; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catalog-grid .upg-price { font-size: 1.05rem; line-height: 1.2; }
.catalog-grid .upg-meta { font-size: .72rem; margin-top: auto; padding-top: .4rem; }

/* Yahoo auction extras: corner source badge, 現在/即決 price stack, icon meta. */
.yh-source { position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: .25rem;
    background: var(--navy); color: #fff; font-size: .56rem; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase; padding: .15rem .4rem; border-top-right-radius: 8px; }
.yh-source-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.yh-prices { display: flex; flex-direction: column; gap: .05rem; }
.yh-price-buyout { font-weight: 700; font-size: 1.05rem; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Meta at the bottom of the card; icons stand in for the bid/time labels. */
.yh-meta { align-items: center; gap: .7rem; }
.yh-stat { display: inline-flex; align-items: center; gap: .25rem; font-variant-numeric: tabular-nums; }
.yh-stat svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--teal); }
.yh-stat .yh-countdown.is-ended { color: var(--muted); }

.upg-product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.upg-gallery-main { width: 100%; height: 420px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: #fff; }
.upg-gallery-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.upg-gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.upg-thumb { padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 8px; }
.upg-thumb img { transition: border-color .15s, box-shadow .15s; }
.upg-thumb:hover img, .upg-thumb:focus-visible img { border-color: var(--accent); }
.upg-thumb.is-active img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.yh-countdown.is-ended { color: var(--muted); }

/* Manager: marketplace category editor rows (Stage 13). */
.cat-list { display: flex; flex-direction: column; gap: .4rem; }
.cat-row { display: grid; grid-template-columns: minmax(12rem, 1.4fr) 1fr 1fr auto auto; gap: .5rem; align-items: center; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cat-row.is-hidden { opacity: .55; }
.cat-row-src { display: flex; align-items: baseline; gap: .4rem; min-width: 0; }
.cat-row-src > span[lang=ja] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-level { font-size: .7rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 .35rem; }
.cat-path { font-size: .72rem; color: var(--muted); }
.cat-row input[type=text], .cat-row input[type=number], .cat-row input:not([type]) { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; min-width: 0; }
.cat-weight { width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.cat-actions { margin-top: .8rem; }
@media (max-width: 720px) { .cat-row { grid-template-columns: 1fr 1fr; } .cat-row-src { grid-column: 1 / -1; } }
.upg-info .btn-secondary { margin-top: 1rem; text-decoration: none; display: inline-block; }
/* Manual-order form lives on the public layout, so it can't lean on the account-area input styles. */
.upg-order-form { margin-top: 1rem; }
.upg-order-form label { font-weight: 600; font-size: .9rem; margin-top: .25rem; }
.upg-order-form input,
.upg-order-form textarea {
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px;
    font: inherit; background: #fff; color: var(--ink); box-sizing: border-box;
}
.upg-order-form textarea { width: 100%; resize: vertical; }
.upg-order-form input[type=number] { width: 6rem; }
.upg-order-form input:focus,
.upg-order-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.upg-order-form .btn-primary { align-self: flex-start; }
.upg-desc { margin-top: 1.5rem; }
.upg-desc-body { white-space: pre-wrap; line-height: 1.7; }

@media (max-width: 760px) {
    .upg-product { grid-template-columns: 1fr; }
}

/* --- Account security / 2FA --- */
.muted { color: var(--muted); font-size: .9rem; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); padding: .4rem .9rem; border-radius: 6px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.sec-2fa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.sec-2fa-head h2 { margin: 0 0 .25rem; }
.sec-badge { flex: 0 0 auto; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.sec-badge.is-on { background: #e8f3ea; color: var(--success); }
.sec-badge.is-off { background: #f2efe9; color: var(--muted); }
.sec-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }
.sec-actions form { margin: 0; }
.sec-actions .btn-primary, .sec-actions .btn-secondary, .sec-actions .btn-danger { margin-top: 0; }
.sec-warn { color: var(--danger); font-weight: 600; }
.sec-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 1.5rem; }
.sec-steps li { padding-left: .3rem; }
.sec-qr { display: inline-block; background: #fff; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; }
.sec-qr svg { display: block; width: 180px; height: 180px; }
.sec-key { display: inline-block; margin-top: .4rem; padding: .3rem .6rem; background: var(--gold-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 1rem; letter-spacing: .08em; }
.recovery-codes { list-style: none; margin: 1rem 0; padding: 1rem; background: var(--gold-soft); border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; max-width: 28rem; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .06em; }

/* Feedback round 1: type-ahead search results (seller / nomenclature) */
.search-results { list-style: none; margin: .25rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-height: 16rem; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.search-results li { padding: .5rem .75rem; cursor: pointer; border-bottom: 1px solid var(--line); font-size: .95rem; }
.search-results li:last-child { border-bottom: none; }
.search-results li:hover { background: var(--gold-soft); }

/* Feedback round 1: customer-facing warehouse photo gallery */
.warehouse-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; margin-top: .5rem; }
.warehouse-photo { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; }
.warehouse-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 480px) { .warehouse-photos { grid-template-columns: repeat(2, 1fr); } }

/* Feedback round 1: personal-use customs block + tariff/nomenclature option lists */
.customs-block { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: .75rem 0; }
.address-personal-use { margin-top: .4rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tariff-set { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; margin: .5rem 0; }
.tariff-option { display: block; font-weight: normal; }
.company-invoice-inputs { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; margin: .5rem 0; }

/* Notification bell dropdown popup (header) */
.notif-menu { position: relative; display: inline-flex; }
.notif-bell { background: none; border: 0; padding: 0; cursor: pointer; }
.notif-popup { position: absolute; top: calc(100% + .5rem); right: 0; width: min(360px, calc(100vw - 2rem)); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); z-index: 200; overflow: hidden; }
.notif-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.notif-popup-head form { margin: 0; }
/* Override the header's light .btn-link colour inside the white popup. */
.site-header .notif-popup .btn-link { color: var(--accent); }
.site-header .notif-popup .btn-link:hover { color: var(--gold-ink); }
.notif-popup-empty { padding: 1.25rem .9rem; color: var(--muted); margin: 0; }
.notif-popup-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.notif-popup-item > a, .notif-popup-item > div { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif-popup-item > a:hover { background: var(--gold-soft); }
.notif-popup-item .notif-when { color: var(--muted); font-size: .78rem; }
.notif-popup-item--unread > a strong::before,
.notif-popup-item--unread > div strong::before { content: "● "; color: var(--danger); font-size: .7em; vertical-align: middle; }
.notif-popup-foot { display: block; padding: .65rem .9rem; text-align: center; font-size: .9rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif-popup-foot:hover { background: var(--gold-soft); }

/* --- Navigation tab bar (manager user / customer pages) --- */
.tab-bar { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin: 1rem 0 1.25rem; }
.tab-link { padding: .6rem 1.1rem; cursor: pointer; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.tab-link:hover { color: var(--navy); background: var(--gold-soft); }
.tab-link.is-active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.user-status-actions { margin-top: 1.25rem; }

/* Per-tariff parcel automation toggles (customer parcels page) */
.automation-list { list-style: none; margin: .5rem 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.automation-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.automation-toggle { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; }
.automation-toggle input[disabled] { cursor: not-allowed; }
.automation-name code { font-weight: 400; color: var(--muted); }
.automation-policy { font-size: .85rem; color: var(--muted); }
.automation-hint { color: var(--text-light); }
.badge-locked { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 999px; background: var(--line); color: var(--muted); }
