:root {
  --bg: #f2f7f4;
  --surface: #ffffff;
  --text: #1b2d29;
  --muted: #667770;
  --border: #d9e6df;
  --accent: #c74f2f;
  --accent-dark: #9f3d27;
  --forest: #123b36;
  --forest-soft: #e4f0ea;
  --success: #287956;
  --danger: #bd3f3f;
  --brand-blue: #0060ad;
  --brand-blue-dark: #004b89;
  --radius: 8px;
  --shadow-soft: 0 12px 32px rgba(18, 59, 54, .08);
}

* { box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--base-font-size, 16px);
  background: linear-gradient(180deg, #fbfdfb 0, var(--bg) 420px);
  color: var(--text, #1b2d29);
  line-height: 1.45;
}
a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-heading, Georgia, serif); color: var(--brand-blue); }
h1 { font-size: 1.8rem; line-height: 1.15; margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 1.75rem 0 .75rem; }
.muted { color: var(--muted); font-size: .9rem; }

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 20px; padding-bottom: 40px; min-height: 70vh; }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; box-shadow: 0 5px 18px rgba(18, 43, 36, .12); }
.site-topbar { min-height: 76px; background: var(--brand-blue); color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; padding-top: 8px; padding-bottom: 8px; }
.topbar-label { font-size: .72rem; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 16px; padding-top: 4px; padding-bottom: 4px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 62px; color: #005EB8; text-decoration: none; }
.topbar-brand { flex: 0 0 auto; padding: 4px 12px; border-radius: 4px; background: #fff; }
.brand-mark { display: block; width: 54px; height: 54px; flex: 0 0 54px; }
.brand-copy { display: grid; gap: 4px; }
.brand-wordmark { color: #005EB8; font-family: "Trebuchet MS", var(--font-body, system-ui, sans-serif); font-size: 1.65rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.brand-tagline { color: #005EB8; font-size: .62rem; font-weight: 750; line-height: 1; letter-spacing: .7px; }
.site-logo { display: block; width: min(280px, 100%); max-height: 58px; object-fit: contain; object-position: left center; }
.brand:hover { text-decoration: none; }
.search { display: flex; flex: 1; min-width: 260px; gap: 6px; }
.search input, .search select { padding: 10px 12px; border: 1px solid rgba(255,255,255,.7); border-radius: 6px; font-size: .92rem; background: #fff; color: var(--text); }
.search input { flex: 1; min-width: 0; }
.search button { padding: 9px 17px; border: 0; border-radius: 6px; background: var(--brand-blue); color: #fff; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.search button:hover { background: var(--brand-blue-dark); transform: translateY(-1px); }
.country-switcher { margin: 0; }
.topbar-country-switcher { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 0 0 auto; margin-left: auto; }
.topbar-country-switcher .topbar-label { color: #fff; }
.language-switcher { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; margin: 0; }
.language-switcher select { max-width: 112px; min-height: 34px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--text); font: inherit; font-size: .78rem; }
.language-switcher .btn { min-height: 34px; padding: 5px 8px; font-size: .78rem; }
.country-menu { position: relative; }
.country-menu summary { display: flex; align-items: center; gap: 10px; min-height: 36px; color: #fff; font-size: .82rem; font-weight: 800; cursor: pointer; list-style: none; }
.country-menu summary::-webkit-details-marker { display: none; }
.country-menu summary::after { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: rotate(45deg); margin: -4px 2px 0 0; }
.country-menu[open] summary::after { transform: rotate(225deg); margin: 4px 2px 0 0; }
.country-dropdown { position: absolute; top: 100%; right: 0; z-index: 30; display: grid; width: min(240px, calc(100vw - 28px)); padding: 8px 0; background: #222; box-shadow: 0 10px 24px rgba(0,0,0,.24); }
.country-dropdown button { min-height: 40px; padding: 9px 16px; border: 0; background: transparent; color: #fff; font: inherit; font-size: .82rem; font-weight: 800; text-align: left; cursor: pointer; }
.country-dropdown button:hover, .country-dropdown button:focus-visible, .country-dropdown button[aria-current="true"] { background: var(--brand-blue); color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 14px; transform: translateY(calc(-100% - 12px)); border: 2px solid var(--brand-blue); background: #fff; color: var(--brand-blue); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.links { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: .95rem; }
.links > a, .account-menu > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border: 1px solid var(--brand-blue); border-radius: 6px; background: var(--brand-blue); color: #fff; font-weight: 800; box-shadow: 0 3px 12px rgba(0,96,173,.25); transition: transform .15s, box-shadow .15s, background .15s; }
.links > a:hover, .account-menu > summary:hover { background: var(--brand-blue-dark); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 5px 16px rgba(0,96,173,.36); }
.links > a.btn-accent { color: var(--accent-foreground, #fff); }
.account-menu { position: relative; }
.account-menu summary { gap: 8px; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: rotate(45deg); margin-top: -4px; }
.account-menu[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.account-menu-backdrop { display: none; }
.account-dropdown-head { display: none; }
.account-dropdown { position: absolute; top: 100%; right: 0; z-index: 20; display: grid; gap: 2px; width: min(250px, calc(100vw - 32px)); padding: 8px; border: 1px solid #333; border-radius: 0; background: #222; color: #fff; box-shadow: var(--shadow-soft); }
.account-dropdown > a { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 0; color: #fff; }
.account-dropdown > a:hover, .account-dropdown > a:focus-visible { background: var(--brand-blue); color: #fff; text-decoration: none; }
.account-admin-mobile { display: none !important; }
.account-menu-user { display: grid; gap: 2px; padding: 9px 10px 11px; border-bottom: 1px solid #454545; color: #fff; }
.account-menu-user span { color: #c7c7c7; font-size: .82rem; }
.account-dropdown form { margin: 4px 0 0; border-top: 1px solid var(--border); padding-top: 6px; }
.account-logout { width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--danger); text-align: left; font: inherit; cursor: pointer; }
.account-dropdown .account-logout:hover, .account-dropdown .account-logout:focus-visible { background: var(--brand-blue); color: #fff; }
.all-menu { position: static; flex: 0 0 auto; }
.all-menu > summary { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 11px; border: 1px solid var(--brand-blue); border-radius: 6px; background: #fff; color: var(--brand-blue); font-weight: 800; cursor: pointer; list-style: none; }
.all-menu > summary::-webkit-details-marker { display: none; }
.all-menu > summary svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.all-menu > summary:hover, .all-menu[open] > summary { background: var(--brand-blue); color: #fff; }
.all-menu-backdrop { display: none; }
.all-menu[open] .all-menu-backdrop { position: fixed; inset: 0; z-index: 20; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(13,20,29,.72); cursor: default; }
.all-menu-panel { position: fixed; inset: 0 auto 0 0; z-index: 21; display: grid; grid-template-rows: auto minmax(0,1fr); width: min(360px, calc(100vw - 42px)); background: #fff; color: var(--text); box-shadow: 8px 0 28px rgba(0,0,0,.2); }
.all-menu-head { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 10px 16px; background: var(--brand-blue); color: #fff; font-size: 1rem; }
.all-menu-head button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; background: transparent; color: #fff; font-size: 1.4rem; cursor: pointer; }
.all-menu-form { display: grid; align-content: start; gap: 14px; overflow-y: auto; padding: 18px 16px 22px; }
.all-menu-form label { display: grid; gap: 5px; color: var(--text); font-size: .85rem; font-weight: 700; }
.all-menu-form input, .all-menu-form select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #c8d3dd; border-radius: 4px; background: #fff; color: var(--text); font: inherit; }
.all-menu-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 5px; }
.search { flex: 1 1 300px; min-width: 180px; gap: 0; overflow: hidden; border: 1px solid #c8d3dd; border-radius: 6px; background: #fff; }
.search input { min-height: 42px; padding: 9px 12px; border: 0; border-radius: 0; }
.search button { display: grid; width: 48px; min-width: 48px; place-items: center; padding: 8px; border-radius: 0; }
.search button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cart-link { gap: 7px; white-space: nowrap; }
.cart-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
form.inline { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; font: inherit; }
.link-btn:hover { text-decoration: underline; }
select option:hover, select option:checked { background: var(--brand-blue); color: #fff; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; font-size: .92rem; font-weight: 650; font-family: inherit; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { text-decoration: none; background: #f5f8f5; box-shadow: 0 4px 12px rgba(24,59,50,.08); transform: translateY(-1px); }
.btn-accent { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; font-weight: 800; box-shadow: 0 3px 12px rgba(0,96,173,.25); }
.btn-accent:hover { background: var(--brand-blue-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f1b4b4; }
.btn-danger:hover { background: #fdeaea; }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(0,96,173,.42); outline-offset: 2px; }

/* ---------- flash ---------- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; font-size: .95rem; }
.flash-success { background: #ebfbee; border-color: #b2f2bb; color: #2b8a3e; }
.flash-danger { background: #fff5f5; border-color: #ffc9c9; color: #c92a2a; }
.flash-warning { background: #fff9db; border-color: #ffec99; color: #8a6d00; }
.flash-login { background: var(--brand-blue); border-color: var(--brand-blue-dark); color: #fff; }
.flash-info { background: #e7f5ff; border-color: #a5d8ff; color: #1864ab; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head small { font-weight: 400; color: var(--muted); font-size: .9rem; }

/* ---------- ad grid ---------- */
.ad-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-main { display: flex; flex: 1; flex-direction: column; min-width: 0; color: inherit; }
.card-main:hover { color: inherit; text-decoration: none; }
.card-chat-icon { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid #d5e5f2; border-radius: 50%; background: #fff; color: #0060ad; box-shadow: 0 2px 8px rgba(0,45,90,.18); cursor: pointer; }
.card-chat-icon:hover { background: #0060ad; color: #fff; }
.card-chat-icon.is-disabled, .card-chat-icon:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.card-chat-icon:not(:disabled):hover { text-decoration: none; }
.card-chat-icon svg { width: 19px; height: 19px; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: #c5d4ca; text-decoration: none; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e3f0e9, #f8fbf8); display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { font-size: 2.4rem; font-weight: 800; color: #b7bcc7; }
.noimg.big { font-size: 6rem; }
.badge { position: absolute; left: 8px; top: 8px; background: var(--brand-blue); color: #fff; font-size: .7rem; padding: 3px 9px; border-radius: 4px; }
.badge.static { position: static; display: inline-block; margin-bottom: 8px; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.card.has-chat .card-body { padding-right: 48px; }
.price { font-weight: 750; color: var(--brand-blue); font-size: .98rem; }
.price.big { font-size: 1.7rem; margin: 4px 0 12px; }
.card h3 { margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.meta { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1250px) { .ad-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .ad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 13px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-size: .92rem; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .dots { border: 0; background: none; }
.pagination a:hover { text-decoration: none; background: #f0f1f4; }
.empty { text-align: center; padding: 60px 20px; background: rgba(255,255,255,.8); border: 1px dashed #c5d4ca; border-radius: var(--radius); }

/* ---------- forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--brand-blue); border-radius: var(--radius); padding: 30px; max-width: 760px; margin: 0 auto; box-shadow: var(--shadow-soft); }
.form-card.narrow { max-width: 420px; }
.form-card label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.category-attribute-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; margin: 16px 0; padding: 14px; border: 1px solid var(--border); }
.category-attribute-fields legend { padding: 0 7px; font-weight: 750; }
.category-attribute-fields label { margin: 0; }
.category-attribute-fields input, .category-attribute-fields select { display: block; width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font: inherit; }
.category-attribute-fields [hidden] { display: none !important; }
.form-card input[type=text], .form-card input[type=email], .form-card input[type=password], .form-card input[type=number], .form-card select, .form-card textarea, .form-card input[type=file] { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; background: #fff; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus, .search input:focus { outline: 2px solid rgba(0,96,173,.32); border-color: var(--brand-blue); }
.form-card [hidden] { display: none !important; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.listing-plans, .payment-methods { border: 0; padding: 0; margin: 18px 0; }
.listing-plans legend, .payment-methods legend { font-weight: 700; margin-bottom: 8px; }
.form-card label.plan-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 8px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.plan-option input[type=radio], .payment-methods input[type=radio] { width: auto; margin: 0; }
.plan-option span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex: 1; }
.plan-option small { color: var(--muted); font-weight: 400; }
.payment-methods { display: flex; gap: 16px; flex-wrap: wrap; }
.payment-methods label { display: flex; align-items: center; gap: 8px; margin: 0; }
.paynow-instructions { border-left: 3px solid var(--accent); background: #f4f7f4; padding: 12px 16px; margin: 12px 0; }
.paynow-instructions p { margin: 6px 0 0; }
.paypal-checkout { margin: 12px 0; max-width: 420px; }
.tier-settings-form { display: grid; gap: 12px; max-width: 900px; }
.tier-settings-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(130px, 1fr)); gap: 14px; border: 1px solid var(--border); border-radius: 6px; padding: 14px; }
.tier-settings-row legend { padding: 0 6px; font-weight: 700; }
.tier-settings-row label { margin: 0; }
.tier-settings-row input { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
@media (max-width: 600px) { .tier-settings-row { grid-template-columns: 1fr; gap: 8px; } }
.thumb { max-width: 180px; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-soft); }
.detail-img { background: linear-gradient(135deg, #e3f0e9, #f8fbf8); border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.detail-img img { width: 100%; height: auto; display: block; }
.facts { list-style: none; padding: 0; margin: 0 0 6px; font-size: .95rem; }
.facts li { padding: 3px 0; }
.desc { white-space: pre-wrap; margin: 0; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } }

/* ---------- tables / admin ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: .88rem; box-shadow: 0 4px 16px rgba(24,59,50,.04); }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: #edf3ef; font-size: .75rem; text-transform: uppercase; letter-spacing: 0; color: #53675d; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f7faf7; }
.table tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.pill { padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; }
.pill.active { background: #e5f3e9; color: var(--success); }
.pill.hidden { background: #fff3bf; color: #8a6d00; }
.pill.expired, .pill.blocked { background: #ffe3e3; color: #c92a2a; }
@media (max-width: 800px) { .table { display: block; overflow-x: auto; } }
.stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
.stat { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px; box-shadow: 0 4px 16px rgba(24,59,50,.04); }
.stat::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--forest); content: ""; }
.stat b { display: block; color: var(--heading-color, var(--forest)); font-family: var(--font-heading, Georgia, serif); font-size: 2rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.alert { border-color: #ffc9c9; background: #fff5f5; }
.stat.alert b { color: var(--danger); }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.site-footer { border-top: 1px solid var(--border); background: var(--footer-bg, #e6ece7); padding: 20px 0; color: var(--footer-fg, #5b6d63); font-family: var(--footer-font, var(--font-body, system-ui, sans-serif)); font-size: var(--footer-size, 14px); font-weight: var(--footer-weight, 400); text-align: center; }
.legal-links { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; padding: 12px 16px 16px; border-top: 1px solid var(--border); background: #fff; }
.legal-links a { display: inline-block; padding: 4px 6px; color: #0060ad; font-family: "Trebuchet MS", var(--font-body, system-ui, sans-serif); font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.legal-links a:hover { color: #004b88; text-decoration: underline; text-underline-offset: 3px; }
.policy-page { max-width: 920px; margin: 6px auto 32px; padding: 30px clamp(20px, 4vw, 48px); border: 1px solid var(--border); border-top: 4px solid #0060ad; background: #fff; }
.policy-page > h1 { margin: 0 0 10px; color: #123b70; font-size: 2rem; }
.policy-intro { margin: 0 0 26px; color: var(--muted); font-size: 1.05rem; }
.policy-draft { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid #d18b16; background: #fff8e6; color: #60440b; font-size: .84rem; font-weight: 650; }
.policy-section { padding: 18px 0; border-top: 1px solid var(--border); }
.policy-section h2 { margin: 0 0 8px; color: #123b70; font-family: var(--font-body, system-ui, sans-serif); font-size: 1.1rem; font-weight: 750; }
.policy-section p { margin: 0; line-height: 1.75; overflow-wrap: anywhere; }
.policy-market { margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.site-banner { margin: 0 0 16px; padding: 11px 16px; border-radius: 6px; background: var(--banner-bg, var(--forest)); color: var(--banner-fg, #fff); font-weight: 600; }
.storefront { margin: 4px 0 24px; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--border); border-top: 4px solid var(--brand-blue); border-radius: 6px; background: #fff; box-shadow: var(--shadow-soft); }
.storefront h1 { margin-bottom: 8px; overflow-wrap: anywhere; }
.seller-verified { display: inline-flex; margin: 0 0 8px; padding: 5px 10px; border-radius: 4px; background: #e5f3e9; color: #216a45; }
.storefront > p { margin-top: 8px; }
.storefront-description { max-width: 760px; white-space: pre-wrap; }
.product-card > a { display: flex; flex-direction: column; height: 100%; color: inherit; }
.product-card > a:hover { text-decoration: none; }
.product-card .card-img { overflow: hidden; }
.product-card .card-img img { transition: transform .2s ease; }
.product-card:hover .card-img img { transform: scale(1.035); }
.product-stock-badge { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,.94); color: var(--success); font-size: .72rem; font-weight: 750; }
.product-card-meta { display: grid; gap: 3px; color: var(--muted); font-size: .76rem; }
.shop-masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 190px; margin: 4px 0 16px; padding: 28px clamp(18px, 4vw, 52px); background: linear-gradient(105deg, #e4f0ea 0%, #f7f4e8 100%); border-left: 5px solid var(--accent); }
.shop-masthead h1 { max-width: 640px; margin: 0 0 8px; font-size: 2rem; }
.shop-masthead p:not(.country-eyebrow) { max-width: 600px; margin: 0; color: var(--muted); }
.shop-actions { display: flex; gap: 9px; flex-wrap: wrap; flex-shrink: 0; }
.shop-search { display: flex; gap: 8px; max-width: 900px; margin: 0 auto 14px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); }
.shop-search input, .shop-search select { min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.shop-search input { flex: 1; }
.shop-search select { max-width: 240px; }
.shop-categories { display: flex; gap: 8px; overflow-x: auto; padding: 5px 0 12px; border-bottom: 1px solid var(--border); }
.shop-categories a { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font-size: .82rem; }
.shop-categories a:hover { border-color: var(--accent); text-decoration: none; }
.shop-results-head { margin-top: 22px; }
.shop-results-head h2 { margin: 0; }
.shop-signin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.buy-form { display: grid; gap: 10px; max-width: 380px; margin-top: 18px; }
.buy-form label { display: grid; gap: 5px; font-size: .88rem; font-weight: 650; }
.buy-form select, .buy-form input, .variant-fields input { min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.variant-fields { display: grid; gap: 8px; margin: 18px 0; padding: 12px; border: 1px solid var(--border); }
.variant-fields legend { padding: 0 6px; font-weight: 700; }
.variant-fields .row-2 { align-items: end; margin-bottom: 10px; }
.product-detail { margin-bottom: 22px; }
.order-total-summary { display: grid; gap: 7px; max-width: 760px; margin: 0 auto 14px; padding: 16px 20px; border: 1px solid var(--border); background: #fff; }
.order-total-summary > span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.order-total-summary .order-total-grand { padding-top: 8px; border-top: 1px solid var(--border); color: var(--forest); font-weight: 800; }
.variant-management { display: grid; gap: 10px; margin: 22px 0; }
.variant-row { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto auto; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--border); background: #fff; }
.variant-row label { display: grid; gap: 4px; font-size: .82rem; font-weight: 650; }
.variant-row input[type="text"], .variant-row input[type="number"] { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 5px; font: inherit; }
.variant-active { display: flex !important; align-items: center; gap: 6px; white-space: nowrap; }
.product-status-form { display: flex; align-items: center; gap: 12px; margin: 12px 0 24px; }
  .shop-masthead { align-items: start; flex-direction: column; min-height: 0; gap: 16px; padding: 20px 16px; }
  .shop-masthead h1 { font-size: 1.65rem; }
  .shop-search { flex-wrap: wrap; }
  .shop-search input { flex-basis: 100%; }
  .shop-search select { flex: 1; max-width: none; }
.country-eyebrow { margin: 0 0 5px; color: var(--accent-dark); font-size: .72rem; font-weight: 800; }

/* ---------- featured listings ---------- */
.featured-showcase { margin-bottom: 24px; }
.featured-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.featured-head h2 { margin: 0; padding: 6px 10px; border-radius: 4px; background: var(--brand-blue); color: #fff; font-size: 1.05rem; font-weight: 800; }
.featured-controls { display: flex; align-items: center; gap: 8px; }
.featured-controls[hidden] { display: none; }
.featured-position { min-width: 48px; color: var(--muted); font-size: .85rem; text-align: center; }
.featured-control { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--forest); font: inherit; font-size: 1.1rem; cursor: pointer; }
.featured-control:hover { border-color: var(--accent); color: var(--accent-dark); }
.featured-slides { display: block; }
.featured-slide { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.featured-slide[hidden] { display: none; }
.featured-slide .card { width: 100%; }
@media (max-width: 1250px) { .featured-slide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .featured-slide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .featured-slide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .featured-slide .card[hidden] { display: none; } }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- gallery, favorites, inbox, reports ---------- */
.badge.feat { left: auto; right: 8px; background: var(--brand-blue); color: #ffb347; font-weight: 400; }
.badge.static.feat { margin-left: 6px; }
.count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .72rem; text-align: center; }
.gallery { min-width: 0; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb-btn { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #eceef2; cursor: pointer; }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btn.active { border-color: var(--accent); }
.field-title { font-weight: 600; font-size: .9rem; margin: 4px 0 8px; }
.photo-edit { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.form-card label.photo-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; font-weight: 400; font-size: .8rem; }
.photo-opt img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.contact { margin-top: 20px; max-width: none; }
.contact h2 { margin-top: 0; }
.chat-seller-button { display: inline-flex; align-items: center; gap: 8px; }
.chat-seller-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.report { margin-top: 14px; font-size: .9rem; }
.report summary { cursor: pointer; color: var(--muted); }
.report form { margin-top: 10px; max-width: 420px; }
.report label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 10px; }
.report select, .report textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.pill.expired { background: #ffe3e3; color: #c92a2a; }
.admin-tabs { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 100%; margin: 20px 0 16px; padding: 8px; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; background: #edf4f8; scrollbar-width: thin; }
.admin-tab { flex: 0 0 auto; padding: 9px 16px; border: 1px solid transparent; border-radius: 4px; color: #435d70; font-weight: 700; white-space: nowrap; }
.admin-tab:hover { border-color: #c8ddeb; background: #fff; color: var(--brand-blue); text-decoration: none; }
.admin-tab.active { border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; box-shadow: 0 2px 7px rgba(0,96,173,.2); }
.table { border-color: #cad9e2; border-radius: 6px; box-shadow: 0 3px 12px rgba(24,59,50,.05); }
.table th, .table td { padding: 11px 13px; }
.table th { background: #eaf2f7; color: #29485f; }
.table tbody tr:nth-child(even) { background: #f8fbfd; }
.table tbody tr:hover { background: #eef6fb; }
.report-queue { display: grid; gap: 16px; margin: 12px 0 28px; }
.report-card { padding: 18px 20px; border: 1px solid var(--border); border-left: 4px solid #ED1B35; background: #fff; box-shadow: 0 4px 14px rgba(24,59,50,.06); }
.report-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.report-card-head h3 { min-width: 0; margin: 0; font-family: var(--font-body, system-ui, sans-serif); font-size: 1rem; font-weight: 750; overflow-wrap: anywhere; }
.report-card-head time { flex: 0 0 auto; color: var(--muted); font-size: .82rem; }
.report-card-info { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(150px, 1fr) minmax(220px, 2fr); gap: 18px; margin: 14px 0 16px; }
.report-card-info > div { min-width: 0; }
.report-card-info dt { margin-bottom: 4px; color: var(--muted); font-size: .75rem; font-weight: 750; text-transform: uppercase; }
.report-card-info dd { margin: 0; overflow-wrap: anywhere; }
.report-card-actions { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.report-card-actions form { margin: 0; }
.report-empty { margin-top: 12px; }
.user-admin-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 260px; }
.user-role-form { display: inline-flex; align-items: center; gap: 4px; }
.user-role-form select { max-width: 120px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font: inherit; font-size: .82rem; }
.admin-password-reset { margin-bottom: 6px; }
.admin-password-reset summary { color: var(--accent-dark); cursor: pointer; font-size: .82rem; font-weight: 600; }
.admin-password-reset form { display: grid; gap: 6px; min-width: 190px; margin-top: 8px; }
.admin-password-reset label { display: grid; gap: 3px; font-size: .78rem; }
.admin-password-reset input { width: 100%; min-width: 0; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.admin-password-reset input:focus { outline: 2px solid rgba(199,79,47,.32); border-color: var(--accent); }
.site-settings-panel { max-width: 900px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.settings-intro h2 { margin: 0 0 5px; color: var(--heading-color, var(--forest)); }
.settings-intro p { margin: 0 0 20px; }
.site-settings-form { display: grid; gap: 16px; }
.site-settings-form > label { display: grid; gap: 6px; font-weight: 650; }
.site-settings-form input[type=text], .site-settings-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.site-settings-form textarea { resize: vertical; }
.site-settings-form input[type=file] { max-width: 100%; font: inherit; }
.site-settings-form small { font-weight: 400; }
.settings-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 6px; background: #f7faf7; }
.settings-colors label { display: grid; gap: 7px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.settings-colors input[type=color] { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--border); border-radius: 5px; background: #fff; cursor: pointer; }
.typography-settings { display: grid; gap: 10px; }
.typography-settings h3 { margin: 0; color: var(--heading-color, var(--forest)); font-family: var(--font-heading, Georgia, serif); font-size: 1.1rem; }
.typography-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.typography-options label { display: grid; gap: 6px; color: var(--muted); font-size: .84rem; font-weight: 650; }
.typography-options select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.appearance-previews { display: grid; gap: 9px; }
.header-preview, .banner-preview, .footer-preview { min-height: 46px; display: flex; align-items: center; padding: 10px 15px; border: 1px solid rgba(25,40,35,.12); border-radius: 6px; font-weight: 650; }
.header-preview { background: var(--preview-bg); color: var(--preview-fg); }
.banner-preview { background: var(--preview-bg); color: var(--preview-fg); }
.market-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 10px 15px; border: 1px solid rgba(25,40,35,.12); border-radius: 6px; background: var(--preview-bg); color: var(--preview-fg); }
.market-preview strong { font-weight: 800; }
.market-preview span { font-size: .86rem; }
.footer-preview { background: var(--preview-bg); color: var(--preview-fg); font-family: var(--preview-font, inherit); font-size: var(--preview-size, 14px); font-weight: var(--preview-weight, 400); }
.typography-preview { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--preview-text); font-family: var(--preview-body-font, var(--font-body)); font-size: var(--preview-body-size, 16px); }
.typography-preview strong { color: var(--preview-heading); font-family: var(--preview-heading-font, var(--font-heading)); font-size: 1.15em; }
.typography-preview p { margin: 0; color: var(--preview-text); font-family: var(--preview-body-font, var(--font-body)); font-size: var(--preview-body-size, 16px); }
.settings-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; font-size: .9rem; }
.settings-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.email-notification-settings { display: grid; gap: 10px; min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 6px; }
.email-notification-settings legend { padding: 0 6px; font-weight: 700; }
.email-notification-settings > p { margin: 0; }
.email-notification-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; }
.current-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: #f7faf7; color: var(--muted); font-size: .85rem; }
.current-logo img { max-width: 180px; max-height: 70px; object-fit: contain; }
.human-check { display: flex !important; align-items: center; gap: 10px; margin: 5px 0 12px !important; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: #f7faf7; cursor: pointer; }
.human-check input { width: 19px; height: 19px; margin: 0; accent-color: var(--forest); }
.challenge-question { display: grid; gap: 6px; }
.challenge-question input { max-width: 150px; }
.bot-trap { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.inbox { display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.msg.unread { border-left: 4px solid var(--accent); }
.conversation-thread { max-width: 900px; margin: 12px 0 20px; }
.conversation-own { margin-left: auto; max-width: 85%; border-left: 4px solid var(--forest); background: #eef6f1; }
/* ---------- modern bot chat window ---------- */
@keyframes botPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes botSlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0060ad 0%, #004b88 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(0, 75, 136, 0.38), 0 2px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s ease;
}

.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 75, 136, 0.46), 0 3px 8px rgba(0, 0, 0, 0.14);
}

.chat-launcher:active {
  transform: translateY(0);
}

.chat-launcher-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.chat-unread-total {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

.chat-panel {
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr);
  width: 380px;
  max-width: calc(100vw - 28px);
  height: 520px;
  max-height: calc(100vh - 96px);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 96, 173, 0.16);
  overflow: hidden;
  background: #fff;
  animation: botSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-panel[hidden] {
  display: none;
}

.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  background: linear-gradient(135deg, #0060ad 0%, #004b88 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-head-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.chat-bot-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #004b88;
  animation: botPulse 2.2s infinite;
}

.chat-head-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.chat-head-titles strong {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-head-subtitle {
  font-size: .72rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chat-head-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.chat-head-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.7);
}

.chat-layout {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.chat-thread-list {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #f8fafc;
}

.chat-layout.has-active .chat-thread-list {
  display: none;
}

.chat-current {
  flex: 1 1 100%;
  display: none;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.chat-layout.has-active .chat-current {
  display: flex;
}

/* Smart Bot Greeting Banner */
.chat-bot-banner {
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.chat-bot-greet {
  margin: 0 0 10px;
  font-size: .84rem;
  color: #1e293b;
  line-height: 1.4;
}

.chat-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #fff;
  color: #0369a1;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 96, 173, 0.08);
  transition: all .15s ease;
}

.chat-quick-action:hover {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.chat-qa-icon {
  font-size: .92rem;
  line-height: 1;
}

/* Threads list header */
.chat-threads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  color: #64748b;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.chat-new-chip {
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0060ad;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.chat-new-chip:hover {
  background: #e0f2fe;
  border-color: #0060ad;
}

.chat-threads-container {
  display: flex;
  flex-direction: column;
}

/* Thread card */
.chat-thread {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .15s;
}

.chat-thread:hover,
.chat-thread.is-active {
  background: #eff6ff;
}

.chat-thread-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0060ad 0%, #0284c7 100%);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 96, 173, 0.2);
}

.chat-thread-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.chat-thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.chat-thread strong {
  color: #0f172a;
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread > span,
.chat-thread-body > span {
  color: #0060ad;
  font-size: .73rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread small {
  color: #64748b;
  font-size: .74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread i {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Empty placeholder */
.chat-empty {
  margin: auto;
  padding: 30px 18px;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.5;
  text-align: center;
}

/* Ad & User Picker */
.chat-listing-picker {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.chat-picker-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 3;
}

.chat-picker-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
}

.chat-picker-modes button {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.chat-picker-modes button[aria-pressed="true"] {
  background: #0060ad;
  border-color: #0060ad;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 96, 173, 0.2);
}

.chat-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.chat-search-icon {
  position: absolute;
  left: 20px;
  color: #94a3b8;
  pointer-events: none;
}

.chat-search-wrap input {
  width: 100%;
  padding: 7px 12px 7px 30px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: .82rem;
  outline: none;
  transition: border-color .15s, background .15s;
}

.chat-search-wrap input:focus {
  border-color: #0060ad;
  background: #fff;
}

.chat-picker-results {
  flex: 1;
  overflow-y: auto;
}

/* Active Conversation View */
.chat-active-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.chat-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  color: #0060ad;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}

.chat-back-btn:hover {
  background: #e0f2fe;
  border-color: #0060ad;
}

.chat-active-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.chat-active-name {
  font-weight: 700;
  font-size: .88rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-active-sub {
  font-size: .72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Messages stream */
.chat-messages {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}

.chat-bot-intro-bubble {
  align-self: center;
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0f7ff;
  border: 1px dashed #7dd3fc;
  color: #0369a1;
  font-size: .76rem;
  line-height: 1.45;
  text-align: center;
}

.chat-bubble {
  align-self: flex-start;
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow-wrap: anywhere;
}

.chat-bubble.is-mine {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, #0060ad 0%, #0284c7 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 96, 173, 0.24);
}

.chat-bubble strong {
  display: block;
  margin-bottom: 2px;
  font-size: .7rem;
  color: #0060ad;
  font-weight: 700;
}

.chat-bubble.is-mine strong {
  color: rgba(255, 255, 255, 0.88);
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  font-size: .86rem;
  line-height: 1.45;
}

.chat-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
}

.chat-bubble time {
  color: #94a3b8;
  font-size: .64rem;
}

.chat-bubble.is-mine time {
  color: rgba(255, 255, 255, 0.75);
}

.chat-read-ticks {
  font-size: .64rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1;
}

/* Smart Quick Reply Chips (Easily operate it) */
.chat-quick-replies {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chat-quick-replies::-webkit-scrollbar {
  display: none;
}

.chat-reply-pill {
  flex-shrink: 0;
  padding: 5px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-size: .74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}

.chat-reply-pill:hover {
  background: #0060ad;
  border-color: #0060ad;
  color: #fff;
  transform: translateY(-1px);
}

/* Modern Composer */
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.chat-compose[hidden] {
  display: none;
}

.chat-compose textarea {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  max-height: 80px;
  resize: none;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  font: inherit;
  font-size: .85rem;
  line-height: 1.35;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.chat-compose textarea:focus {
  border-color: #0060ad;
  box-shadow: 0 0 0 3px rgba(0, 96, 173, 0.15);
}

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0060ad 0%, #004b88 100%);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 75, 136, 0.3);
  transition: transform .15s, box-shadow .15s;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 75, 136, 0.4);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.offer-list { display: grid; gap: 10px; }
.offer-entry { padding: 15px; border: 1px solid var(--border); background: var(--surface); }
.offer-entry > header, .offer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.offer-entry > p { margin: 8px 0; }
.offer-actions form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.offer-actions input { width: 150px; min-width: 0; padding: 7px 9px; border: 1px solid var(--border); border-radius: 5px; font: inherit; }
.msg header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.msg footer { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } .ticker-viewport { overflow-x: auto; } }



/* ---------- field error validation styling ---------- */
.auth-field-row.has-error .auth-input-container input,
.auth-input-container.has-error input {
  border-color: #ef4444 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.15) !important;
}

.auth-field-row.has-error .auth-input-icon {
  color: #ef4444;
}

.auth-field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: #dc2626;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  animation: fadeInError .2s ease-in-out;
}

@keyframes fadeInError {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-security-box.has-error-check {
  border-color: #fca5a5;
  background-color: #fef2f2;
}

.auth-security-box.has-error-check .human-check-text {
  color: #dc2626;
}

.auth-challenge-wrap.has-error input {
  border-color: #ef4444 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}


/* ---------- account exists action card & professional alignment ---------- */
.auth-exists-card {
  margin-top: 9px;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
  animation: fadeInError .22s ease-in-out;
}

.auth-exists-header {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c2410c;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.35;
}

.auth-exists-icon {
  font-size: .95rem;
  flex-shrink: 0;
}

.auth-exists-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-exists-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  background: #0060ad;
  color: #ffffff !important;
  font-size: .8rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 96, 173, 0.28);
  transition: all .15s ease;
}

.btn-exists-login:hover {
  background: #004b88;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 75, 136, 0.35);
}

.btn-exists-reset {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: #ffffff;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none !important;
  transition: all .15s ease;
}

.btn-exists-reset:hover {
  border-color: #0060ad;
  color: #0060ad !important;
  background: #f0f7ff;
}

/* ---------- email domain typo suggestion chip ---------- */
.auth-suggestion-card {
  margin-top: 9px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  animation: fadeInError .22s ease-in-out;
}

.auth-suggestion-info {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #166534;
  font-size: .83rem;
  line-height: 1.35;
}

.auth-suggestion-icon {
  font-size: .95rem;
  flex-shrink: 0;
}

.auth-suggestion-text {
  font-weight: 500;
}

.auth-suggestion-text strong {
  color: #14532d;
  font-weight: 700;
  text-decoration: underline;
  word-break: break-all;
}

.btn-suggestion-apply {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: #16a34a;
  color: #ffffff !important;
  font-size: .78rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.28);
  transition: all .15s ease;
  white-space: nowrap;
}

.btn-suggestion-apply:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.35);
}

/* Professional auth footer links */
.auth-footer-links {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .86rem;
}

.auth-footer-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-footer-action {
  color: #0060ad;
  text-decoration: none;
  font-weight: 700;
}

.auth-footer-action:hover {
  text-decoration: underline;
}

.auth-footer-separator {
  color: #94a3b8;
  font-size: .85rem;
  user-select: none;
}

.auth-footer-secondary {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}

.auth-footer-secondary:hover {
  color: #0060ad;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-footer-links {
    flex-direction: column;
    gap: 8px;
  }
  .auth-footer-separator {
    display: none;
  }
  .auth-exists-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-exists-login, .btn-exists-reset {
    justify-content: center;
  }
}
/* ---------- modern auth card & encrypted forms ---------- */
.auth-card-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 28px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--brand-blue, #0060ad);
  border-radius: 18px;
  padding: 32px 30px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f0f7ff;
  color: var(--brand-blue, #0060ad);
  border: 1.5px solid #bae6fd;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 96, 173, 0.12);
}

.auth-header h1 {
  margin: 0 0 6px;
  color: var(--brand-blue, #0060ad);
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -.01em;
}

.auth-subtitle {
  margin: 0;
  color: #64748b;
  font-size: .86rem;
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-field-row {
  margin-bottom: 18px;
}

.auth-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.auth-field-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: .86rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
}

.auth-label-required {
  color: #ef4444;
  font-weight: 700;
}

.auth-watermark-pill {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8.5px;
  border-radius: 999px;
  background: #f0f9ff;
  border: 1px solid #7dd3fc;
  color: #0284c7;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.08);
}

.auth-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7.5px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: .71rem;
  font-weight: 600;
  white-space: nowrap;
}

.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 13px;
  color: #94a3b8;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-input-container input {
  width: 100%;
  padding: 11px 14px 11px 38px !important;
  margin-top: 0 !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font: inherit !important;
  font-size: .88rem !important;
  line-height: 1.4 !important;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.auth-input-container input::placeholder {
  color: #94a3b8;
  font-size: .82rem;
  opacity: 0.9;
}

.auth-input-container input:focus {
  border-color: #0060ad !important;
  background: #fff !important;
  box-shadow: 0 0 0 3.5px rgba(0, 96, 173, 0.14) !important;
}

.auth-field-helper {
  display: block;
  margin-top: 5px;
  font-size: .73rem;
  color: #64748b;
  line-height: 1.35;
}

.auth-security-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: grid;
  gap: 10px;
}

.auth-security-box .human-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 600;
  color: #1e293b;
}

.auth-security-box .human-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #0060ad;
}

.security-badge-icon {
  margin-left: auto;
  font-size: .95rem;
}

.auth-challenge-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.auth-challenge-wrap .challenge-label {
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.auth-challenge-wrap input {
  width: 76px !important;
  padding: 6px 10px !important;
  margin-top: 0 !important;
  text-align: center;
  font-weight: 700;
  font-size: .92rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
}

.btn-auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  font-size: .95rem;
  font-weight: 700;
  border-radius: 11px;
  background: linear-gradient(135deg, #0060ad 0%, #004b88 100%);
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 75, 136, 0.28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 75, 136, 0.38);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.auth-footer-links {
  margin-top: 20px;
  text-align: center;
}

.auth-footer-links p {
  margin: 6px 0;
  font-size: .85rem;
}

.auth-footer-links a {
  color: #0060ad;
  text-decoration: none;
}

.auth-footer-links a:hover {
  text-decoration: underline;
}

.auth-forgot {
  font-size: .82rem !important;
}

.auth-security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  color: #16a34a;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 600px) {
  .auth-card {
    padding: 24px 18px;
    border-radius: 14px;
  }
  .auth-watermark-pill {
    font-size: .67rem;
    padding: 2px 7px;
  }
}

/* ---------- finishing and responsive refinements ---------- */
.page-head { padding: 4px 0 12px; border-bottom: 1px solid var(--border); }
.page-head h1 { color: var(--brand-blue); }
.form-card h1 { margin-bottom: 22px; color: var(--brand-blue); }
.form-card.narrow { max-width: 470px; }
.form-card.narrow form > label { margin-bottom: 17px; }
.form-card.narrow > p { margin: 18px 0 0; }
.account-menu summary { color: #fff; }
.account-menu summary:hover { color: #fff; }
.account-menu summary::after { border-color: currentColor; }
.site-header .btn-accent { box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.featured-showcase { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(115deg, #e7f2ed, #fff9e6); }
.featured-head h2 { color: #fff; }
.featured-slide .card { border-color: rgba(24,59,50,.12); }
.stat.alert::before { background: var(--danger); }
.stat.alert b { color: var(--danger); }
.user-admin-actions { min-width: 230px; }

@media (max-width: 900px) {
  .nav { gap: 12px; }
  .links { gap: 11px; }
  .ad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-card-info { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .report-card-details { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .container { padding-right: 14px; padding-left: 14px; }
  .chat-widget { right: 12px; bottom: 12px; left: 12px; }
  .chat-panel { width: 100%; height: min(68vh, 520px); }
  /* .chat-layout master-detail */
  .chat-thread { padding: 10px 8px; }
  .chat-panel-actions { gap: 8px; }
  .chat-panel-actions button { padding: 5px 6px; font-size: .7rem; }
  .chat-thread i { top: 8px; right: 6px; }
  .chat-thread strong { padding-right: 15px; font-size: .78rem; }
  .chat-thread > span, .chat-thread small { font-size: .68rem; }
  .chat-messages { padding: 10px 8px; }
  .chat-bubble { max-width: 94%; }
  .chat-launcher { min-height: 44px; }
  .policy-page { margin: 0 auto 22px; padding: 21px 16px; }
  .policy-page > h1 { font-size: 1.65rem; }
  .policy-intro { margin-bottom: 18px; }
  .policy-section { padding: 15px 0; }
  main.container { padding-top: 17px; }
  .topbar-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; justify-content: stretch; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .topbar-brand { grid-column: 1; grid-row: 1; justify-self: start; width: fit-content; min-height: 44px; padding: 3px 8px; }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .brand-wordmark { font-size: 1.35rem; }
  .brand-tagline { font-size: .54rem; letter-spacing: .45px; }
  .topbar-country-switcher { grid-column: 2; grid-row: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; margin-left: 0; }
  .topbar-country-switcher .topbar-label { font-size: .58rem; line-height: 1.1; }
  .country-menu summary { min-height: 28px; }
  .nav { display: flex; flex-wrap: nowrap; gap: 3px; padding-top: 6px; padding-bottom: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .all-menu > summary { min-height: 40px; gap: 5px; padding-right: 6px; padding-left: 6px; }
  .all-menu > summary svg { width: 16px; height: 16px; }
  .language-switcher { gap: 3px; }
  .language-switcher select { max-width: 90px; padding: 4px; font-size: .72rem; }
  .language-switcher .btn { padding: 4px; font-size: .7rem; }
  .links { flex: 0 0 auto; width: max-content; margin-left: 0; justify-content: flex-start; gap: 3px; flex-wrap: nowrap; font-size: .76rem; }
  .links > .btn { padding: 5px; font-size: .76rem; }
  .links > a, .account-menu > summary { min-height: 34px; padding: 5px; }
  .cart-link { gap: 5px; }
  .cart-link svg { width: 18px; height: 18px; }
  /* Mobile Account Menu Drawer / Bottom Sheet */
  .account-menu[open] .account-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: block;
    width: 100vw;
    height: 100vh;
    padding: 0;
    border: 0;
    background: rgba(13, 20, 29, 0.72);
    cursor: default;
  }
  .account-menu[open] .account-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: grid;
    gap: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 82vh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px)) 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: #1c222b;
    color: #fff;
    box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.6);
    animation: accountSheetSlideUp .22s ease-out;
  }
  .account-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--brand-blue);
    border-radius: 18px 18px 0 0;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .account-dropdown-head strong {
    font-size: 1rem;
    font-weight: 800;
  }
  .account-dropdown-head button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
  }
  .account-menu-user {
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .account-menu-user strong {
    font-size: 1.02rem;
    color: #ffeb3b;
  }
  .account-menu-user span {
    font-size: .8rem;
    color: #a0aec0;
  }
  .account-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
  }
  .account-dropdown > a:hover,
  .account-dropdown > a:active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
  .account-dropdown form {
    margin: 10px 14px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
  }
  .account-dropdown .account-logout {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(237, 27, 53, 0.4);
    border-radius: 6px;
    background: rgba(237, 27, 53, 0.12);
    color: #ff6b7d;
    font-weight: 700;
    text-align: center;
    font-size: .92rem;
  }
  .account-dropdown .account-logout:hover,
  .account-dropdown .account-logout:active {
    background: #ed1b35;
    color: #fff;
  }
  @keyframes accountSheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }
  .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 9px 10px 11px; }
  .featured-showcase { padding: 12px; margin-bottom: 18px; }
  .featured-slide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-card { padding: 21px 18px; }
  .category-attribute-fields { grid-template-columns: 1fr; }
  .site-settings-panel { padding: 17px 14px; }
  .settings-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .typography-options { grid-template-columns: 1fr; }
  .site-logo { width: min(240px, 100%); max-height: 50px; }
  .storefront { padding: 17px 14px; }
  .variant-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-status-form { align-items: start; flex-direction: column; }
  .links > a[href*="r=admin"] { display: none; }
  .account-dropdown .account-admin-mobile { display: flex !important; }
  .detail { padding: 17px; gap: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 13px 12px; }
  .stat b { font-size: 1.65rem; }
  .report-card { padding: 15px 14px; }
  .report-card-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .report-card-info { grid-template-columns: 1fr; gap: 12px; }
  .report-card-details { grid-column: auto; }
  .report-card-actions { flex-wrap: wrap; }
  .table { font-size: .82rem; }
}

@media (max-width: 380px) {
  .topbar-brand { gap: 6px; padding-right: 6px; padding-left: 6px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-wordmark { font-size: 1.08rem; }
  .brand-tagline { font-size: .48rem; }
  .nav { gap: 2px; }
  .all-menu > summary { gap: 3px; padding-right: 4px; padding-left: 4px; font-size: .7rem; }
  .all-menu > summary svg { width: 14px; height: 14px; }
  .links { gap: 1px; font-size: .68rem; }
  .links > .btn, .links > a, .account-menu > summary { padding: 3px; font-size: .68rem; }
  .cart-link { gap: 3px; }
  .cart-link svg { width: 16px; height: 16px; }
}


/* ---------- continuous running blue news promotion banner ---------- */
.topbar-ticker-bar {
  background: #004b93;
  background: linear-gradient(90deg, #004282 0%, #005eb8 50%, #004282 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  color: #ffffff;
  padding: 5px 0;
  font-size: .82rem;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ticker-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ed1b35;
  color: #ffffff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(237, 27, 53, 0.4);
}

.ticker-badge-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: tickerPulse 1.4s infinite ease-in-out;
}

@keyframes tickerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

.ticker-track-wrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-slider {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  min-height: 22px;
}

.ticker-slide {
  display: none;
  align-items: center;
  gap: 7px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}

.ticker-slide.active {
  display: inline-flex;
  opacity: 1;
  transform: translateY(0);
}

.ticker-icon {
  font-size: .95rem;
  flex-shrink: 0;
}

.ticker-highlight {
  font-weight: 800;
  color: #ffeb3b;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ticker-detail {
  font-weight: 500;
  color: #ffffff;
  opacity: 0.95;
}

.ticker-terms-wrap {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 8px;
}

.ticker-terms-link {
  font-size: .68rem;
  color: rgba(255, 255, 255, 0.82) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color .15s ease;
  white-space: nowrap;
}

.ticker-terms-link:hover {
  color: #ffffff !important;
}

@media (max-width: 640px) {
  .ticker-badge-text { font-size: .62rem; }
  .ticker-bar-inner { gap: 8px; }
  .ticker-detail { display: none; }
  .ticker-highlight { font-size: .75rem; }
  .ticker-terms-link { font-size: .62rem; }
}
