@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #1b2742;
  --muted: #6b7690;
  --line: #e3e7f0;
  --line-soft: #eef1f7;

  /* TGR palette: navy #253C6D / #30497D / #455B8A + orange #F2842F */
  --navy: #253C6D;
  --navy-2: #30497D;
  --navy-3: #455B8A;
  --brand: #F2842F;
  --brand-dark: #D96D1C;
  --brand-soft: #fdeadb;
  --brand-glow: rgba(242, 132, 47, 0.32);
  --gold: #F2842F;
  --gold-dark: #D96D1C;
  --gold-soft: #fdeadb;
  --mint: #dcf3e4;
  --mint-ink: #1f6c45;

  --sidebar-bg: #253C6D;
  --sidebar-bg-alt: #30497D;
  --sidebar-ink: #c3cce0;
  --sidebar-ink-active: #ffffff;
  --sidebar-active-bg: linear-gradient(90deg, rgba(242,132,47,0.28), rgba(242,132,47,0.04));
  --sidebar-line: #455B8A;

  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #ffedd5;
  --err: #c53030;
  --err-soft: #fbe4e4;
  --off-soft: #eceff5;

  --acc-orange: #F2842F; --acc-orange-soft: #fdeadb;
  --acc-gold: #F2842F;   --acc-gold-soft: #fdeadb;
  --acc-red: #c53030;    --acc-red-soft: #fbe4e4;
  --acc-charcoal: #253C6D; --acc-charcoal-soft: #e4e9f3;
  --acc-green: #16a34a;  --acc-green-soft: #dcfce7;
  --acc-teal: #455B8A;   --acc-teal-soft: #e4e9f3;
  --acc-blue: #253C6D;   --acc-blue-soft: #e4e9f3;
  --acc-purple: #30497D; --acc-purple-soft: #e4e9f3;
  --acc-pink: #F2842F;   --acc-pink-soft: #fdeadb;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow-card: 0 2px 4px rgba(37, 60, 109, 0.04), 0 16px 32px -16px rgba(37, 60, 109, 0.18);
  --shadow-pop: 0 8px 20px -6px rgba(37, 60, 109, 0.2);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 480px at 100% -10%, rgba(242,132,47,0.06), transparent 60%),
    radial-gradient(900px 420px at -10% 0%, rgba(37,60,109,0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-family: "Plus Jakarta Sans", "Inter", sans-serif; }

/* ═══════════════════ shared form elements ═══════════════════ */
label { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 500; margin: 0 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=number], textarea, select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
textarea { resize: vertical; min-height: 64px; }

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px var(--brand-glow); }
.btn-secondary { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.btn-danger { background: #fff; border: 1.5px solid var(--err-soft); color: var(--err); }
.btn-dark { background: var(--sidebar-bg); color: #fff; }
.btn-block { width: 100%; }

/* Press feedback — fine on touch (fires on tap). */
button:active { transform: translateY(1px); }

/* Hover effects ONLY where there's a real hovering pointer (a mouse). On iOS
   touch, a :hover that MOVES the button (transform) makes the first tap apply
   the hover instead of firing the click — so "Add" needed a second tap and felt
   broken. Guarding hovers means touch devices never get them and one tap works. */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 10px 20px -6px var(--brand-glow); }
  .btn-secondary:hover { border-color: #c7c4bc; background: var(--line-soft); }
  .btn-danger:hover { background: var(--err-soft); }
  .btn-dark:hover { background: var(--sidebar-bg-alt); transform: translateY(-1px); }
}

.error { color: var(--err); font-size: 0.85rem; margin-top: 10px; min-height: 1em; }
.ok-msg { color: var(--ok); font-size: 0.85rem; margin-top: 10px; }
.muted { color: var(--muted); font-size: 0.85rem; }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; }
.pill.ok { background: var(--acc-green-soft); color: var(--ok); }
.pill.warn { background: var(--acc-orange-soft); color: var(--warn); }
.pill.off { background: var(--off-soft); color: var(--muted); }

/* ═══════════════════ login ═══════════════════ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: var(--sidebar-bg);
}
.login-wrap::before, .login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.login-wrap::before { width: 480px; height: 480px; background: var(--brand); top: -160px; left: -120px; }
.login-wrap::after { width: 420px; height: 420px; background: var(--navy-3); bottom: -160px; right: -100px; }
.login-card {
  background: var(--card);
  padding: 44px 38px;
  border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45);
  width: 100%;
  max-width: 380px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.login-logo {
  height: 100px;
  width: auto;
  margin: 0 auto 20px;
  display: block;
}
.login-card h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; line-height: 1.25; }
.login-card p.sub { margin: 0 0 26px; color: var(--muted); font-size: 0.9rem; }
.login-card label, .login-card .error { text-align: left; }
.login-card .btn-primary { margin-top: 20px; padding: 12px 18px; font-size: 0.95rem; }

/* ═══════════════════ app shell (admin + customer) ═══════════════════ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  padding: 22px 14px;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 20px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--sidebar-line);
}
.brand-logo-chip {
  background: #fff;
  border-radius: 10px;
  padding: 4px 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-pop);
}
.brand-logo-chip img { height: 22px; width: auto; display: block; }
.sidebar .brand .name { color: #fff; font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; font-family: "Plus Jakarta Sans", sans-serif; }
.sidebar .brand .sub { font-size: 0.65rem; color: var(--sidebar-ink); text-transform: uppercase; letter-spacing: 0.08em; }

.sidebar nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar nav a, .sidebar nav button {
  all: unset;
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px 10px 15px;
  border-radius: 10px;
  font-size: 0.87rem; font-weight: 600;
  color: var(--sidebar-ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar nav a svg, .sidebar nav button svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.75; transition: opacity 0.15s ease; }
.sidebar nav a:hover, .sidebar nav button:hover { background: var(--sidebar-bg-alt); color: #fff; }
.sidebar nav a.active, .sidebar nav button.active { background: var(--sidebar-active-bg); color: #fff; }
.sidebar nav a.active::before, .sidebar nav button.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--brand);
}
.sidebar nav a.active svg, .sidebar nav button.active svg { opacity: 1; }

.sidebar .foot { border-top: 1px solid var(--sidebar-line); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar .foot a, .sidebar .foot button.linklike {
  all: unset; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  font-size: 0.83rem; color: var(--sidebar-ink); font-weight: 500;
}
.sidebar .foot a:hover, .sidebar .foot button.linklike:hover { background: var(--sidebar-bg-alt); color: #fff; }
.sidebar .foot svg { width: 16px; height: 16px; opacity: 0.8; }

.main { flex: 1; margin-left: 236px; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar .eyebrow { font-size: 0.72rem; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 2px; }
.topbar h1 { font-size: 1.4rem; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar .user-chip { display: flex; align-items: center; gap: 10px; }
.topbar .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  box-shadow: var(--shadow-pop);
}
.topbar .user-chip .who { line-height: 1.25; }
.topbar .user-chip .who .name { font-weight: 700; font-size: 0.85rem; }
.topbar .user-chip .who .role { font-size: 0.72rem; color: var(--muted); }

.content { padding: 28px 32px 60px; max-width: 1680px; }

/* ═══════════════════ dashboard welcome banner + stat tiles ═══════════════════ */
.banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 120%);
  border-radius: 22px;
  padding: 32px 34px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.banner::after {
  content: '';
  position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
}
.banner .eyebrow { color: #ffc69a; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.banner h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; color: #fff; }
.banner p { margin: 0; color: #c7cadf; font-size: 0.92rem; max-width: 46ch; position: relative; }
.banner .btn-dark { background: #fff; color: var(--ink); position: relative; }
.banner .btn-dark:hover { background: #f0f0f0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.stat-tile .top-row { display: flex; align-items: center; justify-content: space-between; }
.stat-tile .icon-chip {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tile-acc, var(--brand));
  background: var(--tile-acc-soft, var(--brand-soft));
  flex-shrink: 0;
}
.stat-tile .icon-chip svg { width: 19px; height: 19px; }
.stat-tile .trend-badge {
  font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok);
}
.stat-tile .trend-badge.down { background: var(--err-soft); color: var(--err); }
.stat-tile .label { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.stat-tile .value { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; font-family: "Plus Jakarta Sans", sans-serif; }
.stat-tile .hint { font-size: 0.76rem; color: var(--muted); }
.stat-tile .spark { width: 100%; height: 30px; display: block; }
.stat-tile.acc-orange { --tile-acc: var(--acc-orange); --tile-acc-soft: var(--acc-orange-soft); }
.stat-tile.acc-teal   { --tile-acc: var(--acc-teal);   --tile-acc-soft: var(--acc-teal-soft); }
.stat-tile.acc-blue   { --tile-acc: var(--acc-blue);   --tile-acc-soft: var(--acc-blue-soft); }
.stat-tile.acc-purple { --tile-acc: var(--acc-purple); --tile-acc-soft: var(--acc-purple-soft); }
.stat-tile.acc-pink   { --tile-acc: var(--acc-pink);   --tile-acc-soft: var(--acc-pink-soft); }
.stat-tile.acc-green  { --tile-acc: var(--acc-green);  --tile-acc-soft: var(--acc-green-soft); }

/* ── donut chart + legend (Item status card) ── */
.donut-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 160px; }
.donut-legend .item { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; }
.donut-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend .count { margin-left: auto; font-weight: 700; }

/* ── recent-activity style row list (icon chip variant) ── */
.row-item .icon-chip { width: 36px; height: 36px; border-radius: 11px; margin-right: 2px; }
.row-item .icon-chip svg { width: 16px; height: 16px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 14px; }
.section-head .eyebrow { color: var(--brand); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.section-head h3 { font-size: 1.25rem; font-weight: 800; }
.section-head a.view-all { color: var(--brand); font-size: 0.85rem; font-weight: 700; }
.section-head a.view-all:hover { text-decoration: underline; }

/* ═══════════════════ cards, tables ═══════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.card:has(table) { overflow-x: auto; }
.card h3.card-title { font-size: 0.98rem; font-weight: 800; margin-bottom: 14px; font-family: "Plus Jakarta Sans", sans-serif; }

table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.87rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); word-break: break-word; }
td { font-size: 0.82rem; }
td.nowrap, th.nowrap { white-space: nowrap; }
table.fixed-cols { table-layout: fixed; min-width: 900px; }
table.fixed-cols td.nowrap, table.fixed-cols th.nowrap,
table.fixed-cols td.nowrap { overflow: hidden; text-overflow: ellipsis; }
th { color: var(--muted); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--line-soft); }
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
tbody tr { transition: background 0.1s ease; }
tbody tr:hover { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: none; }

.row-list { display: flex; flex-direction: column; }
.row-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: background 0.1s ease;
}
.row-item:hover { background: var(--line-soft); }
.row-item:last-child { border-bottom: none; }
.row-item .thumb { width: 42px; height: 42px; border-radius: 11px; background: var(--off-soft); object-fit: cover; flex-shrink: 0; }
.row-item .info { flex: 1; min-width: 0; }
.row-item .info .t { font-size: 0.88rem; font-weight: 700; }
.row-item .info .s { font-size: 0.78rem; color: var(--muted); }
.row-item .arrow { color: var(--brand); font-size: 1.1rem; font-weight: 700; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > div { display: flex; flex-direction: column; min-width: 140px; }
.row-actions button, .row-actions a.btn { margin-right: 6px; padding: 6px 12px; font-size: 0.8rem; display: inline-block; }

/* ═══════════════════ admin tabs (legacy support, hidden once sidebar nav used) ═══════════════════ */
.tabs { display: none; }
.panel { display: none; }
.panel.active { display: block; }

/* ═══════════════════ storefront catalogue ═══════════════════ */
.store-layout { display: flex; align-items: flex-start; gap: 24px; }
.store-main { flex: 1; min-width: 0; }
.searchbar { margin-bottom: 18px; max-width: 420px; position: relative; }
.searchbar::before {
  content: '';
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}
.searchbar input { padding-left: 40px; border-radius: 999px; }

/* ── product list rows (Dokani-style: thumb left, info middle, price +
   qty/Add right) — replaces the old card-grid layout ── */
.item-list { display: flex; flex-direction: column; }
.item-row {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.12s ease;
}
.item-row:last-child { border-bottom: none; }
@media (hover: hover) and (pointer: fine) { .item-row:hover { background: var(--line-soft); } }
.item-row .thumb {
  width: 92px; height: 92px; border-radius: 15px;
  object-fit: contain; background: var(--off-soft);
  padding: 6px; flex-shrink: 0;
}
.item-row .info { flex: 1; min-width: 0; }
.item-row .info .desc { font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.item-row .info .no { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.item-row .price {
  width: 90px; flex-shrink: 0; text-align: right;
  font-size: 1.05rem; color: var(--brand); font-weight: 800;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.item-row .addrow { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.item-row .addrow input { width: 56px; text-align: center; padding: 8px 6px; }
.item-row .addrow select.uomSel { padding: 8px 6px; max-width: 110px; font-size: 0.82rem; }
.item-row .addrow button { padding: 9px 16px; }
.cart-line select.uomSel { width: 76px; padding: 6px 4px; font-size: 0.75rem; }

/* Customers page action buttons — stacked, full-width in their cell so a
   longer label never gets clipped by the table column. */
.cust-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.cust-actions .btn { width: 100%; padding: 7px 8px; font-size: 0.78rem; line-height: 1.2; white-space: normal; text-align: center; }

@media (max-width: 560px) {
  /* Mobile: product name (info) spans the full row on top, then a tidy second
     row of small thumb · price · qty+Add. Avoids the cramped column where the
     name wrapped one word per line and the price overlapped it. */
  .item-row { flex-wrap: wrap; gap: 10px 12px; padding: 14px 6px; }
  .item-row .info { order: 1; flex-basis: 100%; }
  .item-row .info .desc { font-size: 0.98rem; }
  .item-row .thumb { order: 2; width: 58px; height: 58px; border-radius: 12px; }
  .item-row .price { order: 3; width: auto; text-align: left; font-size: 1.15rem; }
  .item-row .addrow { order: 4; margin-left: auto; }
}

/* Always-open cart panel — sticky down the right side on desktop, stacks
   as a normal block below the product grid on narrow screens (no
   open/close toggle at all; simpler than a drawer and matches how the
   admin asked for it: "hep açık kalsin"). */
.cart-panel-fixed {
  width: 340px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.cart-panel-fixed h2 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 800; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.cart-line .desc { flex: 1; font-size: 0.87rem; }
.cart-line .desc .no { display: block; font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.cart-line input { width: 54px; text-align: center; padding: 7px; }
.cart-line .lt { width: 70px; text-align: right; font-weight: 700; font-size: 0.87rem; }
.cart-total { display: flex; justify-content: space-between; padding: 16px 0 6px; font-size: 1.1rem; font-weight: 800; }

/* Floating cart button — only where the cart is stacked at the bottom (mobile /
   tablet). Hidden on desktop, which already shows the sticky cart panel. Shown
   only when the cart has something in it (.show, toggled in catalog.js). */
.fab-cart {
  position: fixed; right: 16px; bottom: 18px; z-index: 50;
  display: none; align-items: center; gap: 8px;
  background: var(--brand); color: #fff; border: none;
  padding: 13px 18px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 10px 26px -6px var(--brand-glow);
}
.fab-cart .fab-cart-total { background: rgba(255,255,255,0.22); padding: 3px 10px; border-radius: 999px; }
.fab-cart:active { transform: translateY(1px); }
@media (max-width: 1180px) { .fab-cart.show { display: inline-flex; } }

/* "Added to cart" toast. */
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 60;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 700; white-space: nowrap;
  opacity: 0; transform: translateX(-50%) translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── order confirmation modal (Submit order -> review -> Place order) ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(27, 39, 66, 0.55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 26px;
  width: 100%; max-width: 440px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.4);
}
.modal-panel h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.modal-panel .muted { margin-bottom: 16px; }

@media (max-width: 1180px) {
  .store-layout { flex-direction: column; }
  .cart-panel-fixed { width: 100%; position: static; max-height: none; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 20px; }
  .banner { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════ TGR order page: branch + qty-per-item ═══════════════════ */
.order-wrap { max-width: 860px; }
.step-label { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1rem; margin-bottom: 12px; font-family: "Plus Jakarta Sans", sans-serif; }
.step-label .num { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.branch-select { font-size: 1rem; padding: 12px 14px; font-weight: 600; }
.branch-addr { margin-top: 8px; }
.qty-row { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
.qty-row:last-child { border-bottom: none; }
.qty-row .thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: var(--off-soft); padding: 4px; flex-shrink: 0; }
.qty-row .info { flex: 1; min-width: 0; }
.qty-row .info .desc { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.qty-row .info .sub { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.qty-row .price { width: 80px; text-align: right; font-weight: 800; color: var(--navy); flex-shrink: 0; }
.qty-row .qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-row .qty input { width: 72px; text-align: center; font-size: 1rem; font-weight: 700; padding: 9px 6px; }
.qty-row .qty button { width: 38px; height: 40px; padding: 0; background: var(--line-soft); color: var(--navy); font-size: 1.2rem; border-radius: var(--radius-sm); }
.qty-row.has-qty { background: var(--brand-soft); border-radius: 12px; }
.qty-row .lt { width: 80px; text-align: right; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.order-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.order-footer .total { font-size: 1.3rem; font-weight: 800; color: var(--navy); font-family: "Plus Jakarta Sans", sans-serif; }
.order-footer .btn-primary { padding: 13px 30px; font-size: 1rem; }
.success-box { text-align: center; padding: 40px 20px; }
.success-box .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 14px; }
@media (max-width: 560px) {
  .qty-row { flex-wrap: wrap; gap: 8px 12px; }
  .qty-row .info { flex-basis: calc(100% - 80px); }
  .qty-row .price { width: auto; text-align: left; }
  .qty-row .qty { margin-left: auto; }
  .qty-row .lt { display: none; }
}
.mobile-only { display: none; }
@media (max-width: 860px) { .mobile-only { display: inline-flex; } .topbar { padding: 14px 18px; } .topbar .user-chip .who { display: none; } }
