/* Yabisela Stores app pages (connexion, commande, paiement, compte, suivi, vendeur, admin). Loaded after styles.css:
   same navy, same yellow for every action, white cards on the light tint, the logo shape where a moment deserves it. */

body.ap { background: var(--tint); min-height: 100vh; }
.ap .wrap { width: min(1240px, 100% - 2 * var(--gut)); }

/* ---------- top bar ---------- */
.ap-top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.ap-top-in { width: min(1240px, 100% - 2 * var(--gut)); margin-inline: auto; height: 64px; display: flex; align-items: center; gap: 18px; }
.ap-logo img { height: 34px; width: auto; }
.ap-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; opacity: .85; padding: 6px 10px; border-radius: 10px; }
.ap-back:hover { opacity: 1; background: rgb(255 255 255 / .1); }
.ap-title { flex: 1; text-align: center; font-weight: 600; font-size: 14.5px; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-right { display: flex; align-items: center; gap: 8px; }
.ap-acc, .ap-cart { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; }
.ap-acc { background: rgb(255 255 255 / .1); }
.ap-acc:hover { background: rgb(255 255 255 / .18); }
.ap-cart .cart-ic .ic { width: 26px; height: 26px; }
@media (max-width: 720px) {
  .ap-top-in { height: 56px; gap: 8px; }
  .ap-back span, .ap-acc span { display: none; }
  .ap-acc { padding: 0 10px; }
  .ap-logo img { height: 28px; }
  .ap-title { font-size: 13.5px; }
}

/* ---------- buttons ---------- */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: linear-gradient(#ffdd2e, var(--yellow-2)); color: var(--navy); box-shadow: 0 6px 16px rgb(254 196 0 / .28); transition: transform .16s, box-shadow .16s, opacity .16s; white-space: nowrap; }
.b:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgb(254 196 0 / .36); }
.b:active { transform: scale(.98); }
.b:disabled { opacity: .55; cursor: default; transform: none; }
.b-navy { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgb(0 32 111 / .25); }
.b-navy:hover { box-shadow: 0 9px 20px rgb(0 32 111 / .32); }
.b-ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.b-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
.b-red { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1.5px #f6c4c7; }
.b-red:hover { box-shadow: inset 0 0 0 1.5px var(--red); }
.b-s { height: 38px; padding: 0 16px; font-size: 13.5px; gap: 7px; }
.b-xs { height: 32px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.b-wide { width: 100%; }
.b .ic { width: 1.15em; height: 1.15em; }
.b.is-busy { color: transparent !important; position: relative; }
.b.is-busy::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--navy); border-right-color: transparent; animation: spin .7s linear infinite; }
.b-navy.is-busy::after { border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.lnk { color: var(--blue); font-weight: 600; }
.lnk:hover { text-decoration: underline; }

/* ---------- cards, headings ---------- */
.card { background: #fff; border-radius: 20px; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgb(0 32 111 / .05); padding: clamp(18px, 2vw, 28px); }
.card + .card { margin-top: 16px; }
.card-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-hd h2 { font-size: 18px; font-weight: 700; flex: 1; }
.card-hd .ic { color: var(--blue); }
.h-page { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.sub { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.muted { color: var(--ink-3); }
.sep { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- forms ---------- */
.fld { display: grid; gap: 7px; margin-bottom: 14px; }
.fld > span { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.fld small { color: var(--ink-3); font-size: 12px; }
.inp, .fld input:not([type=checkbox]):not([type=radio]):not([type=file]), .fld select, .fld textarea {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: 500 15px var(--font); color: var(--ink);
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.fld select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300206f' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat; padding-right: 40px; }
.fld textarea { height: auto; min-height: 96px; padding: 13px 16px; line-height: 1.45; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgb(11 73 209 / .12); }
.fld input::placeholder, .fld textarea::placeholder { color: #a7b0c8; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
@media (max-width: 620px) { .row2, .row3 { grid-template-columns: 1fr; } }
.err { color: var(--red); font-size: 13px; font-weight: 500; min-height: 0; }
.err:empty { display: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); margin: 0; flex: none; }

/* choice cards (radio) */
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #b9c8ea; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { border-color: var(--navy); background: #f7f9ff; box-shadow: 0 0 0 3px rgb(0 32 111 / .08); }
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c3cde6; flex: none; display: grid; place-items: center; }
.opt:has(input:checked) .dot { border-color: var(--navy); }
.opt:has(input:checked) .dot::after { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--navy); }
.opt b { display: block; font-size: 14.5px; }
.opt small { color: var(--ink-2); font-size: 12.5px; }
.opt .end { margin-left: auto; font-weight: 700; white-space: nowrap; }

/* ---------- status pills ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-wait { background: #fff4d1; color: #8a6100; }
.st-new { background: #e6efff; color: var(--blue); }
.st-work { background: #ece7ff; color: #5b3fd1; }
.st-move { background: var(--navy); color: var(--yellow); }
.st-ok { background: #e2f6e9; color: #12804a; }
.st-bad { background: #fde6e7; color: #c4141f; }
.st-off { background: #eef0f4; color: #5b6478; }

/* ---------- tables, lists ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 0 12px 10px; }
.tbl td { padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.go { cursor: pointer; }
.tbl tr.go:hover td { background: #f8faff; }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; margin: 0 -6px; }
@media (max-width: 720px) { .tbl .hide-s { display: none; } }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty .peb { width: 120px; height: 120px; margin: 0 auto 14px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgb(0 32 111 / .05); }
.kpi small { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.kpi small .ic { color: var(--blue); width: 17px; height: 17px; }
.kpi b { display: block; font-size: clamp(22px, 2vw, 28px); font-weight: 800; margin-top: 8px; letter-spacing: -.01em; }
.kpi i { font-style: normal; color: var(--ink-3); font-size: 12px; }
.kpi.hot { background: var(--navy); color: #fff; }
.kpi.hot small, .kpi.hot i { color: rgb(255 255 255 / .75); }
.kpi.hot small .ic { color: var(--yellow); }

/* ---------- a side menu + content (compte, vendeur, admin) ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; padding: 28px 0 80px; }
.shell > main, .shell > aside { min-width: 0; }
.code > span { min-width: 0; }
.code small { overflow-wrap: anywhere; }
.side { position: sticky; top: 84px; background: #fff; border-radius: 20px; padding: 14px; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgb(0 32 111 / .05); }
.side-who { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side-who .av { width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; }
.side-who b { display: block; font-size: 14.5px; line-height: 1.2; }
.side-who small { color: var(--ink-3); font-size: 12px; }
.side nav a, .side nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); text-align: left; }
.side nav a:hover, .side nav button:hover { background: var(--tint); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--navy); color: #fff; }
.side nav a[aria-current="page"] .ic { color: var(--yellow); }
.side nav .ic { width: 20px; height: 20px; color: var(--ink-3); }
.side nav em { margin-left: auto; font-style: normal; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.side nav em:empty { display: none; }
.side .side-sep { height: 1px; background: var(--line); margin: 8px 4px; }
.main-hd { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.main-hd .h-page { flex: 1; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; padding-top: 16px; gap: 14px; }
  .side { position: static; padding: 8px; }
  .side-who { display: none; }
  .side nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav a, .side nav button { width: auto; flex: none; padding: 9px 13px; white-space: nowrap; }
  .side .side-sep { display: none; }
}

/* ---------- order lines ---------- */
.lines { display: grid; gap: 12px; }
.ln { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; }
.ln-pic { width: 64px; height: 64px; border-radius: 14px; background: var(--tint); display: grid; place-items: center; overflow: hidden; }
.ln-pic img { width: 86%; height: 86%; object-fit: contain; }
.ln-pic img.ph { width: 100%; height: 100%; object-fit: cover; }
.ln b { display: block; font-size: 14px; line-height: 1.3; }
.ln small { color: var(--ink-2); font-size: 12.5px; }
.ln .amt { font-weight: 700; white-space: nowrap; }
.sum { display: grid; gap: 8px; font-size: 14px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum .tot { font-size: 18px; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.sum .tot small { display: block; text-align: right; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }

/* the delivery code, a ticket the buyer shows */
.code { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px; background: var(--navy); color: #fff; }
.code > .ic { color: var(--yellow); width: 28px; height: 28px; }
.code small { display: block; font-size: 12px; opacity: .8; }
.code b { display: block; font-size: 28px; letter-spacing: .28em; font-weight: 800; color: var(--yellow); font-variant-numeric: tabular-nums; }

/* toast tones */
.toast.bad { background: #b3121c; }
.toast.ok { background: #0f7a45; }

/* dialogs */
.dlg { border: 0; padding: 0; border-radius: 22px; width: min(520px, calc(100% - 32px)); box-shadow: 0 30px 80px rgb(0 20 70 / .35); color: var(--ink); }
.dlg::backdrop { background: rgb(0 20 70 / .45); backdrop-filter: blur(2px); }
.dlg-in { padding: 26px; }
.dlg h3 { font-size: 20px; margin-bottom: 8px; }
.dlg .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* small screens: room for the bottom bar */
@media (max-width: 720px) { body.ap { padding-bottom: 76px; } }
