/* ==========================================================================================================
   Akkidly · seller.css · the seller pages and the logged-out pages (login, join, help, errors)
   Redesign 2026-11-21 (direction B "Soft modern app"; mockups b-soft-app/orders.html, order.html,
   products.html). Linked after app.css by html.js layout() for every page that is not admin. OWNER: the seller
   page builder (P). Only page-specific rules here; the tokens and the shared components are app.css's.
   Same rules as app.css: logical properties only, no data: images outside :where(.shell), focus always
   visible, a single border-radius value, symmetric 4-value margin / padding.

   Contents
     1. Orders list (/orders): range switch, the «طلبات بانتظارك» tiles, search + filters, order cards
     2. Order page (/o/:no)
     3. New order (/paste), shipping (/ship), settings (/settings)
     4. Products (/products, /products/new, /products/:id) and the store link
     5. Store settings (/settings/store)
     6. Login and help
     7. Notifications card
   ========================================================================================================== */

/* 1. Orders list ------------------------------------------------------------------------------------------- */
/* The range switch: phone = in the navy app bar under the title (the app bar grows for it); desktop = at the
   title's end (headActions) next to «طلب جديد». */
.tabs-phone { margin-block: -116px 0; position: relative; z-index: 2; }
.shell:has(.tabs-phone) .appbar-lift { padding-block-end: 112px; }
.tabs-phone + .lift { margin-block-start: var(--s-3); }
.head-actions .tabs-desk { margin: 0; min-inline-size: 240px; }
@media (min-width: 1024px) {
  .tabs-phone { display: none; }
  .shell:has(.tabs-phone) .appbar-lift { padding-block-end: var(--s-2); }
  .tabs-phone + .lift { margin-block-start: 0; }
}

/* «طلبات بانتظارك»: the card lifted over the app bar; every count a tile (the number big, its label). */
.todo { padding: var(--s-4); }
.todo h2 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-16); margin-block: 0 var(--s-3); color: var(--ink); }
.todo h2::before {
  content: ''; flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--st-turn-dot);
  box-shadow: 0 0 0 4px var(--st-turn-bg); margin-inline: 4px;
}
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.todo-list > li { margin: 0; display: grid; }
.todo-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.todo-list a {
  position: relative; display: grid; align-content: start; gap: var(--s-1); min-block-size: 112px;
  padding-block: var(--s-3) var(--s-4); padding-inline: var(--s-4); border-radius: var(--r-md);
  background: var(--st-turn-bg); color: var(--st-turn-fg); text-decoration: none;
  transition: transform .15s var(--ease), filter .15s;
}
.todo-one a { min-block-size: 88px; }
.todo-list a:hover { color: var(--st-turn-fg); filter: brightness(.97); }
.todo-list a:active { transform: scale(.98); }
.todo-list a[data-todo="ship"] { background: var(--st-ok-bg); color: var(--st-ok-fg); }
.todo-list a[data-todo="edit"] { background: var(--st-edit-bg); color: var(--st-edit-fg); }
.todo-list a[data-todo="recharge"] { background: var(--st-sent-bg); color: var(--st-sent-fg); }
.tile-n { font-size: var(--fs-36); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-t { font-size: var(--fs-14); font-weight: 500; line-height: 1.4; color: var(--ink); padding-inline-end: var(--s-6); }
.tile-go {
  position: absolute; inset-block-start: 12px; inset-inline-end: 12px; inline-size: 32px; block-size: 32px; padding: 7px;
  border-radius: 50%; background: rgba(255, 255, 255, .7);
}
/* All zero: a calm line, not an alarm. */
.todo-none {
  display: flex; align-items: center; gap: var(--s-3); margin: 0; padding-block: var(--s-3); padding-inline: var(--s-4);
  border-radius: var(--r-md); background: var(--brand-50); color: var(--brand-800); font-weight: 500;
}
.todo:has(> .todo-none) h2::before { background: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }

/* Search + status filters. */
.orders-filters { display: grid; gap: var(--s-3); margin-block: 0 var(--s-4); }
.orders-search { margin: 0; align-items: center; }
.orders-search .search-box { flex: 1 1 auto; min-inline-size: 0; }
.orders-search .search-box input { background: var(--surface); border-color: var(--line); text-overflow: ellipsis; }
/* A long placeholder (English) ends in «…» where the field narrows next to the button, never cut mid-letter. */
.orders-search .search-box input::placeholder { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.orders-search > .btn { flex: none; }
.orders-filters .chips { margin: 0; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
@media (min-width: 1024px) { .orders-filters .chips { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; } }

/* The order cards. */
.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.orders > li { margin: 0; }
.order-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-3);
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--e-1);
  padding: var(--s-4); margin: 0; color: inherit; text-decoration: none; overflow: hidden;
  transition: box-shadow .2s, transform .15s var(--ease);
}
a.order-row:hover { color: inherit; box-shadow: var(--e-2); }
a.order-row:active { transform: scale(.99); }
a.order-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.order-av {
  grid-row: span 2; align-self: start; display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%;
  background: var(--bg-sunk); color: var(--ink-2); font-weight: 600; font-size: var(--fs-18);
}
:where(.shell) .order-av:empty::before {
  content: ''; inline-size: 22px; block-size: 22px; background-color: currentColor;
  -webkit-mask: var(--i-user) center / contain no-repeat; mask: var(--i-user) center / contain no-repeat;
}
.order-main { min-inline-size: 0; }
.order-name { font-weight: 600; font-size: var(--fs-16); overflow-wrap: anywhere; }
.order-no {
  display: inline-block; font-weight: 500; font-size: var(--fs-12); color: var(--ink-2); background: var(--bg);
  padding-block: 1px; padding-inline: 8px; border-radius: var(--r-pill); vertical-align: 2px; white-space: nowrap;
}
.order-meta { display: block; font-size: var(--fs-12); color: var(--ink-2); margin-block-start: 2px; }
.order-total { grid-column: 3; grid-row: 1; justify-self: end; align-self: start; font-size: var(--fs-14); color: var(--ink-2); font-weight: 500; }
.order-total b { font-size: var(--fs-18); color: var(--ink); }
.is-off .order-total b { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-2); }
.is-off .order-name { color: var(--ink-2); }
.flag { display: inline-block; font-size: var(--fs-12); color: var(--st-turn-fg); font-weight: 600; }
.order-chips {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-inline-size: 0;
  margin-block-start: var(--s-3); padding-block-start: var(--s-3); border-block-start: 1px solid var(--line);
}
[dir="ltr"] .order-name { unicode-bidi: plaintext; }
/* The seller's turn: an emerald ring and the strip «دورك…» at the bottom of the card. */
.your-turn .order-row { box-shadow: inset 0 0 0 2px var(--brand-500), var(--e-2); }
.your-turn .order-av { background: var(--brand-50); color: var(--brand-700); }
.your-turn .order-chips { border-block-start: 0; padding-block-start: 0; }
.turn-hint {
  grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-2);
  margin-block: var(--s-3) calc(var(--s-4) * -1); margin-inline: calc(var(--s-4) * -1);
  padding-block: var(--s-3); padding-inline: var(--s-4); min-block-size: var(--tap);
  background: var(--brand-50); color: var(--brand-800); font-size: var(--fs-14); font-weight: 600;
}
.turn-go {
  flex: none; margin-inline-start: auto; inline-size: 36px; block-size: 36px; padding: 8px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(10, 127, 98, .9);
}
.orders-empty { padding-block: var(--s-2); }
.orders-empty .empty { padding-block: var(--s-8); }
.orders-empty .empty + .empty { padding-block: 0 var(--s-6); margin-block-start: calc(var(--s-6) * -1); }

@media (min-width: 1024px) {
  /* Content + a 360 px side column holding «طلبات بانتظارك» (sticky). */
  .main:has(> .orders-feed) {
    display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 var(--s-6); align-items: start;
  }
  .main:has(> .orders-feed) > * { grid-column: 1; }
  .main:has(> .orders-feed) > .todo { grid-column: 2; grid-row: 1 / span 3; position: sticky; inset-block-start: var(--s-6); }
  .main:has(> .orders-feed) > .flash { grid-column: 1 / -1; }
  .orders-search { display: flex; }
  .order-row {
    grid-template-columns: 44px minmax(0, 1fr) auto auto; column-gap: var(--s-4);
    padding-block: var(--s-4); padding-inline: var(--s-5);
  }
  /* The chips take their own width (never less than the widest pill: they wrap pill by pill, never over the
     price); the name column gives way. */
  .order-chips { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0; border: 0; align-self: center; justify-content: flex-end; }
  .order-total { grid-column: 4; grid-row: 1 / span 2; align-self: center; }
  .turn-hint { grid-row: 3; margin-inline: calc(var(--s-5) * -1); padding-inline: var(--s-5); }
}

/* 2. Order page -------------------------------------------------------------------------------------------- */
/* The app bar carries «طلب رقم N» (+ buyer · time); the first card (lifted) the status pills and the ONE
   sentence of what happens / what to do. Phone: the actions live in the sticky action bar (layout
   actionBar) and the in-page actions card is hidden; desktop: two columns, the actions card sticky aside. */
.order-status { display: grid; gap: var(--s-2); padding: var(--s-5); }
.order-pills { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--fs-16); }
.order-pills .chip:first-child { min-block-size: 40px; padding-inline: 16px; font-size: var(--fs-16); }
.order-status > p { margin: 0; }
.next-step { font-size: var(--fs-18); font-weight: 500; line-height: 1.55; color: var(--ink); }
.order-status .held-note { font-size: var(--fs-16); color: var(--st-turn-fg); font-weight: 500; }
.order-status > .muted { font-size: var(--fs-12); }
.order-note { padding-block: 8px; padding-inline: 12px; border-radius: var(--r-sm); background: var(--bg); }
/* The order's card (what Akkidly sent the seller on WhatsApp): a chat bubble on a sunk ground. */
.order-msg { background: var(--bg-sunk); box-shadow: none; padding: var(--s-4); }
.wa-card {
  background: var(--surface); border-radius: 18px; border-start-start-radius: 6px; box-shadow: var(--e-1);
  padding-block: var(--s-3); padding-inline: var(--s-4); white-space: pre-line; margin: 0; max-inline-size: 46ch;
  line-height: 1.75; font-size: var(--fs-14); overflow-wrap: anywhere;
}
/* A store order's phones: two labelled rows with a phone icon. */
.store-phones { display: grid; gap: var(--s-1); padding-block: var(--s-3); padding-inline: var(--s-5); }
.store-phones p { margin: 0; display: flex; align-items: center; gap: var(--s-3); min-block-size: 40px; font-size: var(--fs-14); }
:where(.shell) .store-phones p:not(.phones-differ)::before {
  content: ''; flex: none; inline-size: 20px; block-size: 20px; background-color: var(--ink-3);
  -webkit-mask: var(--i-phone) center / contain no-repeat; mask: var(--i-phone) center / contain no-repeat;
}
.store-phones p + p:not(.phones-differ) { border-block-start: 1px solid var(--line); }
.store-phones bdi { font-weight: 600; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.store-phones .phones-differ {
  display: block; min-block-size: 0; padding-block: 8px; padding-inline: 12px; border-radius: var(--r-sm);
  background: var(--st-turn-bg); color: var(--st-turn-fg); font-size: var(--fs-12); font-weight: 500;
}
/* The in-page actions (desktop side card). */
.order-act { display: none; }
.order-actions { display: flex; flex-direction: column; gap: var(--s-2); margin: 0; }
.order-actions form, .order-actions form.spaced { margin: 0; }
.order-actions .btn { inline-size: 100%; }
.order-actions form:has(> .btn-bad) {
  margin-block-start: var(--s-2); padding-block-start: var(--s-3); border-block-start: 1px solid var(--line);
}
.order-actions .btn-bad { background: transparent; box-shadow: none; --h: 44px; }
.order-actions .btn-bad:hover { background: var(--danger-bg); }
.actionbar .btn-primary.btn-lg { --h: 56px; }
/* The edit form, folded. */
.edit-box > summary {
  cursor: pointer; font-weight: 600; font-size: var(--fs-16); min-block-size: var(--tap); display: flex; align-items: center;
  gap: var(--s-3); list-style: none;
}
.edit-box > summary::-webkit-details-marker { display: none; }
:where(.shell) .edit-box > summary::before {
  content: ''; flex: none; inline-size: 22px; block-size: 22px; background-color: var(--brand-700);
  -webkit-mask: var(--i-edit) center / contain no-repeat; mask: var(--i-edit) center / contain no-repeat;
}
:where(.shell) .edit-box > summary::after {
  content: ''; flex: none; margin-inline-start: auto; inline-size: 20px; block-size: 20px; background-color: var(--ink-2);
  -webkit-mask: var(--i-chev-d) center / contain no-repeat; mask: var(--i-chev-d) center / contain no-repeat;
  transition: transform .2s var(--ease);
}
.edit-box[open] > summary::after { transform: rotate(180deg); }
.edit-box[open] > summary { margin-block-end: var(--s-3); padding-block-end: var(--s-3); border-block-end: 1px solid var(--line); }
.edit-form { margin: 0; }
.edit-form > p.muted:first-of-type { padding-block: 8px; padding-inline: 12px; border-radius: var(--r-sm); background: var(--st-turn-bg); color: var(--st-turn-fg); font-size: var(--fs-12); }
.edit-form .sender-line { margin-block: var(--s-2) 0; font-size: var(--fs-14); }
.edit-form .sender-line bdi { font-weight: 600; }
.edit-form .sender-locked { margin-block: 2px var(--s-3); font-size: var(--fs-12); }
.item-row {
  margin-block-start: var(--s-4); padding-block: var(--s-1) var(--s-4); padding-inline: var(--s-4);
  border-radius: var(--r-md); background: var(--bg);
}
.item-row > label:first-child { font-weight: 600; }
.edit-form .actions { margin-block-start: var(--s-5); }
@media (max-width: 767.98px) { .edit-form .actions > .btn[type="submit"] { flex-basis: 100%; } }
.order-hist h2 { font-size: var(--fs-16); margin-block: 0 var(--s-2); }
.order-hist .history .chip { min-block-size: 26px; padding-inline: 10px; font-size: var(--fs-12); }
@media (min-width: 1024px) {
  .shell:has(.order-msg) .actionbar { display: none; }
  .shell:has(.order-msg) .main { padding-block-end: var(--s-10); }
  .main:has(> .order-msg) > * { max-inline-size: 760px; }
  .main:has(> .order-act) { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 var(--s-6); align-items: start; }
  .main:has(> .order-act) > * { grid-column: 1; max-inline-size: none; }
  .main:has(> .order-act) > .order-act {
    display: block; grid-column: 2; grid-row: 1 / span 6; position: sticky; inset-block-start: var(--s-6); padding: var(--s-4);
  }
  .main:has(> .order-act) > .flash ~ .order-act { grid-row: 2 / span 6; }
  .edit-form .grid2 { gap: 0 var(--s-4); }
}

/* 3. New order, shipping, settings ------------------------------------------------------------------------- */
.paste-card { padding: var(--s-5); }
.paste-intro { margin-block: 0 var(--s-2); line-height: var(--lh-body); }
.paste-card textarea { min-block-size: 240px; background: var(--bg); }
.paste-card textarea:focus { background: var(--surface); }
:where(.shell) .paste-card .btn-primary::before {
  content: ''; inline-size: 20px; block-size: 20px; background-color: currentColor;
  -webkit-mask: var(--i-spark) center / contain no-repeat; mask: var(--i-spark) center / contain no-repeat;
}
@media (min-width: 1024px) { .paste-card textarea { min-block-size: 320px; } }

.appbar .title small { font-size: var(--fs-18); font-weight: 500; color: inherit; opacity: .7; }
.courier-card { padding: var(--s-5); }
.ship-intro { margin-block: 0 var(--s-2); line-height: var(--lh-body); }
.courier-card textarea { font-size: var(--fs-14); }
.courier-card .actions { margin-block-start: var(--s-3); }
.ship-list { margin-block: 0 var(--s-4); }
.ship-list .order-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
.ship-list .order-av { grid-row: auto; align-self: center; }
.ship-list .order-total { grid-row: auto; align-self: center; }
.ship-all {
  position: sticky; z-index: 5; inset-block-end: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  margin: 0; padding: var(--s-2); border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--e-2);
}
.ship-all .btn { --h: 52px; font-size: var(--fs-16); }
@media (min-width: 1024px) { .ship-all { inset-block-end: var(--s-4); max-inline-size: 420px; margin-inline-start: auto; } }
.ship-empty { padding-block: var(--s-2); }
[role="alert"].card .history li::before { box-shadow: inset 0 0 0 2.5px var(--danger); }

.settings-form { padding: var(--s-5); }
.settings-form > label:first-of-type { margin-block-start: 0; }
.link-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-1) var(--s-3); align-items: center; }
.link-card { position: relative; }
.link-ic {
  grid-row: span 2; display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: var(--r-md);
  background: var(--brand-50); color: var(--brand-700);
}
.link-card > h3 { margin: 0; font-size: var(--fs-14); font-weight: 500; }
.link-card > h3 a { display: inline-flex; align-items: center; min-block-size: var(--tap); color: var(--ink-2); text-decoration: none; }
.link-card > h3 a:hover { color: var(--brand-700); text-decoration: underline; }
.link-card .link-url { margin: 0; font-size: var(--fs-18); font-weight: 600; overflow-wrap: anywhere; }
.link-card .link-url bdi { font-family: inherit; word-break: break-all; }
.link-card > .actions { grid-column: 1 / -1; margin-block-start: var(--s-2); }
.link-row p { margin: 0; }
.link-row p a { display: flex; align-items: center; min-block-size: var(--tap); }
.link-row { padding-block: var(--s-3); }
[data-optin] textarea { font-size: var(--fs-16); line-height: 1.6; }
[data-developers] > summary { font-size: var(--fs-14); }
.logout-form { margin-block: var(--s-6) 0; }
:where(.shell) .logout-form .btn::before {
  content: ''; inline-size: 20px; block-size: 20px; background-color: currentColor;
  -webkit-mask: var(--i-logout) center / contain no-repeat; mask: var(--i-logout) center / contain no-repeat;
}
[dir="rtl"] .logout-form .btn::before { transform: scaleX(-1); }
@media (min-width: 1024px) { .logout-form { max-inline-size: 320px; } }

/* 4. Products and the store link --------------------------------------------------------------------------- */
/* The store link card (here and on /settings): an icon tile, the label, the address, copy. */
.link-card > label { margin: 0; font-size: var(--fs-12); font-weight: 500; color: var(--ink-2); align-self: end; }
.link-card > input { grid-column: 2; min-block-size: var(--tap); font-weight: 600; font-size: var(--fs-16); background: var(--bg); }
.link-card > .link-path { grid-column: 2; font-size: var(--fs-18); font-weight: 600; color: var(--ink); }
.store-off p { margin: 0; }
.store-off a { display: flex; align-items: center; min-block-size: var(--tap); color: inherit; font-weight: 600; }
.products-add { margin-block: 0 var(--s-4); }
.products-add .btn, .head-actions .btn-primary { gap: var(--s-2); }
@media (min-width: 1024px) {
  .products-add { display: none; }
  .link-card:has(> input) { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .link-card:has(> input) > .actions { grid-column: 3; grid-row: 1 / span 2; margin: 0; align-self: center; }
}
.products-list { list-style: none; margin-block: 0 var(--s-3); padding-block: var(--s-1); padding-inline: var(--s-4); }
.product-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s-2) var(--s-3); align-items: center;
  padding-block: var(--s-3); margin: 0;
}
.product-row + .product-row { border-block-start: 1px solid var(--line); }
.product-thumb {
  flex: none; inline-size: 64px; block-size: 64px; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-sunk);
}
.product-nophoto { display: grid; place-items: center; color: var(--ink-3); }
.is-hidden .product-thumb { opacity: .55; filter: grayscale(.6); }
.product-info { display: grid; gap: 2px; min-inline-size: 0; }
.product-name { font-weight: 600; overflow-wrap: anywhere; }
.product-name .chip { min-block-size: 22px; padding-inline: 8px; font-size: 11px; vertical-align: 1px; }
.product-price { font-size: var(--fs-14); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.product-edit { gap: 6px; }
/* The product link: its own full-width row; the visible text is the product's own part (/anaqa/qames1,
   .link-path), the full address sits in the readonly input .link-src that the copy button copies. */
.product-link {
  position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-2);
  min-inline-size: 0; padding-block: 0; padding-inline: var(--s-3) 0; border-radius: var(--r-md); background: var(--bg);
}
.product-link .link-path { font-size: var(--fs-14); font-weight: 500; color: var(--brand-700); }
.product-link .link-src:focus { grid-column: 1 / -1; grid-row: 2; font-size: var(--fs-12); }
.product-link .btn { flex: none; gap: 6px; }

/* The shown part of a link (.link-path): always whole, wrapping inside the address if it must. */
/* The address is LTR (its own start is the left), but it lines up with the page's start: on an Arabic page
   that is its end. */
.link-path { display: block; min-inline-size: 0; overflow-wrap: anywhere; text-align: start; }
[dir="rtl"] .link-path { text-align: end; }
/* The full address for the copy button: out of sight until it takes focus (Tab, or the label's tap), then
   a normal field the seller can select by hand. Not display:none (the copy fallback selects it). */
.link-src:not(:focus) {
  position: absolute; inline-size: 1px; block-size: 1px; min-block-size: 0; padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.link-src:focus { min-block-size: var(--tap); }
.products-note { text-align: center; }

/* The product form: the photo tile, the fields, the option rows; desktop = fields | photo. */
.product-form { padding: var(--s-5); }
.pf-photo > label:first-child { margin-block-start: 0; }
.photo-tile {
  position: relative; display: grid; place-items: center; inline-size: 132px; aspect-ratio: 1; margin-block: 0 var(--s-3);
  border-radius: var(--r-md); border: 1.5px dashed var(--line-2); background: var(--bg); color: var(--ink-2); cursor: pointer;
  overflow: hidden; transition: border-color .15s, background-color .15s;
}
.photo-tile:hover { border-color: var(--brand-500); background: var(--brand-50); }
.photo-tile.has-photo { border-style: solid; border-color: var(--line); }
.photo-tile .product-thumb { inline-size: 100%; block-size: 100%; border-radius: 0; }
.photo-empty { position: relative; display: grid; place-items: center; inline-size: 56px; block-size: 56px; border-radius: 50%; background: var(--surface); color: var(--brand-600); box-shadow: var(--e-1); }
.photo-plus {
  position: absolute; inset-block-end: -4px; inset-inline-end: -4px; inline-size: 22px; block-size: 22px; padding: 2px;
  border-radius: 50%; background: var(--brand-600); color: #fff; stroke-width: 2.4;
}
.photo-swap {
  position: absolute; inset-block-end: 8px; inset-inline-end: 8px; display: grid; place-items: center; inline-size: 36px; block-size: 36px;
  border-radius: 50%; background: rgba(13, 27, 42, .72); color: #fff;
}
.pf-photo input[type="file"] { margin-block-start: 0; }
.pf-photo .muted { font-size: var(--fs-12); }
.pf-fold { margin-block-start: var(--s-4); padding-block: var(--s-1); padding-inline: var(--s-4); border-radius: var(--r-md); background: var(--bg); }
.pf-fold[open] { padding-block-end: var(--s-4); }
.pf-fold > p.muted { font-size: var(--fs-12); margin-block: 0 var(--s-2); }
.opt-row {
  margin-block-start: var(--s-2); padding-block: 0 var(--s-3); padding-inline: var(--s-3); border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.opt-row label { font-size: var(--fs-12); margin-block-start: var(--s-3); }
@media (max-width: 559.98px) { .opt-row { grid-template-columns: 1fr; } }
.product-form .actions { margin-block-start: var(--s-5); }
.vis-card { display: grid; gap: var(--s-2); }
.vis-card p { margin: 0; }
.vis-card .btn { gap: var(--s-2); }
@media (min-width: 1024px) {
  .product-form { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 0 var(--s-8); align-items: start; max-inline-size: 960px; }
  .pf-fields { grid-column: 1; grid-row: 1; }
  .pf-photo { grid-column: 2; grid-row: 1; position: sticky; inset-block-start: var(--s-6); }
  .pf-fields > label:first-child { margin-block-start: 0; }
  .photo-tile { inline-size: 100%; }
  .vis-card { max-inline-size: 960px; grid-template-columns: minmax(0, 1fr) 280px; align-items: center; gap: var(--s-2) var(--s-8); }
  .vis-card form { grid-column: 2; grid-row: 1 / span 2; }
}

/* 5. Store settings (/settings/store) ---------------------------------------------------------------------- */
.store-link-card { padding: var(--s-5); }
.store-link-card .link-intro { margin: 0; font-size: var(--fs-12); align-self: end; }
.store-link-card .store-link { grid-column: 2; margin: 0; font-size: var(--fs-18); font-weight: 600; overflow-wrap: anywhere; }
.store-link-card .store-link a { display: inline-block; padding-block: 10px; color: var(--ink); text-decoration: none; }
.store-link-card .store-link a:hover { color: var(--brand-700); text-decoration: underline; }
.store-state-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-4); }
.store-state-card form { margin: 0; }
.store-state { display: flex; align-items: center; gap: var(--s-3); margin: 0; font-weight: 500; flex: 1 1 14rem; }
.state-dot { flex: none; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 4px var(--bg-sunk); }
[data-store="on"] .state-dot { background: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
[data-store="off"] { box-shadow: var(--e-1), inset 0 0 0 1.5px var(--st-turn-bg); }
[data-store="on"] .btn-bad { background: transparent; }
.slug-card label { margin-block-start: 0; }
.slug-group .addon {
  display: flex; align-items: center; padding-inline: var(--s-4) 0; color: var(--ink-2); font-size: var(--fs-16);
  white-space: nowrap; direction: ltr;
}
.slug-group > input { padding-inline-start: 2px; font-weight: 600; }
.slug-group:has(> input[aria-invalid="true"]) { box-shadow: inset 0 0 0 1.5px var(--danger); }
.logo-card h2 { font-size: var(--fs-18); margin-block: 0 var(--s-1); }
.logo-card > .muted { margin-block: 0 var(--s-4); }
.logo-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.logo-tile {
  display: grid; place-items: center; inline-size: 112px; aspect-ratio: 1; margin: 0; border-radius: var(--r-lg);
  border: 1.5px dashed var(--line-2); background: var(--bg); cursor: pointer; overflow: hidden;
  transition: border-color .15s, background-color .15s;
}
.logo-tile:hover { border-color: var(--brand-500); background: var(--brand-50); }
.logo-tile.has-logo { border-style: solid; border-color: var(--line); background: var(--surface); }
.store-logo-preview { inline-size: 100%; block-size: 100%; object-fit: cover; }
.logo-forms form { margin: 0; }
.logo-forms label { margin-block-start: 0; }
.logo-forms .actions { margin-block-start: var(--s-3); }
.logo-forms form + form { margin-block-start: var(--s-2); }
.logo-forms .btn-danger-text { gap: 6px; padding-inline: var(--s-2); }
@media (max-width: 479.98px) {
  .logo-body { grid-template-columns: 1fr; }
}

/* 6. Login and help ---------------------------------------------------------------------------------------- */
.login {
  text-align: center; padding-block: var(--s-8) var(--s-6); padding-inline: var(--s-5); margin-block: var(--s-4) 0;
  max-inline-size: 28rem; margin-inline: auto; box-shadow: var(--e-2);
}
.login::before {
  content: ''; display: block; inline-size: 72px; block-size: 72px; margin-block: 0 var(--s-5); margin-inline: auto;
  border-radius: 20px; background: url("brand/akkidly-mark.svg") center / contain no-repeat;
  box-shadow: 0 14px 28px -14px rgba(13, 27, 42, .6);
}
.login h1 { font-size: var(--fs-22); margin-block-end: var(--s-2); }
.login p { line-height: var(--lh-body); }
.login .btn { margin-block-start: var(--s-5); }
.login .muted { font-size: var(--fs-12); margin-block-start: var(--s-3); }
.help img { display: block; margin-block: var(--s-3); margin-inline: auto; border-radius: var(--r-md); box-shadow: var(--e-1); }

/* 7. Notifications card ([data-push], src/web/push_pages.js; /static/push.js shows one state at a time
   through the hidden attribute, which app.css makes win over .btn's display). */
[data-push] .push-msg { margin-block: var(--s-2) 0; }
