/* ==========================================================================
   XE'LHA B2B app area: account, shop, admin, landing pages.
   Loaded after style.css on those pages only.
   ========================================================================== */
.site-header__account { border-color: var(--divider); }

.auth { max-width: 460px; margin: 40px auto 64px; }
.auth--wide { max-width: 760px; }
.auth .card { padding: 32px; background: #fff; }
.auth h1 { margin-bottom: 6px; }
.auth .lead { color: var(--muted); margin-bottom: 20px; }
.auth .form__foot a { text-decoration: underline; }
.form__msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; background: #FDECEC; color: #8A1C1C; }
.form__msg[data-kind="success"] { background: #E6F6EC; color: #14532D; }
.form__msg[data-kind="info"] { background: var(--brand-tint); color: #0B4A80; }
.field .hint { font-size: var(--fs-utility); color: var(--muted); }
.field--check { display: flex; align-items: center; gap: 10px; }
.field--check input { width: 16px; height: 16px; }
.field.hp { position: absolute; left: -9999px; }
.form h2 { font-size: 15px; font-weight: 700; margin-top: 10px; }

.app { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding-block: 32px 64px; }
.app__nav { display: grid; gap: 4px; align-content: start; position: sticky; top: 16px; }
.app__nav a { padding: 9px 12px; border-radius: 8px; color: var(--ink-soft); }
.app__nav a:hover { background: var(--surface-subtle); }
.app__nav a[aria-current="page"] { background: #fff; font-weight: 600; }
.app__nav .app__nav-heading { padding: 14px 12px 4px; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.app__nav .app__nav-title { padding: 6px 12px 10px; font-size: var(--fs-utility); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.app__nav .app__nav-site { display: none; margin-top: 12px; border-top: 1px solid var(--divider); border-radius: 0; color: var(--muted); font-size: 13px; }
.app-bar__logo span, .app-bar__links a { white-space: nowrap; }
.app__main { min-width: 0; }
.app__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.app__head p { color: var(--muted); margin-top: 4px; }
/* phones/tablets: the side nav becomes a drawer opened from the bar's menu button */
.app__backdrop { display: none; position: fixed; inset: 0; z-index: 44; background: var(--overlay); }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .app__nav {
    position: fixed; inset: 0 0 0 auto; width: min(280px, 84vw); z-index: 45;
    padding: 20px 12px; background: #fff; overflow-y: auto; box-shadow: 0 0 40px rgba(0,0,0,.12);
    transform: translateX(100%); transition: transform .2s ease;
  }
  body.nav-open .app__nav { transform: none; }
  body.nav-open .app__backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .app__nav a { padding: 12px 14px; font-size: 15px; }
  .app__nav .app__nav-site { display: block; }
  .app-bar__links > a { display: none; }
}

.panel { background: #fff; border-radius: var(--r-card); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.zones > .panel, .gallery > .panel, .logos > .panel { margin-top: 0; } /* grids space their panels with gap */
.panel h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.panel--muted { background: var(--surface-subtle); }
.panel .form { max-width: 720px; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--surface-subtle); color: var(--ink-soft); white-space: nowrap; }
.badge--pending, .badge--pending_payment { background: #FFF4DB; color: #7A4B00; }
.badge--approved, .badge--paid, .badge--delivered { background: #E6F6EC; color: #14532D; }
.badge--processing, .badge--shipped { background: var(--brand-tint); color: #0B4A80; }
.badge--rejected, .badge--suspended, .badge--cancelled, .badge--refunded { background: #FDECEC; color: #8A1C1C; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #EEF3F9; vertical-align: middle; }
.table th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table .sub { display: block; color: var(--muted); font-size: 12px; }
.table td:first-child, .table td.date { white-space: nowrap; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr[data-href]:hover { background: var(--surface-subtle); }
.table .empty td { text-align: center; color: var(--muted); padding: 28px; }
.table input[type="number"], .table input[type="text"] { height: 32px; padding: 0 8px; border: 1px solid var(--divider); border-radius: 6px; font: inherit; width: 100%; }
.table input[type="number"] { width: 96px; text-align: right; }
.table .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-subtle); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type="search"], .toolbar select {
  height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--divider); background: #fff; font: inherit;
}
.toolbar .spacer { flex: 1; }

.btn--sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn--danger { background: #B42318; }
.btn--danger:hover { background: #8A1C1C; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { text-decoration: underline; color: var(--brand); }

/* shipping zones */
.zones { display: grid; gap: 12px; }
.zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; padding: 10px 12px; border-radius: 10px; }
.zone:hover { background: var(--surface-subtle); }
.zone--country { padding: 4px 12px 14px; }
.zone--country .zone__name { font-size: 17px; }
.zone--missing { cursor: default; }
.zone--missing:hover { background: none; }
.zone-group__subs { margin-left: 24px; padding-left: 14px; border-left: 2px solid var(--divider); display: grid; gap: 4px; }
.zone-group__subs > .btn { justify-self: start; margin-top: 6px; }
@media (max-width: 560px) { .zone-group__subs { margin-left: 8px; } }
.zone__name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.zone__where { color: var(--muted); font-size: 13px; margin-top: 2px; }
.zone__rate { font-weight: 600; white-space: nowrap; text-align: right; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0; }
.checks .check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.checks input { width: 16px; height: 16px; }

/* before & after admin */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.pair { display: grid; gap: 10px; text-align: left; border: 0; font: inherit; cursor: pointer; padding: 12px; }
.pair:hover { outline: 2px solid var(--divider); }
.pair__shots { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pair__shots figure { margin: 0; position: relative; aspect-ratio: 2 / 1; border-radius: 8px; overflow: hidden; background: var(--surface-subtle); }
.pair__shots img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pair__shots figcaption { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(36,36,36,.72); color: #fff; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.pair__meta .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pick { aspect-ratio: 2 / 1; border-radius: 8px; background: var(--surface-subtle); overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick__empty { color: var(--muted); font-size: 12px; }
.pick--portrait { aspect-ratio: 3 / 4; max-width: 240px; }
.pick--logo { aspect-ratio: 3 / 2; max-width: 240px; background: #fff; border: 1px solid var(--divider); }
.pick--logo img { object-fit: contain; }

/* partner logos (admin/partners) */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.logo { display: grid; gap: 10px; text-align: left; border: 0; font: inherit; cursor: pointer; padding: 12px; }
.logo:hover { outline: 2px solid var(--divider); }
.logo__img { aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--divider); }
.logo__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.logo__meta .sub { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }

/* enquiries admin */
.enq__message { white-space: pre-wrap; background: var(--surface-subtle); border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.6; margin-top: 12px; }
.table .enq__preview { color: var(--muted); font-size: 12px; max-width: 320px; }

/* website products admin */
.sp-group h2 { margin-bottom: 10px; }
.sp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.sp { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: var(--surface-subtle); font: inherit; cursor: pointer; padding: 8px; border-radius: 10px; }
.sp:hover { outline: 2px solid var(--divider); }
.sp__img { flex: none; width: 56px; height: 72px; border-radius: 6px; overflow: hidden; background: #fff; }
.sp__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sp__body { display: grid; gap: 2px; min-width: 0; }
.sp__name { font-weight: 600; }
.sp__body .sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 12px; padding: 16px 18px; }
.stat .stat__n { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat .stat__l { color: var(--muted); font-size: 12px; }

/* shop */
.shop { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.shop__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shop__cart { position: sticky; top: 16px; }
@media (max-width: 1100px) { .shop { grid-template-columns: 1fr; } .shop__cart { position: static; } }
.payment__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
#payment { min-height: 480px; }
.pcard { background: #fff; border-radius: var(--r-card); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.pcard__img { aspect-ratio: 4 / 3; background: var(--surface-subtle); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.pcard__name { font-weight: 700; }
.pcard__sub { color: var(--muted); font-size: 12px; }
.pcard__price { font-size: 18px; font-weight: 700; margin-top: 4px; }
.pcard__price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.pcard__add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.paychoice { display: grid; gap: 8px; margin-bottom: 4px; }
.paychoice__opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--divider); border-radius: 10px; background: #fff; cursor: pointer; }
.paychoice__opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.paychoice__opt input { margin-top: 3px; accent-color: var(--brand); }
.paychoice__opt span { display: grid; gap: 2px; }
.paychoice__opt small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.kv.bank { border: 1px solid var(--divider); border-radius: 10px; padding: 12px 16px; background: var(--surface-subtle); }
.pcard__img { position: relative; }
.pcard__flag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: #1a1a1a; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pcard--soldout .pcard__img img { opacity: .45; filter: grayscale(1); }
.pcard--soldout .pcard__price { color: var(--muted); }
.pcard__stock { color: #B54708; font-size: 12px; font-weight: 600; }
.pcard__add [disabled] { opacity: .5; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--divider); border-radius: 8px; height: 34px; }
.qty button { width: 32px; height: 100%; font-size: 16px; }
.qty input { width: 44px; height: 100%; border: 0; text-align: center; font: inherit; background: transparent; }
.cart__lines { display: grid; gap: 10px; margin: 12px 0; }
.cart__line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; align-items: center; }
.cart__line .sub { color: var(--muted); font-size: 12px; }
.cart__line .qty { height: 28px; }
.cart__line .qty button { width: 26px; }
.cart__line .qty input { width: 36px; }
.cart__total { display: flex; justify-content: space-between; font-weight: 700; padding-top: 12px; border-top: 1px solid #EEF3F9; }
.cart__empty { color: var(--muted); padding: 12px 0; }
/* phones: the cart panel sits under the product grid, so a fixed bar keeps checkout one tap away */
.cart-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--divider); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.cart-bar .sub { color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) {
  .cart-bar:not([hidden]) { display: flex; }
  body:has(.cart-bar:not([hidden])) { padding-bottom: 72px; }
  body:has(.cart-bar:not([hidden])) .toast-host { bottom: 84px; }
}

/* order detail */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: var(--overlay); padding: 16px; }
.modal[data-open="true"] { display: flex; }
.modal__box { background: #fff; border-radius: var(--r-card); padding: 24px; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; }
.modal__box h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.modal__box .form__foot { justify-content: flex-end; }

/* toast */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast--error { background: #B42318; }
.toast--success { background: #14532D; }

/* landing pages */
.lp { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 80px; }
.lp__hero { text-align: center; padding: 24px 0 32px; }
.lp__hero h1 { margin-bottom: 12px; }
.lp__hero p { color: var(--muted); font-size: 16px; max-width: 46ch; margin: 0 auto; }
.lp__img { border-radius: var(--r-hero); overflow: hidden; margin: 8px 0 28px; }
.lp__points { display: grid; gap: 12px; margin: 0 0 32px; }
.lp__points li { background: #fff; border-radius: 12px; padding: 16px 18px; }
.lp__points strong { display: block; margin-bottom: 4px; }
.lp__cta { text-align: center; background: #fff; border-radius: var(--r-card); padding: 32px 24px; }
.lp__cta p { color: var(--muted); margin-bottom: 16px; }
.lp__lang { display: flex; gap: 12px; justify-content: center; margin-top: 24px; font-size: 12px; color: var(--muted); }
.lp__lang a { text-decoration: underline; }

/* admin */
.modal__box--wide { max-width: 880px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.modal__head h2 { margin-bottom: 0; }
.modal__box h3 { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.modal__box textarea { min-height: 90px; }
.modal__box .kv dd { white-space: pre-line; overflow-wrap: anywhere; }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .modal__grid { grid-template-columns: 1fr; } }
.table tbody tr[data-row] { cursor: pointer; }
.table tbody tr[data-row]:hover { background: var(--surface-subtle); }
.table select { height: 32px; padding: 0 8px; border: 1px solid var(--divider); border-radius: 6px; font: inherit; background: #fff; }
.table td .btn + .btn { margin-left: 6px; }
.table .thumb--empty { display: block; }
.table tfoot td { border-top: 2px solid #EEF3F9; background: var(--surface-subtle); }
.table .totals td { border-bottom: 0; padding-block: 5px; }
.table .totals td:first-child { text-align: right; color: var(--muted); }
.img-preview { width: 112px; height: 112px; border-radius: 10px; object-fit: cover; background: var(--surface-subtle); display: block; }
.field input[type="file"] { height: auto; padding: 10px 14px; }
.stat a { display: block; color: inherit; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel__head h2 { margin-bottom: 0; }
.push { margin-left: auto; }

/* admin bar: replaces the marketing header/footer on /admin/ pages */
/* slim bar for the signed-in area (account, shop, admin) */
.app-bar { display: block; background: #fff; border-bottom: 1px solid var(--divider); }
.app-bar__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.app-bar__logo { display: inline-flex; align-items: center; gap: 10px; }
.app-bar__logo img { width: 92px; height: auto; }
.app-bar__logo span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.app-bar__links { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.app-bar__links a { color: var(--ink-soft); text-decoration: underline; }
.app-bar__menu { display: none; width: 40px; height: 40px; margin-right: -8px; border: 0; background: none; border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; color: var(--ink); }
.app-bar__menu:hover { background: var(--surface-subtle); }
.app-bar__menu svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .app-bar__menu:not([hidden]) { display: inline-flex; } }
@media (max-width: 560px) { .app-bar__links span { display: none; } }
