/* ============================================================
    Rattan Shop Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Base styles
    See docs/11_ui_style.md for the full design system.
    ============================================================ */

/* ---- Tabler Icons (local webfont) ---- */
@import url('/static/fonts/tabler-icons/tabler-icons.css');

/* ---- Local fonts (Inter Variable) ---- */
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/InterVariable-Italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---- Local fonts (Tabler Icons) ---- */
@font-face {
  font-family: 'tabler-icons';
  src: url('/static/fonts/tabler-icons/fonts/tabler-icons.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---- Light theme (warm off-white palette) ---- */
:root {
  --bg:            #f4f1ea;
  --bg-elev-1:     #ffffff;
  --bg-elev-2:     #faf7f1;
  --bg-input:      #ffffff;
  --bg-overlay:    rgba(40, 34, 24, 0.32);

  --fg:            #221f1a;
  --fg-muted:      #837c70;
  --fg-subtle:     #a8a194;
  --fg-inverse:    #ffffff;

  --border:        #e7e1d6;
  --border-strong: #efeae0;

  --accent:        #d0742a;
  --accent-hover:  #c2691f;
  --accent-fg:     #ffffff;
  --accent-soft:   rgba(208, 116, 42, 0.10);
  --accent-line:   rgba(208, 116, 42, 0.35);

  --success:       #1f9e52;
  --success-hover: #25b35f;
  --success-soft:  rgba(31, 158, 82, 0.12);
  --success-fg:    #ffffff;

  --warning:       #d97706;
  --warning-soft:  rgba(217, 119, 6, 0.12);

  --danger:        #dc2626;
  --danger-soft:   rgba(220, 38, 38, 0.12);

  /* KPI accent colors */
  --k-blue:        #3d8dc7;
  --k-blue-bg:     rgba(61, 141, 199, 0.12);
  --k-purple:      #9a63cf;
  --k-purple-bg:   rgba(154, 99, 207, 0.12);

  /* Attention panel accent colors */
  --attention-blue:        #3b82f6;
  --attention-violet:      #8b5cf6;

  /* Badge palette (light) Р В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р вЂ Р В РІР‚С™Р РЋРЎС™ used for status badges with borders */
  --badge-preorder-bg:     #FCE7F3;
  --badge-preorder-fg:     #BE185D;
  --badge-preorder-border: #F9A8D4;
   --badge-draft-bg:        var(--warning-soft);
   --badge-draft-fg:        var(--warning);
   --badge-draft-border:    #FDE68A; /* amber-200, keep as-is for exact match */
   --badge-confirmed-bg:    #DBEAFE; /* blue-100, keep as-is for exact match */
   --badge-confirmed-fg:    #1D4ED8;
   --badge-confirmed-border:#93C5FD;
   --badge-completed-bg:    #DCFCE7; /* green-100 */
   --badge-completed-fg:    #16A34A;
   --badge-completed-border:#86EFAC;
   --badge-cancelled-bg:    #FEE2E2; /* red-100 */
   --badge-cancelled-fg:    #DC2626;
   --badge-cancelled-border:#FCA5A5;
  --badge-returned-bg:     #EDE9FE;
  --badge-returned-fg:     #6D28D9;
  --badge-returned-border: #C4B5FD;

  /* Leaf logo gradient */
  --leaf-from:     #e3863a;
  --leaf-to:       #c96a26;
  --leaf-ink:      #fff7ee;

  --color-accent-preorder: #d97706; /* amber-600 */
  --color-on-accent-preorder: #fff;
  --color-accent-preorder-dark: #f59e0b; /* amber-500, dark only */

  --shadow-sm:     0 1px 2px rgba(60, 50, 30, 0.04), 0 10px 26px -16px rgba(80, 66, 40, 0.30);
  --shadow-md:     0 4px 8px -2px rgba(60, 50, 30, 0.06), 0 16px 32px -16px rgba(80, 66, 40, 0.35);
  --shadow-lg:     0 2px 4px rgba(60, 50, 30, 0.05), 0 20px 40px -20px rgba(80, 66, 40, 0.38);
  --ring:          0 0 0 3px rgba(208, 116, 42, 0.25);

  /* Glow gradients for background */
  --glow-up:       rgba(227, 134, 58, 0.07);
  --glow-dn:       rgba(31, 158, 82, 0.05);

  --font-sans:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, monospace;

  --radius-sm:     6px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     16px;

  --space-1:       4px;
  --space-2:       8px;
  --space-3:       12px;
  --space-4:       16px;
  --space-5:       20px;
  --space-6:       24px;
  --space-8:       32px;
  --space-10:      40px;
  --space-12:      48px;

  --header-h:      56px;
  --sidebar-w:     244px;
}

/* ---- Dark theme (warm dark palette) ---- */
.dark {
  --bg:            #131312;
  --bg-elev-1:     #1c1b19;
  --bg-elev-2:     #232220;
  --bg-input:      #1c1b19;
  --bg-overlay:    rgba(0, 0, 0, 0.55);

  --fg:            #f1efe9;
  --fg-muted:      #97938a;
  --fg-subtle:     #6d6960;
  --fg-inverse:    #1c1b19;

  --border:        #2c2b28;
  --border-strong: #44403c;

  --accent:        #e3863a;
  --accent-hover:  #f09a4d;
  --accent-fg:     #1a1208;
  --accent-soft:   rgba(227, 134, 58, 0.12);
  --accent-line:   rgba(227, 134, 58, 0.28);

  --success:       #2db865;
  --success-hover: #36cf72;
  --success-soft:  rgba(45, 184, 101, 0.12);
  --success-fg:    #08230f;

  --warning:       #fbbf24;
  --warning-soft:  rgba(251, 191, 36, 0.12);

  --danger:        #f87171;
  --danger-soft:   rgba(248, 113, 113, 0.12);

  /* KPI accent colors */
  --k-blue:        #6fb6e8;
  --k-blue-bg:     rgba(111, 182, 232, 0.12);
  --k-purple:      #c79be8;
  --k-purple-bg:   rgba(199, 155, 232, 0.12);


  /* Attention panel accent colors */
  --attention-blue:        #3b82f6;
  --attention-violet:      #8b5cf6;

  /* Badge palette (dark) Р В Р вЂ Р В РІР‚С™Р Р†Р вЂљРЎСљ used for status badges with borders */
--badge-preorder-bg-dark: rgba(244, 63, 94, 0.1);
--badge-preorder-fg-dark: #FB7185;
--badge-preorder-border-dark: rgba(244, 63, 94, 0.3);
--badge-draft-bg-dark: rgba(254, 249, 195, 0.1);
--badge-draft-fg-dark: #FBBF24;
--badge-draft-border-dark: rgba(254, 249, 195, 0.3);
--badge-confirmed-bg-dark: rgba(59, 130, 246, 0.1);
--badge-confirmed-fg-dark: #60A5FA;
--badge-confirmed-border-dark: rgba(59, 130, 246, 0.3);
--badge-completed-bg-dark: rgba(22, 163, 74, 0.1);
--badge-completed-fg-dark: #4ADE80;
--badge-completed-border-dark: rgba(22, 163, 74, 0.3);
--badge-cancelled-bg-dark: rgba(239, 68, 68, 0.1);
--badge-cancelled-fg-dark: #F87171;
--badge-cancelled-border-dark: rgba(239, 68, 68, 0.3);
--badge-returned-bg-dark: rgba(139, 92, 246, 0.1);
--badge-returned-fg-dark: #A78BFA;
--badge-returned-border-dark: rgba(139, 92, 246, 0.3);
  /* Leaf logo gradient */
  --leaf-from:     #e3863a;
  --leaf-to:       #c96a26;
  --leaf-ink:      #fff7ee;

  --color-accent-preorder: #d97706; /* amber-600 */
  --color-on-accent-preorder: #1c1917;
  --color-accent-preorder-dark: #f59e0b; /* amber-500, dark only */

  --shadow-sm:     0 1px 0 rgba(255, 255, 255, 0.02), 0 12px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-md:     0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg:     0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 44px -22px rgba(0, 0, 0, 0.8);
  --ring:          0 0 0 3px rgba(227, 134, 58, 0.35);

  /* Glow gradients for background */
  --glow-up:       rgba(227, 134, 58, 0.05);
  --glow-dn:       rgba(45, 184, 101, 0.04);

  --font-sans:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, monospace;

  --radius-sm:     6px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     16px;

  --space-1:       4px;
  --space-2:       8px;
  --space-3:       12px;
  --space-4:       16px;
  --space-5:       20px;
  --space-6:       24px;
  --space-8:       32px;
  --space-10:      40px;
  --space-12:      48px;

  --header-h:      56px;
  --sidebar-w:     244px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 72% -10%, var(--glow-up), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, var(--glow-dn), transparent 60%);
  background-attachment: fixed;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; }

/* ---- App shell ---- */
.app {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  padding: 30px 26px 60px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .page {
    padding: 22px 16px 50px;
  }
}

/* ---- Header (topbar) ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
  padding: 0 26px;
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--border-strong);
}

.dark .header {
  background: rgba(19, 19, 18, 0.78);
}

.header-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
}

@media (hover: hover) {
  .header-burger:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.header-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--leaf-from), var(--leaf-to));
  color: var(--leaf-ink);
  font-size: 18px;
  flex-shrink: 0;
}

.header-spacer { flex: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 18px;
}

@media (hover: hover) {
  .theme-toggle:hover,
  .header-burger:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

/* User chip Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў avatar + name pill */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  cursor: default;
}

.user-chip:hover {
  border-color: var(--accent-line);
  background: var(--bg-elev-2);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev-1));
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 700;
  border: 0.5px solid var(--border-strong);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
}

.user-role {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

/* Timezone pill */
.tz-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}

.tz-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Icon button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 18px;
}

@media (hover: hover) {
  .icon-btn:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

/* Header action link */
.header-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 18px;
}

@media (hover: hover) {
  .header-action-link:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

@media (min-width: 768px) {
  .header { height: 60px; padding: 0 26px; }
  :root { --header-h: 60px; }
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-elev-1);
  border-right: 0.5px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.sidebar--open { transform: translateX(0); }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(2px);
  z-index: 39;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

/* Mobile-only: show backdrop when sidebar is open */
@media (max-width: 767px) {
  .sidebar-backdrop--visible {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* Sidebar brand area */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 12px 16px;
  flex-shrink: 0;
}

.sidebar-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--leaf-from), var(--leaf-to));
  color: var(--leaf-ink);
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-brand b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }

/* Sidebar section label */
.sidebar-section {
  padding: 16px 12px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Sidebar link */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: 13.5px;
  font-weight: 500;
  min-height: auto;
  transition: background-color 0.16s, color 0.16s;
  position: relative;
}

.sidebar-link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  font-size: 18px;
  opacity: 0.9;
}

@media (hover: hover) {
  .sidebar-link:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

/* Active state with gradient indicator */
.sidebar-link--active {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--fg);
}

.sidebar-link--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.sidebar-link--active .sidebar-link-icon {
  color: var(--accent);
  opacity: 1;
}

/* Sidebar footer */
.sidebar-footer {
  padding-top: 8px;
  border-top: 0.5px solid var(--border-strong);
  margin-top: 6px;
}

.sidebar-link--logout:hover {
  color: #d6553a !important;
  background: rgba(214, 85, 58, 0.08) !important;
}

@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: translateX(0);
    z-index: 40;
  }
  .sidebar-backdrop { display: none; }
}

/* ---- Skip link (accessibility) ---- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  top: 8px;
}

/* ---- Utilities ---- */
.hidden { display: none !important; }

@media (max-width: 767px) {
  .hidden-mobile { display: none !important; }
}

/* hidden-desktop Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў visible on mobile, hidden on desktop */
@media (min-width: 768px) {
  .hidden-desktop { display: none !important; }
}

/* ============================================================
   Dashboard Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў page head, actions, KPIs, panels
   ============================================================ */

/* Page head */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.page-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--fg-muted);
  margin-top: 4px;
}

.hero-date {
  font-size: 13px;
  color: var(--fg-subtle);
  font-weight: 500;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.quick-action-btn .action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--bg-elev-2);
  color: var(--fg-muted);
  font-size: 19px;
  transition: background 0.18s, color 0.18s;
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  background: var(--bg-elev-2);
  box-shadow: var(--shadow-lg);
}

.quick-action-btn:hover .action-icon {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* Primary CTA action */
.quick-action-btn--cta {
  background: linear-gradient(135deg, var(--success-hover), var(--success));
  border-color: transparent;
  color: var(--success-fg);
  box-shadow: 0 14px 30px -14px rgba(31, 158, 82, 0.7);
}

.quick-action-btn--cta .action-icon {
  background: rgba(255, 255, 255, 0.22);
  color: var(--success-fg);
}

@media (hover: hover) {
  .quick-action-btn--cta:hover {
    filter: brightness(1.04);
    box-shadow: 0 18px 36px -14px rgba(31, 158, 82, 0.7);
  }
}

/* KPI cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-radius: var(--radius-xl);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Top accent line */
.metric-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--kpi-accent, var(--border-strong)), transparent);
  opacity: 0.6;
}

.metric-card .metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metric-card .metric-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--kpi-bg, var(--bg-elev-2));
  color: var(--kpi-accent, var(--fg-muted));
}

.metric-card .metric-icon i {
  font-size: 20px;
}

.metric-label {
  font-size: 12.5px;
  color: var(--fg-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 8px;
}

.metric-value .unit {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-muted);
  margin-left: 4px;
  letter-spacing: 0;
}

.metric-foot {
  font-size: 11.5px;
  color: var(--fg-subtle);
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-elev-2);
  color: var(--fg-muted);
}

/* KPI accent colors */
.metric-card--orders { --kpi-accent: var(--accent); --kpi-bg: var(--accent-soft); }
.metric-card--ship   { --kpi-accent: var(--k-blue);   --kpi-bg: var(--k-blue-bg); }
.metric-card--pre    { --kpi-accent: var(--k-purple); --kpi-bg: var(--k-purple-bg); }
.metric-card--sales  { --kpi-accent: var(--success);  --kpi-bg: var(--success-soft); }
.metric-card--sales .metric-value { color: var(--success); }

/* Dashboard panels */
.dashboard-two-col {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
}

.panel-card {
  border-radius: var(--radius-xl);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 0.5px solid var(--border-strong);
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--bg-elev-2);
  color: var(--fg-muted);
}

.panel-icon i {
  font-size: 15px;
}

/* Panel link */
.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  transition: background 0.16s, gap 0.16s;
}

.panel-link i {
  font-size: 14px;
  stroke-width: 2.2;
}

.panel-link:hover {
  background: var(--accent-soft);
  gap: 7px;
}

/* Empty state */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  text-align: center;
}

.empty-bubble {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  background: var(--bg-elev-2);
  border: 0.5px solid var(--border-strong);
  color: var(--fg-subtle);
}

.empty-bubble i {
  font-size: 26px;
  stroke-width: 1.6;
}

.empty-state.is-ok .empty-bubble {
  background: var(--success-soft);
  border-color: rgba(45, 184, 101, 0.25);
  color: var(--success);
}

/* Attention items */
.attention-list { flex: 1; padding: 0 20px 20px; }

.attention-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--border-strong);
}

.attention-item:last-child { border-bottom: none; }

.attention-icon i {
  font-size: 20px;
}

.attention-content { flex: 1; min-width: 0; }

.attention-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.attention-subtitle {
  font-size: 12.5px;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* Spacer utility */
.spacer { flex: 1 !important; }

/* Empty state text helpers */
.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
}

.empty-desc {
  font-size: 12.5px;
  color: var(--fg-subtle);
  max-width: 240px;
}

/* Empty state message text */
.empty-message {
  font-size: 12.5px;
  color: var(--fg-muted);
  max-width: 280px;
}

/* Reveal animation */
.reveal-anim {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes reveal-rise {
  to { opacity: 1; transform: none; }
}

/* ---- Responsive breakpoints (mockup values) ---- */

@media (max-width: 1080px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .metrics-row   { grid-template-columns: repeat(2, 1fr); }
  .dashboard-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.sidebar--open {
    transform: translateX(0);
    box-shadow: 30px 0 60px -30px rgba(0, 0, 0, 0.4);
    z-index: 50;
  }
  .sidebar-backdrop--visible { z-index: 45; }
  .header-burger { display: inline-flex !important; }
  .page { padding: 22px 16px 50px; }
  .page-title { font-size: 24px; }
  .user-info { display: none; }
  .tz-pill { display: none !important; }
}

@media (max-width: 460px) {
  .quick-actions { grid-template-columns: 1fr; }
  .metrics-row   { grid-template-columns: 1fr; }
}

/* ============================================================
    Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Buttons
    ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  padding: 10px 16px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
}

@media (hover: hover) {
  .btn--primary:hover { background: var(--accent-hover); }
}

.btn--primary:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--secondary {
  background: var(--bg-elev-1);
  color: var(--fg);
  border: 0.5px solid var(--border-strong);
}

@media (hover: hover) {
  .btn--secondary:hover { background: var(--bg-elev-2); }
}

.btn--secondary:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn--ghost {
  background: transparent;
  color: var(--fg-muted);
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  min-width: 32px;
  min-height: 32px;
}

@media (hover: hover) {
  .btn--ghost:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

.btn--ghost:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn--ghost .ti {
  font-size: 16px;
}

.icon-btn-sm {
  padding: 4px 6px;
  min-width: 28px;
  min-height: 28px;
}

.danger-icon {
  color: var(--danger) !important;
}

.btn--danger {
  background: transparent;
  color: var(--danger);
  border: 0.5px solid var(--danger);
}

@media (hover: hover) {
  .btn--danger:hover {
    background: var(--danger-soft);
  }
}

.btn--danger:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn--danger-icon {
  color: var(--danger);
}

@media (max-width: 767px) {
  .btn { min-height: 44px; padding: 12px 20px; }
  .btn--ghost { min-width: 40px; min-height: 40px; padding: 10px; }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Badges ---- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--fg-muted);
  font-size: var(--text-xs, 12px);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.badge--success {
  background: var(--success-soft);
  color: var(--success);
}

.badge--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--info {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

.badge--sm {
  font-size: 13px;
  padding: 6px 10px;
}

.badge--preorder {
  background-color: var(--color-accent-preorder);
  color: var(--color-on-accent-preorder);
}

[data-theme="dark"] .badge--preorder,
.dark .badge--preorder {
  background-color: var(--color-accent-preorder-dark);
}

.form-preorder-wrapper {
  border-left: 4px solid var(--color-accent-preorder);
  padding-left: var(--space-3);
  margin-bottom: var(--space-4);
}

[data-theme="dark"] .form-preorder-wrapper,
.dark .form-preorder-wrapper {
  border-left-color: var(--color-accent-preorder-dark);
}

.badge-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Flash messages ---- */

.flash {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm, 14px);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.flash--info {
  background: var(--accent-soft);
  color: var(--accent);
}

.flash--success {
  background: var(--success-soft);
  color: var(--success);
}

.flash--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.flash--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flash-close:hover {
  opacity: 1;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Toasts ---- */

.toast-container {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--fg-muted);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  animation: toast-in 0.2s ease-out;
}

.toast--success { border-left-color: var(--success); }
.toast--warning { border-left-color: var(--warning); }
.toast--danger  { border-left-color: var(--danger); }
.toast--info    { border-left-color: var(--accent); }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast--success .toast-icon { color: var(--success); }
.toast--warning .toast-icon { color: var(--warning); }
.toast--danger  .toast-icon { color: var(--danger); }
.toast--info    .toast-icon { color: var(--accent); }

.toast-content { flex: 1; min-width: 0; }

.toast-title {
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  color: var(--fg);
  line-height: var(--line-tight, 1.25);
}

.toast-message {
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  margin-top: 2px;
  line-height: var(--line-normal, 1.5);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--fg-subtle);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .toast-container {
    left: auto;
    right: var(--space-4);
    bottom: var(--space-4);
    max-width: 400px;
  }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Form fields ---- */

.field {
  margin-bottom: var(--space-4);
}

.label {
  display: block;
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: var(--fg);
  margin-bottom: var(--space-2);
}

.label--required::after {
  content: " *";
  color: var(--danger);
}

.input {
  width: 100%;
  background: var(--bg-input);
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 40px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* Ensure text inputs always have high-contrast text in both themes */
.dark .input,
.dark .textarea,
.dark .select {
  color: #E7E5E4;
  -webkit-text-fill-color: #E7E5E4;
}

.input::placeholder {
  color: var(--fg-subtle);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

@media (max-width: 767px) {
  .input { min-height: 44px; }
}

.textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 80px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea::placeholder {
  color: var(--fg-subtle);
}

.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.select {
  width: 100%;
  background: var(--bg-input);
  color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Bootstrap compatibility aliases ---- */

/* Text input alias Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў mirrors .input */
.form-control,
.form-input {
  width: 100%;
  background: var(--bg-input);
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 40px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder,
.form-input::placeholder {
  color: var(--fg-subtle);
}

.form-control:focus,
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form-control:disabled,
.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-control[aria-invalid="true"],
.form-input[aria-invalid="true"] {
  border-color: var(--danger);
}

@media (max-width: 767px) {
  .form-control,
  .form-input { min-height: 44px; }
}

/* Dark theme Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў high-contrast text for all field types */
.dark .input,
.dark .textarea,
.dark .select,
.dark .form-control,
.dark .form-input {
  color: #E7E5E4;
  -webkit-text-fill-color: #E7E5E4;
}

/* Textarea alias */
textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Select alias */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

select.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

select.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  select.form-control { min-height: 44px; }
}

.checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-strong);
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

@media (max-width: 767px) {
  .checkbox { width: 24px; height: 24px; }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm, 14px);
  color: var(--fg);
  cursor: pointer;
  min-height: 32px;
}

@media (max-width: 767px) {
  .checkbox-row { min-height: 44px; }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Chips (multiselect tags) ---- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0.5px solid var(--border-strong);
  background: var(--bg-elev-1);
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  cursor: pointer;
  min-height: 32px;
  transition: all 0.15s;
}

.chip input { display: none; }

.chip:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 767px) {
  .chip { min-height: 40px; padding: 8px 14px; }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Search ---- */

.search {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-subtle);
  pointer-events: none;
}

.search-input {
  padding-left: 38px;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Form actions ---- */

.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
  width: 100%;
}

@media (min-width: 768px) {
  .form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: auto;
  }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Status ---- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--fg-muted);
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status--active    { background: var(--success-soft); color: var(--success); }
.status--draft     { background: var(--bg-elev-2);    color: var(--fg-muted); }
.status--archived  { background: var(--bg-elev-2);    color: var(--fg-subtle); }
.status--warning   { background: var(--warning-soft); color: var(--warning); }
.status--danger    { background: var(--danger-soft);  color: var(--danger); }

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Skeleton loading ---- */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elev-2) 0%,
    var(--bg-elev-1) 50%,
    var(--bg-elev-2) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Price diff highlight ---- */

.price-diff {
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Item row (order form) ---- */

.order-item-row {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
}

.order-item-row--has-diff {
  border-left: 3px solid var(--warning);
  background: var(--warning-soft);
}

.order-item-total {
  font-weight: 600;
  color: var(--fg);
  font-size: var(--text-sm, 14px);
}

.order-grand-total {
  font-size: var(--text-lg, 18px);
  font-weight: 700;
  color: var(--fg);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Customer search select ---- */

.customer-search-select {
  position: relative;
}

.customer-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}

.customer-search-item {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm, 14px);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.customer-search-item:hover {
  background: var(--bg-elev-2);
}

.customer-search-item--selected {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Ensure search icon is vertically centered in customer search inputs */
.customer-search-select .search-input {
  padding-top: calc(var(--space-2) + 4px);
  padding-bottom: calc(var(--space-2) + 4px);
}

.customer-search-select .search-icon {
  top: var(--space-3);
  transform: none;
}

/* ---- Components Modal (payment) ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  padding: var(--space-4);
}

.modal {
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 0.5px solid var(--border);
}

.modal-title {
  font-size: var(--text-base, 16px);
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}

@media (hover: hover) {
  .modal-close:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

.modal-body {
  padding: var(--space-4);
}

.modal-footer {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 0.5px solid var(--border);
  justify-content: flex-end;
}

/* HTMX modal container Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў wider than default .modal */
.htmx-modal-container {
  max-width: 900px;
  width: 95vw;
}

/* Feedback page wrapper */
.feedback-page-wrapper {
  padding: 0 var(--space-5);
  margin-top: 80px;
}

/* Filter form elements */
.filter-input { min-width: 200px; }
.filter-select { min-width: 160px; }
.filter-label { white-space: nowrap; }

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Product search select ---- */

.product-search-select {
  position: relative;
}

.product-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.product-search-item {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm, 14px);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.product-search-item:hover {
  background: var(--bg-elev-2);
}

.product-search-item--selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.product-search-sku {
  color: var(--fg-subtle);
  font-size: var(--text-xs, 12px);
  margin-left: auto;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Empty state ---- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12, 48px) var(--space-4, 16px);
  gap: var(--space-3, 12px);
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--fg-subtle);
  margin-bottom: var(--space-2, 8px);
}

.empty-icon--error { color: var(--danger); }

.empty-title {
  font-size: var(--text-lg, 18px);
  font-weight: 600;
  color: var(--fg);
}

.empty-message {
  font-size: var(--text-sm, 14px);
  color: var(--fg-muted);
  max-width: 320px;
  line-height: var(--line-normal, 1.5);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Page header ---- */

.page-header {
  margin-bottom: var(--space-5, 24px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs, 12px);
  color: var(--fg-subtle);
  margin-bottom: var(--space-2, 8px);
}

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
}

.breadcrumb-sep { color: var(--fg-subtle); }

.page-header-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
}

.page-title {
  font-size: var(--text-xl, 22px);
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  line-height: var(--line-tight, 1.25);
}

.page-subtitle {
  font-size: var(--text-sm, 14px);
  color: var(--fg-muted);
  margin-top: var(--space-1, 4px);
}

@media (min-width: 768px) {
  .page-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў View toggle ---- */

.view-toggle {
  display: inline-flex;
  background: var(--bg-elev-2);
  border-radius: var(--radius-md);
  padding: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
}

.view-toggle-btn--active {
  background: var(--bg-elev-1);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

.view-toggle-btn svg { width: 14px; height: 14px; }

@media (max-width: 767px) {
  .view-toggle { display: none; }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Filters ---- */

.filters {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-4, 16px);
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filters .filter-input,
  .filters .filter-select,
  .filters .input,
  .filters .select {
    min-width: 0;
    width: 100%;
  }
  .filters .btn {
    width: 100%;
  }
}

.filters-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: var(--text-xs, 12px);
  font-weight: 700;
  padding: 0 6px;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Table ---- */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev-1);
}

.table thead {
  background: var(--bg-elev-1);
}

.table th {
  text-align: left;
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
}

.table td {
  font-size: var(--text-sm, 14px);
  color: var(--fg);
  padding: var(--space-3, 12px) var(--space-4, 16px);
  border-bottom: 0.5px solid var(--border);
  height: 40px;
}

.th-numeric, .td-numeric { text-align: right; }
.th-actions, .td-actions { text-align: right; width: 1%; white-space: nowrap; }
.td-mono { font-family: var(--font-mono); font-size: var(--text-xs, 12px); color: var(--fg-muted); }

@media (hover: hover) {
  .table tbody tr:hover { background: var(--bg-elev-2); }
}

.table tbody tr.row--archived {
  opacity: 0.6;
}

/* table is always display:table; visibility is controlled by x-show / Alpine */

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў HTMX indicators ---- */

.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Hint text ---- */

.hint {
  display: block;
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  margin-top: var(--space-1, 4px);
}

.hint--error {
  color: var(--danger);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Form container ---- */

.form-container {
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Actions inline ---- */

.actions-inline {
  display: inline-flex;
  gap: var(--space-2);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Divider (hr) ---- */

.divider {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: var(--space-6) 0;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Hint with top spacing ---- */

.hint-spaced {
  margin-top: var(--space-2);
}

/* ============================================================
   Pages Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Login
   ============================================================ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  padding: var(--space-4);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elev-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

.login-logo i {
  font-size: 32px;
}

.login-theme-toggle {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: 18px;
}

@media (hover: hover) {
  .login-theme-toggle:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

@media (max-width: 767px) {
  .login-card {
    padding: var(--space-6) var(--space-4);
    box-shadow: none;
    border-radius: 0;
  }
}

/* Login page Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў dark theme inputs must be visible on card bg */
.dark .login-card .input {
  background: var(--bg-elev-2) !important;
  color: var(--fg) !important;
  -webkit-text-fill-color: var(--fg) !important;
}

/* ============================================================
   Components Р   Р 'Р '  Р   Р   Р Р†вЂљР’  Р   Р 'Р’  Р   Р вЂ Р   РІР‚С™РЎР…РІвЂћСћР   Р   Р '  Р   Р Р†вЂљРЎв„ўР   Р Р‹Р РЎРЎ  Product cards (iteration 02d step H)
    ============================================================ */


.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .dashboard-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }
}

.dashboard-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.dashboard-card-icon i {
  font-size: 20px;
}

.dashboard-card-value {
  font-size: var(--text-3xl, 30px);
  font-weight: 700;
  color: var(--fg);
  line-height: var(--line-tight, 1.25);
}

.dashboard-card-label {
  font-size: var(--text-sm, 14px);
  color: var(--fg-muted);
  line-height: var(--line-normal, 1.5);
}

.dashboard-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

@media (hover: hover) {
  .dashboard-card-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
  }
}

.dashboard-card-link i {
  font-size: 16px;
}

/* ============================================================
   Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Product cards (iteration 02d step H)
   ============================================================ */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }
}

.product-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: var(--bg-elev-2);
  color: var(--fg-subtle);
  border-bottom: 0.5px solid var(--border);
}

.product-card-preview i {
  font-size: 36px;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  flex: 1;
}

.product-card-title {
  font-size: var(--text-base, 16px);
  font-weight: 600;
  color: var(--fg);
  line-height: var(--line-tight, 1.25);
}

.product-card-sku {
  font-size: var(--text-xs, 12px);
  color: var(--fg-subtle);
  font-family: var(--font-mono);
}

.product-card-price {
  font-size: var(--text-xl, 22px);
  font-weight: 700;
  color: var(--fg);
  line-height: var(--line-tight, 1.25);
  font-variant-numeric: tabular-nums;
}

.product-card-stock {
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  color: var(--fg-muted);
}

.product-card-stock--zero {
  color: var(--danger);
}

.product-card-stock--low {
  color: var(--warning);
}

.product-card-actions {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4) var(--space-4);
  margin-top: auto;
  justify-content: flex-end;
}

/* View toggle Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў mobile variant */
@media (max-width: 767px) {
  .view-toggle-mobile {
    display: inline-flex;
  }
}


.customer-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

@media (hover: hover) {
  .customer-card:hover {
    border-color: var(--accent);
  }
}

.customer-card--selected {
  border-color: var(--accent);
  background: var(--bg-elev-2);
}
/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Filters grid (stock movements) ---- */

.filters-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .filters-grid {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.filter-field label {
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: var(--fg);
}

@media (min-width: 768px) {
  .filter-field { flex: 1; min-width: 140px; }
}

.filter-actions {
  display: flex;
  gap: var(--space-2);
}

/* Aliases for form field classes used in templates */
.form-input {
  width: 100%;
  background-color: var(--bg-input);
  background: var(--bg-input);
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 40px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input::placeholder {
  color: var(--fg-subtle);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-input[aria-invalid="true"] {
  border-color: var(--danger);
}

/* Dark theme high-contrast text for form-* classes */
.dark .form-input,
.dark .form-textarea,
.dark .form-select {
  color: #E7E5E4;
  -webkit-text-fill-color: #E7E5E4;
}

@media (max-width: 767px) {
  .form-input { min-height: 44px; }
}

.form-textarea {
  width: 100%;
  background-color: var(--bg-input);
  background: var(--bg-input);
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 80px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-textarea::placeholder {
  color: var(--fg-subtle);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-select {
  width: 100%;
  background-color: var(--bg-input);
  background: var(--bg-input);
  color: var(--fg);
  -webkit-text-fill-color: var(--fg);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 12px;
  font-family: inherit;
  font-size: var(--text-base, 16px);
  line-height: var(--line-normal, 1.5);
  min-height: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .form-select { min-height: 44px; }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Form vertical (adjustment form) ---- */

.form-vertical {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: var(--fg);
}

.form-hint {
  font-size: var(--text-xs, 13px);
  color: var(--fg-muted);
}

/* Error states for form inputs */
.form-select--error,
.form-input--error,
.form-textarea--error {
  border-color: var(--danger) !important;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Alert (error block) ---- */

.alert--danger {
  background: var(--danger-soft);
  color: var(--danger);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm, 14px);
}

.alert-list {
  margin: 0;
  padding-left: var(--space-4);
}

.alert-list li {
  margin-bottom: var(--space-1);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Table cell modifiers ---- */

.cell-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-nowrap {
  white-space: nowrap;
}

.cell-comment {
  max-width: 240px;
  word-break: break-word;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Text color utilities ---- */

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Pagination info ---- */

.pagination-info {
  padding: var(--space-2) var(--space-3);
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  display: inline-flex;
  align-items: center;
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Card subtitle ---- */

.card-subtitle {
  font-size: var(--text-base, 16px);
  font-weight: 600;
  color: var(--fg);
  margin: var(--space-4) 0 var(--space-3);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Table compact ---- */

.table--compact th,
.table--compact td {
  padding: var(--space-2) var(--space-3);
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Card (generic) ---- */

.card {
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

@media (hover: hover) {
  .card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }
}

/* ---- Components Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Breadcrumb separator ---- */

.breadcrumb-separator {
  color: var(--fg-subtle);
  margin: 0 4px;
}

/* ---- Pages Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў Registration (auth page) ---- */

.register-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  padding: var(--space-6) var(--space-4);
}

.register-card {
  width: 100%;
  max-width: 400px;
}

.register-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-xl, 20px);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: var(--space-6);
}

.register-logo i {
  color: var(--accent);
  font-size: 24px;
}

.register-footer {
  text-align: center;
  margin-top: var(--space-4);
  font-size: var(--text-sm, 14px);
  color: var(--fg-muted);
}

.register-footer a {
  color: var(--accent);
  font-weight: 500;
}

.register-footer a:hover {
  text-decoration: underline;
}

.register-theme-toggle {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  color: var(--fg-muted);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .register-theme-toggle:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

.products-header-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .products-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---- Autocomplete dropdown (PO product search) ---- */

.position-relative {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: var(--text-sm, 14px);
  text-align: left;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: var(--bg-elev-2);
}

.autocomplete-item small {
  margin-left: auto;
  color: var(--fg-muted);
  font-weight: 400;
}

/* ---- Preorder section (PO detail) ---- */

.preorder-section {
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.preorder-section summary {
  cursor: pointer;
  font-size: var(--text-xs, 12px);
  color: var(--accent);
  font-weight: 500;
}

.preorder-section ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0 0;
}

.preorder-section li {
  padding: var(--space-1) 0;
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  border-bottom: 0.5px solid var(--border);
}

.preorder-section li:last-child {
  border-bottom: none;
}

/* ---- PO status badges (reuse existing badge variants) ---- */

.badge--po-draft {
  background: var(--bg-elev-2);
  color: var(--fg-muted);
}

.badge--po-sent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge--po-closed {
  background: var(--success-soft);
  color: var(--success);
}

.badge--po-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---- PO item status badges ---- */

.badge--item-pending {
  background: var(--bg-elev-2);
  color: var(--fg-muted);
}

.badge--item-in-transit {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge--item-received {
  background: var(--success-soft);
  color: var(--success);
}

.badge--item-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}


/* ---- Dashboard two-column content ---- */

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .dashboard-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-6);
  }
}

.dashboard-section {
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 0.5px solid var(--border);
}

.dashboard-section-title {
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  color: var(--fg);
}

.dashboard-section-link {
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  text-decoration: none;
}

@media (hover: hover) {
  .dashboard-section-link:hover {
    color: var(--accent);
  }
}

.dashboard-section-body {
  padding: var(--space-3) var(--space-4);
}

/* ---- Status pill (compact, no dot) ---- */

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--text-xs, 12px);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.status-pill--neutral {
  background: var(--bg-elev-2);
  color: var(--fg-muted);
}

.status-pill--info {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill--success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---- Filter pills row ---- */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

@media (max-width: 767px) {
  .filter-pills {
    flex-direction: column;
    align-items: stretch;
  }
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  cursor: pointer;
  min-height: 38px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-pill i {
  font-size: 14px;
}

@media (hover: hover) {
  .filter-pill:hover {
    background: var(--bg-elev-2);
    border-color: var(--border-strong);
    color: var(--fg);
  }
}

.filter-pill--active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Attention list (requires attention) ---- */

.attention-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.attention-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: 0.5px solid var(--border);
}

.attention-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.attention-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.attention-content {
  flex: 1;
  min-width: 0;
}

.attention-title {
  font-size: var(--text-sm, 14px);
  color: var(--fg);
  line-height: var(--line-normal, 1.5);
}

.attention-sub {
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  margin-top: 2px;
}

/* ---- Settings page layout ---- */

.settings-page-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .settings-page-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-6);
  }
}

/* Settings left nav */
.settings-nav {
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 768px) {
  .settings-nav {
    position: sticky;
    top: calc(var(--header-h, 64px) + var(--space-4));
    height: fit-content;
    max-height: calc(100vh - var(--header-h, 64px) - var(--space-8));
    overflow-y: auto;
  }
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.settings-nav-item i {
  font-size: 16px;
  flex-shrink: 0;
}

@media (hover: hover) {
  .settings-nav-item:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

.settings-nav-item--active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Settings section card */
.settings-section {
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

@media (max-width: 767px) {
  .settings-section {
    padding: var(--space-4);
  }
}

.settings-section-title {
  font-size: var(--text-base, 16px);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-2);
}

.settings-section-desc {
  font-size: var(--text-sm, 14px);
  color: var(--fg-muted);
  margin-bottom: var(--space-4);
}

/* Backup card */
.backup-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: var(--success);
  margin-bottom: var(--space-6);
}

.backup-card i {
  font-size: 20px;
  flex-shrink: 0;
}

.backup-info {
  flex: 1;
  min-width: 0;
}

.backup-title {
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  color: inherit;
}

.backup-sub {
  font-size: var(--text-xs, 12px);
  color: var(--success);
  opacity: 0.8;
  margin-top: 2px;
}

/* ---- Dashboard table (last orders) ---- */

.dashboard-table {
  width: 100%;
}

.dashboard-table thead th {
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  font-weight: 500;
  text-align: left;
  padding: var(--space-2) 0;
  border-bottom: 0.5px solid var(--border);
}

.dashboard-table tbody td {
  padding: var(--space-3) 0;
  font-size: var(--text-sm, 14px);
  color: var(--fg);
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.td-mono {
  font-family: var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}

.td-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- Compact table (reusable) ---- */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table--compact thead th {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.table--compact tbody td {
  padding: var(--space-3);
  font-size: var(--text-sm, 14px);
  color: var(--fg);
  vertical-align: middle;
}

/* ---- Pill pagination buttons ---- */

.pagination-pills {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

@media (max-width: 767px) {
  .pagination-pills {
    justify-content: center;
  }
}

.pagination-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

@media (hover: hover) {
  .pagination-pill:hover {
    background: var(--bg-elev-2);
    border-color: var(--border-strong);
    color: var(--fg);
  }
}

/* ---- Success green palette (CTA) ---- */

:root {
  --success-primary:   #15803D;
  --success-hover:     #166534;
  --success-fg:        #FFFFFF;
}

.dark {
  --success-primary:   #22C55E;
  --success-hover:     #4ADE80;
  --success-fg:        #0F0F0E;
}

/* ============================================================
   Dashboard (new design Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў ref: screenshot)
   ============================================================ */

/* ---- Hero row ---- */

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.hero-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.page-title {
  font-size: var(--text-3xl, 32px);
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-date {
  font-size: var(--text-base, 16px);
  color: var(--fg-muted);
  font-weight: 500;
}

/* ---- Quick actions row ---- */

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  font-size: var(--text-base, 16px);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.quick-action-btn .ti {
  font-size: 20px;
}

@media (hover: hover) {
  .quick-action-btn:hover {
    background: var(--bg-elev-2);
    border-color: var(--fg-subtle);
    color: var(--fg);
    box-shadow: var(--shadow-sm);
  }
}

/* ---- CTA quick action (green, like screenshot) ---- */

.quick-action-btn--cta {
  background: var(--success);
  color: #FFFFFF;
  border-color: var(--success);
  font-weight: 600;
}

@media (hover: hover) {
  .quick-action-btn--cta:hover {
    background: var(--success-hover, #16A34A);
    border-color: var(--success-hover, #16A34A);
    box-shadow: var(--shadow-md);
  }
}

.dark .quick-action-btn--cta {
  background: #22C55E;
  color: #0F0F0E;
  border-color: #22C55E;
}

@media (hover: hover) {
  .dark .quick-action-btn--cta:hover {
    background: #4ADE80;
    border-color: #4ADE80;
  }
}

/* ---- Metrics row ---- */

.metric-label {
  font-size: var(--text-sm, 14px);
  color: var(--fg-muted);
  font-weight: 500;
}

.metric-value {
  font-size: var(--text-3xl, 36px);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---- Two-column layout (last orders + attention) ---- */

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .dashboard-two-col {
    grid-template-columns: 3fr 2fr;
  }
}

.dashboard-panel {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: var(--text-lg, 18px);
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.panel-link {
  font-size: var(--text-sm, 14px);
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

@media (hover: hover) {
  .panel-link:hover {
    color: var(--accent-hover);
  }
}

/* ---- Orders table ---- */

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm, 14px);
}

.orders-table thead th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  color: var(--fg-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.orders-table tbody td {
  padding: var(--space-3);
  color: var(--fg);
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.orders-table tbody tr:last-child td {
  border-bottom: none;
}

@media (hover: hover) {
  .orders-table tbody tr:hover td {
    background: var(--bg-elev-2);
  }
}

.order-number {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.text-right {
  text-align: right;
}

/* ---- Attention panel ---- */

.attention-panel {
  min-height: 280px;
}

.attention-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.attention-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-elev-2);
  border-left: 3px solid transparent;
}

.attention-deficit {
  border-left-color: var(--warning);
}

.attention-pending_shipment {
  border-left-color: var(--attention-blue);
}

.attention-in_transit_po {
  border-left-color: var(--attention-violet);
}

.attention-backup {
  border-left-color: var(--success);
}

.attention-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--fg-muted);
}

.attention-deficit .attention-icon {
  color: var(--warning);
}

.attention-pending_shipment .attention-icon {
   color: var(--attention-blue);
}

.attention-in_transit_po .attention-icon {
   color: var(--attention-violet);
}

.attention-backup .attention-icon {
  color: var(--success);
}

.attention-content {
  flex: 1;
  min-width: 0;
}

.attention-title {
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-1);
}

.attention-subtitle {
  font-size: var(--text-xs, 12px);
  color: var(--fg-muted);
}

.text-warning {
  color: var(--warning) !important;
}

.text-success {
  color: var(--success) !important;
}

/* ---- Empty state ---- */

.empty-state {
  color: var(--fg-subtle);
  font-size: var(--text-sm, 14px);
  margin: 0;
  padding: var(--space-6) 0;
  text-align: center;
}

/* ---- Badge colors (pill style Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў ref screenshot) ---- */

.badge-preorder {
  background: var(--badge-preorder-bg);
  color: var(--badge-preorder-fg);
  border: 1px solid #F9A8D4;
}

.dark .badge-preorder {
  background: var(--badge-preorder-bg-dark);
  color: var(--badge-preorder-fg-dark);
  border-color: var(--badge-preorder-border-dark);
}

.badge-draft {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid var(--badge-draft-border);
}

.dark .badge-draft {
  background: var(--badge-draft-bg-dark);
  color: var(--badge-draft-fg-dark);
  border-color: var(--badge-draft-border-dark);
}

.badge-confirmed {
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
}

.dark .badge-confirmed {
  background: var(--badge-confirmed-bg-dark);
  color: var(--badge-confirmed-fg-dark);
  border-color: var(--badge-confirmed-border-dark);
}

.badge-completed {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--badge-completed-border);
}

.dark .badge-completed {
  background: var(--badge-completed-bg-dark);
  color: var(--badge-completed-fg-dark);
  border-color: var(--badge-completed-border-dark);
}

.badge-cancelled {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--badge-cancelled-border);
}

.dark .badge-cancelled {
  background: var(--badge-cancelled-bg-dark);
  color: var(--badge-cancelled-fg-dark);
  border-color: var(--badge-cancelled-border-dark);
}

.badge-returned {
  background: #EDE9FE;
  color: #6D28D9;
  border: 1px solid #C4B5FD;
}

.dark .badge-returned {
  background: var(--badge-returned-bg-dark);
  color: var(--badge-returned-fg-dark);
  border-color: var(--badge-returned-border-dark);
}

/* ---- Responsive tweaks for dashboard ---- */

@media (max-width: 767px) {
  .page-title {
    font-size: var(--text-2xl, 24px);
  }

  .metric-value {
    font-size: var(--text-2xl, 28px);
  }

  .dashboard-panel {
    padding: var(--space-4) var(--space-3);
  }

  .orders-table {
    font-size: var(--text-xs, 12px);
  }

  .orders-table thead th,
  .orders-table tbody td {
    padding: var(--space-2) var(--space-1);
  }
}

/* ---- Products view toggle Р В Р’В Р вЂ™Р’В Р В Р’В Р Р†Р вЂљР’В Р В Р’В Р вЂ™Р’В Р В Р вЂ Р В РІР‚С™Р РЋРІвЂћСћР В Р’В Р В РІР‚В Р В Р’В Р Р†Р вЂљРЎв„ўР В Р Р‹Р РЋРЎв„ў responsive ---- */

@media (max-width: 767px) {
  .view-toggle-mobile {
    display: inline-flex !important;
  }
}
@media (min-width: 768px) {
  .view-toggle-mobile {
    display: none !important;
  }
}

/* ---- Spacing utilities ---- */
.mb-1 { margin-bottom: var(--space-1, 4px) !important; }
.mb-2 { margin-bottom: var(--space-2, 8px) !important; }
.mb-3 { margin-bottom: var(--space-3, 12px) !important; }
.mb-4 { margin-bottom: var(--space-4, 16px) !important; }
.mb-5 { margin-bottom: var(--space-5, 24px) !important; }
.mt-1 { margin-top: var(--space-1, 4px) !important; }
.mt-2 { margin-top: var(--space-2, 8px) !important; }
.mt-3 { margin-top: var(--space-3, 12px) !important; }
.mt-4 { margin-top: var(--space-4, 16px) !important; }
.gap-1 { gap: var(--space-1, 4px) !important; }
.gap-2 { gap: var(--space-2, 8px) !important; }
.gap-3 { gap: var(--space-3, 12px) !important; }
/* ---- Hidden by default (JS toggled) ---- */

.hidden-by-default {
    display: none;
}

/* ---- Text utilities ---- */

.text-muted { color: var(--fg-muted) !important; }

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-sm { font-size: var(--text-xs, 12px); }

/* ---- Flex utilities ---- */

.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }

/* ---- Margin utilities (right/left) ---- */

.me-1 { margin-right: var(--space-1, 4px) !important; }
.me-2 { margin-right: var(--space-2, 8px) !important; }
.ms-auto { margin-left: auto !important; }

/* ---- Width utilities ---- */

.w-100 { width: 100% !important; }

/* ---- Heading size utility ---- */

.h3 { font-size: var(--text-lg, 18px); font-weight: 600; line-height: var(--line-tight, 1.25); }

/* ---- Readonly form input ---- */

.form-input--readonly {
    background: var(--bg-elev-2);
    color: var(--fg-muted);
    cursor: default;
    user-select: text;
}

/* ---- Stock block ---- */

.stock-block {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- HTMX Modal ---- */

#htmx-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

#htmx-modal .modal-overlay {
  z-index: 1;
}

#htmx-modal .htmx-modal-container,
#htmx-modal .modal-body {
  position: relative;
  z-index: 2;
}

.htmx-modal-container {
  max-height: 90vh;
  overflow-y: auto;
}

/* ---- Inline-style migration utilities ---- */

/* Feedback link (dashboard) */
.feedback-link {
  display: inline-block;
  margin-bottom: var(--space-3, 12px);
  padding: 8px 16px;
  background: #eef4ff;
  border-radius: 8px;
   color: var(--attention-blue);
  text-decoration: none;
  font-weight: 500;
}

.dark .feedback-link {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

@media (hover: hover) {
  .feedback-link:hover {
    background: rgba(59, 130, 246, 0.18);
  }
}

.dark .feedback-link:hover {
  background: rgba(59, 130, 246, 0.18);
}

/* Tag color swatch (dynamic bg) */
.tag-swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
}

/* Readonly input visual */
.readonly-visual {
  background: var(--bg-elev-2);
  color: var(--fg-muted);
  cursor: not-allowed;
}

/* Bootstrap-like primary button (inline) */
.btn-bootstrap-primary {
  display: inline-block;
  padding: 10px 24px;
  background-color: #0d6efd;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

@media (hover: hover) {
  .btn-bootstrap-primary:hover {
    background-color: #0b5ed7;
  }
}

.dark .btn-bootstrap-primary {
   color: var(--attention-blue);
  color: #fff;
}

@media (hover: hover) {
  .dark .btn-bootstrap-primary:hover {
    background-color: #2563eb;
  }
}

/* Search dropdown */
.search-dropdown {
  display: none;
  position: absolute;
  z-index: 100;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
}

/* Tag filter button */
.tag-filter-btn {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Text color utility */
.text-danger-fg {
  color: var(--danger) !important;
}

.text-warning-fg {
  color: var(--warning) !important;
}

/* Margin utilities */
.mx-2 { margin: 0 var(--space-2); }

/* Display utilities */
.d-block { display: block !important; }
.d-none { display: none !important; }

/* Flex row with gap */
.flex-gap-2 { display: flex; gap: var(--space-2); }
.flex-gap-3 { display: flex; gap: var(--space-3); }

/* Flex wrap + align center */
.flex-wrap-center { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }

/* Grid auto-fill */
.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  max-height: 400px;
  overflow-y: auto;
}

/* Justify between + align center + margin top */
.justify-between-center-mt4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
}

/* Flex row with gap + wrap */
.flex-gap-wrap { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Text right aligned bold */
.text-right-bold { text-align: right; font-weight: 600; }

/* Label visual (display block, margin bottom, fw500) */
.label-block {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

/* Max-width helpers */
.max-w-300 { max-width: 300px; }
.max-w-500 { max-width: 500px; }
.max-w-640 { max-width: 640px; }
.max-w-720 { max-width: 720px; }

/* Full width input */
.input-full {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

/* Full width textarea */
.textarea-full {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
}

/* Empty state centered */
.empty-centered {
  text-align: center;
  padding: var(--space-8) 0;
  color: var(--fg-subtle);
  font-size: 14px;
}

/* Tag row (title + swatch) */
.tag-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

/* Flex 1 min-width 0 */
.flex-1-min0 { flex: 1; min-width: 0; }

/* Font weight helpers */
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* Border top helper */
.border-top { border-top: 1px solid var(--border-strong); }

/* Relative positioning */
.pos-relative { position: relative; }

/* Z-index helper */
.z-100 { z-index: 100; }

/* Color inherit */
.color-inherit { color: inherit; }

/* Font size + weight combo */
.fw-bold-lg { font-weight: 700; font-size: var(--text-lg); }

/* Small label */
.small-label {
  font-size: 10px;
  margin-bottom: 2px;
}

/* Dynamic gradient line (preorder) */
.preorder-line {
  height: 1px;
  background: var(--color-accent-preorder);
}

/* Tag row with title + swatch */
.tag-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border-strong);
}

/* Color from context (dynamic) */
.color-success { color: var(--success); }
.color-danger { color: var(--danger); }

/* Margin top auto + flex justify between */
.flex-auto-between {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

/* Max width 720 + responsive width */
.max-w-responsive { max-width: 720px; }

@media (max-width: 767px) {
  .max-w-responsive { max-width: 95vw; }
}

/* Margin top spacing */
.mt-auto { margin-top: auto; }

/* Font size + color combo */
.fg-muted-sm { font-size: var(--text-sm); color: var(--fg-muted); }
.fg-subtle-xs { font-size: var(--text-xs); color: var(--fg-subtle); }
.warning-fg-xs { font-size: var(--text-xs); color: var(--warning); margin-left: var(--space-2); }

/* Label display block */
.label-display-block {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  flex: 1;
  min-width: 0;
}

/* Accent colored text */
.accent-fg { font-weight: 700; font-size: 15px; color: var(--accent); }

/* Flex align center + gap */
.flex-align-center { display: flex; align-items: center; gap: var(--space-2); }

/* Margin bottom small */
.mb-spaced { margin-bottom: var(--space-1); }

/* Grid 1 column */
.grid-1col {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

/* Hint link — used inside form sections as an action link */
.hint-link {
  color: var(--accent);
  text-decoration: none;
}
.hint-link:hover {
  text-decoration: underline;
}

/* Padding + bg + border combo (search) */
.search-input-style {
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

/* Heading size */
.h3-size { font-size: var(--text-lg, 18px); font-weight: 600; line-height: var(--line-tight, 1.25); }

/* Text truncate + muted */
.truncate-muted {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin-bottom: var(--space-4);
}

/* ============================================================
   Pagination (Bootstrap-compatible)
   ============================================================ */

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.page-item { display: inline-flex; }

.page-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border-strong);
  color: var(--fg-muted);
  font-size: var(--text-sm, 14px);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  min-height: 40px;
}

@media (hover: hover) {
  .page-link:hover {
    background: var(--bg-elev-2);
    color: var(--fg);
  }
}

.page-item.disabled .page-link {
  opacity: 0.55;
  pointer-events: none;
}

.page-item.active .page-link {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

/* ============================================================
   Mobile list cards — shared pattern for all list pages
   ============================================================ */

/* Desktop: show table, hide mobile cards */
.list-desktop { display: block; }
.list-mobile  { display: none; }

/* Mobile: hide table, show cards */
@media (max-width: 767px) {
  .list-desktop { display: none !important; }
  .list-mobile  { display: flex; flex-direction: column; gap: 8px; }
}

/* Generic row card for mobile lists */
.row-card {
  display: block;
  padding: 12px 14px;
  background: var(--bg-elev-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

@media (hover: hover) {
  .row-card:hover { border-color: var(--accent-line); }
}

.row-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.row-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
}

.row-card-meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.row-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.row-card-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin-top: 6px;
}

/* ============================================================
   Mobile fixes
   ============================================================ */

/* Theme icon toggle — sun visible by default, moon when dark */
.dark .icon-sun { display: none !important; }
.dark .icon-moon { display: inline-block !important; }
.icon-moon { display: none; }

/* Make sure tables inside table-responsive scroll on mobile */
@media (max-width: 767px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Customers page header */
  .page-header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: space-between;
    align-items: center;
  }

  /* Make pagination fit mobile */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-1);
  }

  /* Prevent table cells from being too cramped */
  .table th,
  .table td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs, 12px);
  }

  /* Prevent filter-label from overflowing */
  .filter-label {
    width: 100%;
  }

  /* Modal should take almost full screen on mobile */
  .htmx-modal-container {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 92vh;
  }

  #htmx-modal {
    align-items: flex-end;
  }
}


