/* ==========================================================================
   MyShop design system
   Brand: #2563EB · neutrals · polished marketplace UI
   ========================================================================== */

:root {
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-darker: #1E40AF;
  --brand-soft: #DBEAFE;
  --brand-softer: #EFF6FF;
  --ink: #0F172A;
  --ink-2: #1E293B;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --line: #E2E8F0;
  --line-2: #F1F5F9;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --green: #16A34A;
  --green-soft: #DCFCE7;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --amber: #D97706;
  --amber-soft: #FEF3C7;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 14px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, .12);
  --ring: 0 0 0 3px rgba(37, 99, 235, .22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .9rem; }
small { color: var(--muted); }

:focus-visible { outline: 3px solid rgba(37, 99, 235, .55); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section { padding: 44px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .see-all { font-weight: 700; font-size: 14px; white-space: nowrap; }
.section-head .see-all::after { content: " →"; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--outline { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-softer); }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: #B91C1C; }
.btn--soft-danger { background: var(--red-soft); color: var(--red); }
.btn--soft { background: var(--brand-soft); color: var(--brand-darker); }
.btn--soft:hover { background: #BFDBFE; }
.btn--success { background: var(--green); color: #fff; }
.btn--white { background: #fff; color: var(--brand); }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn--lg { padding: 15px 28px; font-size: 16px; border-radius: 13px; }
.btn--block { width: 100%; }
.btn--icon { padding: 9px; border-radius: 10px; }
.btn--icon-sm { padding: 6px; border-radius: 8px; }

/* --------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field .req { color: var(--red); }
.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 110px; }
.input::placeholder { color: var(--muted-2); }
.input--invalid { border-color: var(--red); }
.field-error { color: var(--red); font-size: 13px; margin-top: 6px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.checkbox { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); }
.search-input-wrap { position: relative; }
.search-input-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search-input-wrap .input { padding-left: 42px; }

/* --------------------------------------------------------------------------
   Header / navigation
   ------------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; color: var(--ink); letter-spacing: -.02em; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.logo span b { color: var(--brand); }
.header-search { flex: 1; max-width: 520px; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  color: var(--ink-2); font-weight: 600; font-size: 14.5px;
  padding: 9px 14px; border-radius: 10px;
}
.nav-links a:hover { background: var(--line-2); color: var(--brand); }
.nav-links a.is-active { background: var(--brand-soft); color: var(--brand-darker); }
.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
  border: 2px solid #fff;
}
.avatar-btn { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: var(--brand-soft); display: grid; place-items: center; color: var(--brand-darker); font-weight: 800; cursor: pointer; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.hamburger { display: none; }

@media (max-width: 900px) {
  .hamburger { display: inline-grid; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto;
    width: min(320px, 84vw);
    background: var(--surface);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 100;
    padding-top: 70px;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-inner { flex-wrap: wrap; }
}

/* Mobile bottom navigation (marketplace feel) */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.mobile-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  padding: 6px 2px; border-radius: 10px;
}
.mobile-nav a svg { width: 22px; height: 22px; }
.mobile-nav a.is-active { color: var(--brand); }
@media (max-width: 760px) { .mobile-nav { display: flex; } body { padding-bottom: 64px; } }

/* --------------------------------------------------------------------------
   Hero / landing
   ------------------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(800px 360px at -10% 110%, rgba(37, 99, 235, .1), transparent 55%),
    var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 64px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.03em; }
.hero h1 .accent { color: var(--brand); }
.hero p.lead { color: var(--muted); font-size: 17px; max-width: 480px; }
.hero-search { display: flex; gap: 10px; margin-top: 26px; max-width: 540px; }
.hero-search .input { flex: 1; padding: 15px 18px; font-size: 15.5px; border-radius: 13px; box-shadow: var(--shadow); }
.hero-art { display: grid; place-items: center; }
.hero-art .art-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 26px; width: min(360px, 100%);
  box-shadow: var(--shadow-lg);
  animation: floaty 5s ease-in-out infinite;
}
.hero-stats { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats b { font-size: 22px; color: var(--brand); display: block; }
.hero-stats span { color: var(--muted); font-size: 13px; font-weight: 600; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.loc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-softer); border: 1px solid var(--brand-soft);
  color: var(--brand-darker); font-size: 13px; font-weight: 700;
  padding: 7px 13px; border-radius: 99px; margin-bottom: 18px;
  cursor: pointer;
}

/* Category pills */
.cat-pills { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--line);
  padding: 9px 16px; border-radius: 99px;
  font-weight: 700; font-size: 13.5px; color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.cat-pill:hover, .cat-pill.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-softer); }
.cat-pill .emoji { font-size: 16px; }

/* --------------------------------------------------------------------------
   Product grid & cards
   ------------------------------------------------------------------------ */
.grid { display: grid; gap: 18px; }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.grid--shops { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 520px) { .grid--products { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card--pad { padding: 22px; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card--static:hover { transform: none; }

.product-card { position: relative; display: flex; flex-direction: column; }
.product-card .thumb { position: relative; aspect-ratio: 1; background: var(--line-2); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .thumb .flag {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  padding: 4px 9px; border-radius: 8px;
}
.product-card .thumb .flag--green { background: var(--green); }
.product-card .body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card .shop-name { font-size: 12px; color: var(--muted); font-weight: 700; }
.product-card .shop-name:hover { color: var(--brand); }
.product-card .name {
  font-size: 14px; font-weight: 700; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px;
}
.product-card .price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.product-card .price { font-size: 16px; font-weight: 800; color: var(--brand); }
.product-card .was { font-size: 12.5px; color: var(--muted-2); text-decoration: line-through; }
.product-card .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.product-card .qty-pill { font-size: 11px; font-weight: 800; color: var(--green); }
.product-card .qty-pill.is-low { color: var(--amber); }
.product-card .add-btn {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--brand); color: #fff; border: 0;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s, background .15s;
}
.product-card .add-btn:hover { background: var(--brand-dark); transform: scale(1.07); }
.product-card .add-btn:disabled { background: var(--muted-2); cursor: not-allowed; }

/* Shop cards */
.shop-card { display: flex; gap: 14px; align-items: center; padding: 18px; }
.shop-card .avatar {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-darker);
  display: grid; place-items: center; font-weight: 900; font-size: 20px;
  overflow: hidden;
}
.shop-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.shop-card h3 { margin: 0 0 2px; font-size: 15.5px; }
.shop-card .meta { font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Badges, pills, alerts
   ------------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 800;
  padding: 4px 10px; border-radius: 99px;
  letter-spacing: .01em;
}
.badge--blue { background: var(--brand-soft); color: var(--brand-darker); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--grey { background: var(--line-2); color: var(--muted); }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 17px; border-radius: var(--radius);
  font-size: 14px; margin-bottom: 18px;
  border: 1px solid;
}
.alert--info { background: var(--brand-softer); border-color: var(--brand-soft); color: var(--brand-darker); }
.alert--success { background: var(--green-soft); border-color: #BBF7D0; color: #166534; }
.alert--error { background: var(--red-soft); border-color: #FECACA; color: #991B1B; }
.alert--warning { background: var(--amber-soft); border-color: #FDE68A; color: #92400E; }
.alert b { display: block; margin-bottom: 2px; }

/* --------------------------------------------------------------------------
   Toasts
   ------------------------------------------------------------------------ */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, 92vw); }
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  animation: slidein .25s ease;
  font-size: 14px;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.toast--success { border-left: 4px solid var(--green); }
.toast--error { border-left: 4px solid var(--red); }
.toast--info { border-left: 4px solid var(--brand); }
.toast strong { font-size: 14px; }
.toast p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.toast__close { margin-left: auto; background: none; border: 0; font-size: 18px; color: var(--muted-2); cursor: pointer; }

/* --------------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th {
  text-align: left; padding: 13px 16px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); background: var(--line-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FAFCFE; }
.table .t-item { display: flex; gap: 12px; align-items: center; }
.table .t-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--line-2); flex-shrink: 0; }
.table .t-main b { display: block; font-size: 14px; }
.table .t-main span { font-size: 12.5px; color: var(--muted); }
.table .amount { font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.table .amount--pos { color: var(--green); }
.table .amount--neg { color: var(--red); }

/* --------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------ */
.pagination ul { display: flex; gap: 6px; list-style: none; padding: 0; justify-content: center; margin: 28px 0 0; flex-wrap: wrap; }
.pagination a {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px;
  padding: 0 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-weight: 700; font-size: 14px;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* --------------------------------------------------------------------------
   Tabs
   ------------------------------------------------------------------------ */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 11px 18px; font-weight: 700; font-size: 14px; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink-2); }
.tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* --------------------------------------------------------------------------
   Stat cards (dashboards)
   ------------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px;
}
.stat .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; margin-bottom: 12px; }
.stat .icon--blue { background: var(--brand-soft); }
.stat .icon--green { background: var(--green-soft); }
.stat .icon--amber { background: var(--amber-soft); }
.stat .icon--red { background: var(--red-soft); }
.stat .value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .delta { font-size: 12px; color: var(--green); font-weight: 700; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); margin-bottom: 20px;
}
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 15.5px; }
.panel-body { padding: 22px; }
.panel-body--flush { padding: 0; }
.panel-body--flush .table-wrap { border: 0; border-radius: 0; }

/* --------------------------------------------------------------------------
   Dashboard layout
   ------------------------------------------------------------------------ */
.dash { display: flex; min-height: 100vh; background: var(--bg); }
.dash-side {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--line);
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 80;
  display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.dash-side .brand { padding: 20px 22px; display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; border-bottom: 1px solid var(--line); }
.dash-side .brand img { width: 34px; height: 34px; border-radius: 9px; }
.dash-menu { flex: 1; overflow-y: auto; padding: 14px 12px; }
.dash-menu .group { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 800; padding: 14px 12px 6px; }
.dash-menu a {
  display: flex; align-items: center; gap: 11px;
  padding: 10.5px 12px; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: 14px;
  margin-bottom: 2px;
}
.dash-menu a svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.dash-menu a:hover { background: var(--line-2); }
.dash-menu a.is-active { background: var(--brand-soft); color: var(--brand-darker); }
.dash-menu a.is-active svg { color: var(--brand); }
.dash-menu a .mini-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 9px; padding: 1px 7px; }
.dash-side .side-foot { padding: 14px 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.dash-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.dash-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 13px 26px;
}
.dash-top h1 { font-size: 18px; margin: 0; }
.dash-top .crumb { font-size: 12.5px; color: var(--muted); }
.dash-top .spacer { flex: 1; }
.dash-body { padding: 26px; max-width: 1100px; width: 100%; }
.dash-burger { display: none; }

@media (max-width: 960px) {
  .dash-side { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .dash-side.is-open { transform: none; }
  .dash-main { margin-left: 0; }
  .dash-burger { display: inline-grid; }
  .dash-body { padding: 18px; }
  .side-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 75; }
}

/* Notifications dropdown */
.ntf-list { display: flex; flex-direction: column; }
.ntf-item { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.ntf-item:last-child { border-bottom: 0; }
.ntf-item:hover { background: var(--line-2); }
.ntf-item.is-unread { background: var(--brand-softer); }
.ntf-item.is-unread:hover { background: #E8F1FE; }
.ntf-item .body b { display: block; font-size: 13.5px; }
.ntf-item .body p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.ntf-item .time { font-size: 11.5px; color: var(--muted-2); margin-left: auto; white-space: nowrap; }
.ntf-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex-shrink: 0; }
.ntf-dot--admin { background: #7C3AED; }
.ntf-dot--merchant { background: #0891B2; }
.ntf-dot--shoppa { background: #DB2777; }
.ntf-dot--delivery { background: #EA580C; }
.ntf-dot--success { background: var(--green); }
.ntf-dot--warning { background: var(--amber); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 330px; max-width: min(92vw, 400px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 90; display: none;
  max-height: 420px; overflow-y: auto;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu .head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.dropdown-menu .foot { padding: 10px; text-align: center; border-top: 1px solid var(--line); font-weight: 700; }

/* --------------------------------------------------------------------------
   Empty / loading / error states
   ------------------------------------------------------------------------ */
.state { text-align: center; padding: 60px 20px; color: var(--muted); }
.state .art {
  width: 84px; height: 84px; border-radius: 24px;
  background: var(--line-2); display: grid; place-items: center;
  font-size: 36px; margin: 0 auto 18px;
}
.state h3 { color: var(--ink-2); margin-bottom: 6px; }
.state p { max-width: 380px; margin: 0 auto 18px; }

.skeleton {
  background: linear-gradient(90deg, var(--line-2) 25%, #E8EDF4 37%, var(--line-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 12px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.spinner {
  width: 22px; height: 22px; border: 3px solid var(--brand-soft);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading { color: transparent; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* --------------------------------------------------------------------------
   Cookie consent
   ------------------------------------------------------------------------ */
.cookie-bar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 150; width: min(680px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-bar p { margin: 0; font-size: 13.5px; color: var(--muted); flex: 1; min-width: 220px; }
.cookie-bar .actions { display: flex; gap: 8px; }

/* --------------------------------------------------------------------------
   Install app FAB
   ------------------------------------------------------------------------ */
.install-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 140;
  display: none; align-items: center; gap: 9px;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 99px;
  padding: 13px 20px;
  font-weight: 800; font-size: 14px; font-family: inherit;
  box-shadow: 0 10px 28px rgba(37, 99, 235, .45);
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.install-fab:hover { background: var(--brand-dark); transform: translateY(-2px); }
.install-fab svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .install-fab { bottom: 78px; right: 12px; } }
.install-fab.is-visible { display: inline-flex; animation: fab-in .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes fab-in { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(15, 23, 42, .55);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 26px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal h3 { margin-bottom: 10px; }
.modal ol, .modal ul { padding-left: 20px; color: var(--muted); font-size: 14px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* --------------------------------------------------------------------------
   Splash screen (landing only)
   ------------------------------------------------------------------------ */
.splash {
  position: fixed; inset: 0; z-index: 500;
  background: var(--surface);
  display: grid; place-items: center;
  transition: opacity .45s ease, visibility .45s;
}
.splash.is-done { opacity: 0; visibility: hidden; }
.splash .inner { text-align: center; animation: splashpop .7s cubic-bezier(.2, .9, .3, 1.2); }
.splash .inner img { width: 86px; height: 86px; border-radius: 22px; margin: 0 auto 16px; box-shadow: var(--shadow-lg); }
.splash .inner h1 { font-size: 26px; }
.splash .inner p { color: var(--muted); }
.splash .bar { width: 150px; height: 4px; background: var(--line); border-radius: 4px; margin: 18px auto 0; overflow: hidden; }
.splash .bar i { display: block; height: 100%; width: 40%; background: var(--brand); border-radius: 4px; animation: loadbar 1s ease infinite; }
@keyframes loadbar { 0% { transform: translateX(-120%); } 100% { transform: translateX(380%); } }
@keyframes splashpop { from { transform: scale(.8); opacity: 0; } }

/* --------------------------------------------------------------------------
   Product detail
   ------------------------------------------------------------------------ */
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .pd-layout { grid-template-columns: 1fr; } }
.pd-gallery .main-img { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.pd-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.pd-thumbs button { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--surface); }
.pd-thumbs button.is-active { border-color: var(--brand); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info .brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pd-info .price { font-size: 32px; font-weight: 900; color: var(--brand); }
.pd-info .was { font-size: 18px; color: var(--muted-2); text-decoration: line-through; margin-left: 10px; }
.pd-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.pd-qty button { width: 44px; height: 46px; border: 0; background: var(--line-2); font-size: 18px; font-weight: 800; cursor: pointer; }
.pd-qty input { width: 56px; text-align: center; border: 0; font-size: 15px; font-weight: 800; height: 46px; }
.pd-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 920px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line-2); align-items: center; }
.cart-item:last-child { border-bottom: 0; }
.cart-item .thumb { width: 74px; height: 74px; border-radius: 14px; object-fit: cover; background: var(--line-2); flex-shrink: 0; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info b { display: block; font-size: 14.5px; }
.cart-item .info small { display: block; margin-top: 2px; }
.cart-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.cart-qty button { width: 32px; height: 34px; border: 0; background: var(--line-2); cursor: pointer; font-weight: 800; }
.cart-qty input { width: 42px; text-align: center; border: 0; height: 34px; font-weight: 700; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 90px; }
.summary .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--ink-2); }
.summary .row.total { border-top: 1.5px dashed var(--line); margin-top: 10px; padding-top: 14px; font-size: 17px; font-weight: 900; color: var(--ink); }
.summary .row.total span:last-child { color: var(--brand); }

/* Order / list detail */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding-bottom: 22px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--line-2); border: 2px solid var(--line); flex-shrink: 0; z-index: 1; }
.timeline li.is-done .dot { background: var(--green); border-color: var(--green); }
.timeline li.is-now .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.timeline b { display: block; font-size: 14px; }
.timeline p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }

/* Map placeholder */
.map-embed { width: 100%; height: 300px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, #EFF6FF, #F8FAFC); position: relative; overflow: hidden; }
.map-embed .pin { position: absolute; top: 42%; left: 48%; font-size: 28px; animation: floaty 3s ease-in-out infinite; }

/* Print-friendly invoice bits */
.invoice { max-width: 720px; margin: 0 auto; }

/* Footer */
.site-footer { background: var(--ink); color: #CBD5E1; margin-top: 60px; }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; padding: 52px 0 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 14px; }
.footer-grid .brand-line { display: flex; align-items: center; gap: 10px; font-weight: 900; color: #fff; font-size: 17px; margin-bottom: 10px; }
.footer-grid .brand-line img { width: 32px; height: 32px; border-radius: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Misc utilities */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.between { justify-content: space-between; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.break { flex-basis: 100%; }

/* --------------------------------------------------------------------------
   Avatars (profile photos)
   ------------------------------------------------------------------------ */
.avatar-photo {
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  display: inline-block;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initial {
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-darker);
  font-weight: 800; flex-shrink: 0;
}
.avatar-row { display: flex; align-items: center; gap: 10px; }
.avatar-row .meta b { display: block; font-size: 14px; }
.avatar-row .meta span { font-size: 12.5px; color: var(--muted); }
.agent-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-softer); border: 1px solid var(--brand-soft);
  padding: 6px 12px 6px 6px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--brand-darker);
}

/* --------------------------------------------------------------------------
   Crop modal (Croppie)
   ------------------------------------------------------------------------ */
.crop-modal { max-width: 440px; text-align: center; }
.crop-modal #crop-area { display: flex; justify-content: center; margin: 8px 0 4px; }
.crop-modal .cr-boundary { border-radius: 14px; }
.crop-modal h3 { margin-bottom: 4px; }
.crop-modal .muted { font-size: 13px; margin-bottom: 8px; }
.crop-modal .actions { justify-content: center; }
[data-crop-queue] { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
[data-crop-queue] img {
  width: 76px; height: 76px; object-fit: cover;
  border-radius: 12px; border: 2px solid var(--brand-soft);
  box-shadow: var(--shadow-sm);
}
