/* =========================================================
   PROPS makes 3D — design system (light theme)
   Accent palette from logo_strona.svg (#4fc3f7 → #43e97b)
   ========================================================= */

/* route loading spinner */
.route-loading { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(25,118,210,.18); border-top-color: #1976d2; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* admin image upload */
.img-upload { display: flex; gap: 14px; align-items: stretch; }
.img-prev { width: 96px; height: 96px; flex-shrink: 0; border-radius: 12px; border: 1px solid rgba(20,60,120,.18); display: grid; place-items: center; overflow: hidden; }

/* admin: gallery of up to 5 product photos */
.img-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.img-tile { position: relative; width: 96px; height: 96px; border-radius: 12px; border: 1px solid rgba(20,60,120,.18); background: #f6f9fd; overflow: hidden; }
.img-tile-prev { width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat; background-position: center; background-color: #ffffff; }
.img-tile-flag { position: absolute; top: 6px; left: 6px; background: rgba(25,118,210,.92); color: #fff; font-size: .65rem; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; }
.img-tile-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(214,51,78,.92); color: #fff; border: 0; cursor: pointer; font-size: 14px; line-height: 0; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(20,40,80,.25); }
.img-tile-x:hover { background: var(--danger); }
.img-add { width: 96px; height: 96px; flex-shrink: 0; border-radius: 12px; border: 1.5px dashed rgba(20,60,120,.28); background: rgba(25,118,210,.04); color: var(--blue); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 600; transition: background .15s, border-color .15s; }
.img-add:hover { background: rgba(25,118,210,.10); border-color: var(--blue); }
.img-add[disabled] { opacity: .6; cursor: progress; }

/* product detail: gallery (large primary + thumb strip) */
.prod-gallery { display: flex; flex-direction: column; gap: 10px; }
.prod-gallery-main { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background-color: #ffffff; background-size: contain; background-position: center; background-repeat: no-repeat; border: 1px solid var(--line); }
.prod-gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-gallery-thumbs > button { width: 70px; height: 70px; border-radius: 10px; border: 2px solid transparent; padding: 0; background-color: #ffffff; background-size: contain; background-position: center; background-repeat: no-repeat; cursor: pointer; transition: border-color .15s, transform .15s; }
.prod-gallery-thumbs > button:hover { transform: translateY(-1px); }
.prod-gallery-thumbs > button.active { border-color: var(--blue); }

:root {
  /* light theme — surface variable names kept for compatibility */
  --navy-900: #dceaf8;   /* page background (light, gently blue) */
  --navy-850: #ffffff;   /* cards / modals base */
  --navy-800: #e7eef9;
  --navy-700: #d7e1f0;   /* incomplete timeline dot */
  --panel: rgba(25, 118, 210, 0.05);
  --panel-2: rgba(25, 118, 210, 0.10);
  --line: rgba(20, 60, 120, 0.14);
  --line-strong: rgba(20, 60, 120, 0.28);

  --blue: #1976d2;
  --blue-bright: #0d63bd;
  --green: #18854a;
  --green-bright: #0f6b39;
  --muted: #6a7a93;
  --muted-2: #9fb0c8;

  --white: #0e1c33;   /* repurposed: strongest (dark) text on light bg */
  --text: #1f2e49;
  --text-dim: #51617e;

  --danger: #d6334e;
  --warning: #b9770a;
  --ok: #1f9d57;

  --grad: linear-gradient(90deg, #4fc3f7 0%, #43e97b 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,195,247,0.16), rgba(67,233,123,0.12));

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 18px 45px -24px rgba(23, 49, 89, 0.28);
  --shadow-glow: 0 0 22px rgba(79, 195, 247, 0.40);

  --ff-head: 'Syne', 'Arial Black', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --header-h: 148px;
  --maxw: 1200px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--navy-900);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
h1, h2, h3, h4 { font-family: var(--ff-head); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- background layers ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(var(--navy-900), var(--navy-850) 45%, var(--navy-900)),
    radial-gradient(900px 600px at 80% -10%, rgba(79,195,247,0.12), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(67,233,123,0.10), transparent 60%);
}
.bg-grid::after {
  content: ""; position: absolute; inset: 0; opacity: 0.4;
  background-image:
    linear-gradient(rgba(25,118,210,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,118,210,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 300px at 50% -5%, rgba(79,195,247,0.16), transparent 70%);
}

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.site-header.scrolled { background: rgba(255, 255, 255, 0.92); border-color: var(--line-strong); box-shadow: 0 6px 24px -18px rgba(23,49,89,0.5); }
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 122px; width: auto; filter: drop-shadow(0 4px 12px rgba(25,118,210,0.18)); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.main-nav > a {
  position: relative; padding: 10px 14px; border-radius: 10px;
  color: var(--text-dim); font-weight: 600; font-size: 0.95rem;
  transition: color .2s, background .2s;
}
.main-nav > a:hover { color: var(--white); background: var(--panel); }
.main-nav > a.active { color: var(--blue); }
.main-nav > a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--grad); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.cart-link { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--text-dim); border: 1px solid var(--line); transition: all .2s; }
.cart-link:hover { color: var(--blue); border-color: var(--line-strong); background: var(--panel); }
.cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  color: #06243f; background: var(--grad); border-radius: 999px;
  box-shadow: 0 0 0 2px var(--navy-900);
}
.account-slot { display: flex; align-items: center; gap: 8px; }

.account-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px 0 8px;
  border-radius: 12px; border: 1px solid var(--line);
  color: var(--text-dim);
  transition: background .2s, border-color .2s, color .2s;
  max-width: 220px;
}
.account-chip:hover { background: var(--panel); border-color: var(--line-strong); color: var(--blue); }
.account-avatar {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #06243f;
  display: grid; place-items: center;
  font-weight: 800; font-size: .76rem;
}
.account-name {
  font-weight: 600; font-size: .9rem; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 20px; height: 2px; background: var(--blue); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Buttons / chips / badges
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 0.95rem;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #06243f; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 0 30px rgba(144,202,249,0.5); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--panel); border-color: var(--blue); color: var(--white); }
.btn-soft { background: var(--panel-2); color: var(--blue); border-color: var(--line); }
.btn-soft:hover { background: var(--panel); border-color: var(--line-strong); }
.btn-danger { border-color: rgba(255,107,129,.4); color: var(--danger); }
.btn-danger:hover { background: rgba(255,107,129,.12); border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  font-size: 0.78rem; font-weight: 600; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-dim);
}
.chip.active { background: var(--grad); color: #06243f; border-color: transparent; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: .02em; }
.badge-blue { background: rgba(144,202,249,.15); color: var(--blue); }
.badge-green { background: rgba(165,214,167,.15); color: var(--green); }
.badge-pending { background: rgba(255,207,107,.15); color: var(--warning); }
.badge-progress { background: rgba(144,202,249,.16); color: var(--blue); }
.badge-shipped { background: rgba(165,214,167,.16); color: var(--green); }
.badge-done { background: rgba(127,224,160,.16); color: var(--ok); }
.badge-cancel { background: rgba(255,107,129,.16); color: var(--danger); }
.badge-quote { background: rgba(198,236,200,.16); color: var(--green-bright); }

.pill-link { color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pill-link:hover { color: var(--blue-bright); gap: 9px; transition: gap .2s; }

/* =========================================================
   Layout helpers
   ========================================================= */
.app-main { min-height: 60vh; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 70px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.eyebrow { font-family: var(--ff-head); font-size: 0.82rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--blue); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad); border-radius: 2px; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: 10px; }
.section-sub { color: var(--text-dim); max-width: 560px; margin-top: 8px; }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* corner-bracket frame motif (echoes the logo) */
.framed { position: relative; }
.framed::before, .framed::after {
  content: ""; position: absolute; width: 26px; height: 26px; pointer-events: none;
}
.framed::before { top: 10px; left: 10px; border-top: 2px solid var(--blue); border-left: 2px solid var(--blue); border-top-left-radius: 8px; }
.framed::after { bottom: 10px; right: 10px; border-bottom: 2px solid var(--green); border-right: 2px solid var(--green); border-bottom-right-radius: 8px; }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; padding: 80px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; }
.hero .lead { color: var(--text-dim); font-size: 1.12rem; max-width: 520px; margin: 22px 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat strong { font-family: var(--ff-head); font-size: 1.7rem; display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat span { color: var(--muted); font-size: 0.85rem; }

.hero-visual { position: relative; aspect-ratio: 1/1; max-width: 460px; margin-left: auto; }
.hero-card {
  position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: var(--grad-soft); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); overflow: hidden;
  display: grid; place-items: center;
}
.hero-card .layer-emoji { font-size: 8rem; filter: drop-shadow(0 18px 40px rgba(0,0,0,.5)); animation: float 6s ease-in-out infinite; }
.hero-float { position: absolute; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.92); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); box-shadow: var(--shadow); font-size: .85rem; display: flex; align-items: center; gap: 10px; }
.hero-float .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero-float.f1 { top: 8%; left: -6%; animation: float 5s ease-in-out infinite; }
.hero-float.f2 { bottom: 12%; right: -8%; animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* marquee strip */
.marquee { border-block: 1px solid var(--line); background: rgba(25,118,210,.04); overflow: hidden; }
.marquee-track { display: flex; gap: 48px; padding: 16px 0; white-space: nowrap; animation: scroll 28s linear infinite; }
.marquee-track span { color: var(--muted); font-family: var(--ff-head); font-weight: 700; letter-spacing: .12em; font-size: .9rem; display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "◆"; color: var(--blue); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* =========================================================
   Cards / grids
   ========================================================= */
.card {
  background: #ffffff;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* product card */
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.product-thumb { position: relative; aspect-ratio: 4/3; display: grid; place-items: center; font-size: 3.4rem; overflow: hidden; }
.product-thumb .ph-emoji { filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); transition: transform .3s; }
.product-card:hover .product-thumb .ph-emoji { transform: scale(1.08) rotate(-3deg); }
.product-thumb .cat-tag { position: absolute; top: 12px; left: 12px; }
.product-thumb .stock-tag { position: absolute; top: 12px; right: 12px; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.08rem; }
.product-body .p-desc { color: var(--text-dim); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { font-family: var(--ff-head); font-weight: 800; font-size: 1.3rem; color: var(--white); }
.price .cur { color: var(--green); font-size: .9rem; margin-right: 2px; }
.product-actions { display: flex; gap: 8px; padding: 0 18px 18px; }

/* feature / info cards */
.feature { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.feature .f-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--grad-soft); border: 1px solid var(--line); }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--text-dim); font-size: .92rem; }

/* =========================================================
   Filaments
   ========================================================= */
.filament-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.filament-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent, var(--grad)); }
.filament-head { display: flex; align-items: center; gap: 14px; }
.filament-dot { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; box-shadow: 0 0 16px -2px var(--accent2, #90caf9); }
.filament-head h3 { font-size: 1.35rem; }
.filament-head .f-sub { color: var(--muted); font-size: .82rem; }
.filament-desc { color: var(--text-dim); font-size: .92rem; }
.filament-props { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 4px; }
.prop-row { display: flex; flex-direction: column; gap: 5px; }
.prop-row .prop-label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }

/* =========================================================
   Forms
   ========================================================= */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; gap: 7px; }
.form-row.two { grid-template-columns: 1fr 1fr; gap: 16px; }
label.field-label { font-size: .85rem; font-weight: 600; color: var(--text-dim); }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: #ffffff; border: 1px solid var(--line); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,118,210,.15);
  background: #ffffff;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2390caf9' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field-hint { font-size: .78rem; color: var(--muted); }
.field-error { font-size: .8rem; color: var(--danger); }

/* auth card */
.auth-wrap { max-width: 440px; margin: 60px auto; }
.auth-card { padding: 34px; }
.auth-card h1 { font-size: 1.8rem; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--text-dim); font-size: .9rem; }
.demo-creds { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px dashed var(--line-strong); font-size: .84rem; color: var(--text-dim); }
.demo-creds b { color: var(--blue); }

/* =========================================================
   Tables (admin / orders)
   ========================================================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; font-size: .9rem; }
table.data thead th { font-family: var(--ff-head); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(25,118,210,.06); border-bottom: 1px solid var(--line); }
table.data tbody tr { border-bottom: 1px solid var(--line); transition: background .15s; }
table.data tbody tr:last-child { border-bottom: none; }
table.data tbody tr:hover { background: var(--panel); }
table.data td .cell-strong { font-weight: 600; color: var(--white); }
table.data td.actions { white-space: nowrap; }
.mini-thumb { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.cell-prod { display: flex; align-items: center; gap: 12px; }

/* =========================================================
   Account / dashboard
   ========================================================= */
.dash { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.dash-side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 6px; }
.dash-side .who { padding: 18px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--line); margin-bottom: 8px; }
.dash-side .who .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #06243f; display: grid; place-items: center; font-family: var(--ff-head); font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.dash-side .who .name { font-weight: 700; }
.dash-side .who .email { font-size: .8rem; color: var(--muted); word-break: break-all; }
.dash-tab { text-align: left; padding: 11px 14px; border-radius: 11px; color: var(--text-dim); font-weight: 600; display: flex; align-items: center; gap: 10px; transition: all .18s; }
.dash-tab:hover { background: var(--panel); color: var(--white); }
.dash-tab.active { background: var(--panel-2); color: var(--blue); border: 1px solid var(--line); }
.dash-tab .ic { width: 18px; text-align: center; }

.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 26px; }
.stat-card { padding: 20px; border-radius: var(--radius); background: #ffffff; border: 1px solid var(--line); }
.stat-card .s-val { font-family: var(--ff-head); font-size: 2rem; font-weight: 800; }
.stat-card .s-label { color: var(--muted); font-size: .84rem; }
.stat-card .s-ic { float: right; font-size: 1.4rem; opacity: .8; }

/* order / request rows */
.order-card { padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: #ffffff; margin-bottom: 14px; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.order-id { font-family: var(--ff-head); font-weight: 700; }
.order-meta { color: var(--muted); font-size: .84rem; }
.order-items { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.oi { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.oi .oi-thumb { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; }
.oi .oi-qty { color: var(--muted); }
.oi .oi-price { margin-left: auto; color: var(--text); font-weight: 600; }
.order-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* status timeline */
.timeline { display: flex; gap: 0; margin-top: 6px; }
.tl-step { flex: 1; text-align: center; position: relative; font-size: .72rem; color: var(--muted); }
.tl-step .tl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--navy-700); border: 2px solid var(--line-strong); margin: 0 auto 6px; position: relative; z-index: 1; }
.tl-step::before { content: ""; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.tl-step:first-child::before { display: none; }
.tl-step.done .tl-dot { background: var(--grad); border-color: transparent; box-shadow: 0 0 10px rgba(144,202,249,.6); }
.tl-step.done { color: var(--text); }
.tl-step.done::before { background: var(--grad); }

/* =========================================================
   Cart
   ========================================================= */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; align-items: center; }
.cart-line .cl-thumb { width: 80px; height: 80px; border-radius: 12px; display: grid; place-items: center; font-size: 2rem; }
.cart-line .cl-title { font-weight: 700; }
.cart-line .cl-cat { font-size: .8rem; color: var(--muted); }
.qty-ctrl { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty-ctrl button { width: 32px; height: 34px; color: var(--blue); font-size: 1.1rem; font-weight: 700; }
.qty-ctrl button:hover { background: var(--panel); }
.qty-ctrl span { min-width: 34px; text-align: center; font-weight: 600; }
.cart-summary { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--grad-soft); position: sticky; top: calc(var(--header-h) + 20px); }
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; color: var(--text-dim); }
.sum-row.total { border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 16px; color: var(--white); font-family: var(--ff-head); font-size: 1.25rem; font-weight: 800; }

/* =========================================================
   Empty / utility states
   ========================================================= */
.empty { text-align: center; padding: 60px 24px; }
.empty .e-emoji { font-size: 3.4rem; margin-bottom: 14px; opacity: .8; }
.empty h3 { font-size: 1.4rem; margin-bottom: 8px; }
.empty p { color: var(--text-dim); margin-bottom: 20px; }

.notice { padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--text-dim); }
.notice.warn { border-color: rgba(255,207,107,.3); background: rgba(255,207,107,.07); }

.divider { height: 1px; background: var(--line); margin: 22px 0; }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.flex { display: flex; } .between { justify-content: space-between; } .items-center { align-items: center; } .gap { gap: 12px; } .wrap { flex-wrap: wrap; }

/* =========================================================
   Toast + modal
   ========================================================= */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 240px; max-width: 360px; padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,.98); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; font-size: .9rem;
  animation: toastIn .3s ease; backdrop-filter: blur(10px);
}
.toast.out { animation: toastOut .3s ease forwards; }
.toast .t-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; }
.toast.success .t-ic { background: rgba(127,224,160,.18); color: var(--ok); }
.toast.error .t-ic { background: rgba(255,107,129,.18); color: var(--danger); }
.toast.info .t-ic { background: rgba(144,202,249,.18); color: var(--blue); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

.modal-root { position: fixed; inset: 0; z-index: 900; display: none; }
.modal-root.open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(18,32,58,.45); backdrop-filter: blur(4px); animation: fade .2s; }
.modal {
  position: relative; width: min(560px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--navy-850); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 28px; animation: pop .25s ease;
}
.modal h2 { font-size: 1.5rem; margin-bottom: 6px; }
.modal .modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--line); }
.modal .modal-close:hover { background: var(--panel); color: var(--white); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: rgba(25,118,210,.04); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 50px 22px 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.footer-logo { height: 108px; margin-bottom: 14px; }
.footer-tag { font-family: var(--ff-head); font-size: .8rem; letter-spacing: .18em; color: var(--blue); margin-bottom: 12px; }
.footer-blurb { color: var(--text-dim); font-size: .9rem; max-width: 340px; }
.footer-col h4 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; color: var(--text-dim); font-size: .92rem; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { max-width: var(--maxw); margin: 0 auto; padding: 20px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .82rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin: 0 auto; max-width: 360px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .stat-cards { grid-template-columns: repeat(2,1fr); }
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px; margin: 0;
    background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line-strong);
    padding: 14px; transform: translateY(-120%); transition: transform .3s; backdrop-filter: blur(14px);
  }
  .main-nav.open { transform: translateY(0); }
  .nav-actions { margin: 8px 0 0; padding: 14px 0 0; border-left: none; border-top: 1px solid var(--line); justify-content: space-between; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-row.two { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }
  .hero { padding: 50px 0 20px; }
}
@media (max-width: 520px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .product-thumb { font-size: 2.6rem; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
