/* ══════════════════════════════════════════════════════
   STOCKLENS — app.css  Clean rebuild
══════════════════════════════════════════════════════ */

:root {
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-light:  rgba(37,99,235,0.14);
  --brand-glow:   rgba(37,99,235,0.4);
  --bg:           #0c0d10;
  --surface:      #15161a;
  --surface-2:    #1a1b20;
  --surface-3:    #212227;
  --surface-4:    #2a2b31;
  --surface-card: #17181c;
  --border:       rgba(255,255,255,0.08);
  --border-2:     rgba(255,255,255,0.14);
  --border-3:     rgba(255,255,255,0.2);
  --text:         #f1f1f3;
  --text-muted:   rgba(225,225,230,0.55);
  --text-light:   rgba(225,225,230,0.32);
  --success:      #34d399;
  --success-bg:   rgba(52,211,153,0.13);
  --warning:      #fbbf24;
  --warning-bg:   rgba(251,191,36,0.13);
  --danger:       #f87171;
  --danger-bg:    rgba(248,113,113,0.13);
  --info:         #60a5fa;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.7);
  --radius:    16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --topbar-h:  58px;
  --sidebar-w: 252px;
  --transition: 0.16s ease;
}

/* ══ LIGHT THEME OVERRIDES ════════════════════════════
   Activated via [data-theme="light"] on <html>. ══ */
[data-theme="light"] {
  --brand:        #3b6fd6;
  --brand-dark:   #2f5cc0;
  --brand-light:  rgba(59,111,214,0.08);
  --brand-glow:   rgba(59,111,214,0.18);
  --bg:           #eef0f3;
  --surface:      #f7f8fa;
  --surface-2:    #eef0f3;
  --surface-3:    #e3e6eb;
  --surface-4:    #d6dae1;
  --surface-card: #ffffff;
  --border:       rgba(30,35,45,0.09);
  --border-2:     rgba(30,35,45,0.15);
  --border-3:     rgba(30,35,45,0.22);
  --text:         #262b36;
  --text-muted:   rgba(38,43,54,0.6);
  --text-light:   rgba(38,43,54,0.38);
  --success:      #3a9272;
  --success-bg:   rgba(58,146,114,0.1);
  --warning:      #b8853a;
  --warning-bg:   rgba(184,133,58,0.1);
  --danger:       #c1564f;
  --danger-bg:    rgba(193,86,79,0.08);
  --info:         #3b6fd6;
  --shadow-sm: 0 1px 4px rgba(20,25,35,0.05);
  --shadow-md: 0 4px 16px rgba(20,25,35,0.07);
  --shadow-lg: 0 16px 40px rgba(20,25,35,0.12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(30,35,45,0.16); }
[data-theme="light"] .sidebar { background: #e9ebef; border-right-color: rgba(30,35,45,0.08); }
[data-theme="light"] .nav-item:hover { background: rgba(30,35,45,0.05); }
[data-theme="light"] .topbar { background: rgba(247,248,251,0.92); }
[data-theme="light"] .modal-backdrop { background: rgba(20,30,55,0.45); }
[data-theme="light"] .modal { box-shadow: 0 -8px 30px rgba(40,35,20,0.16), var(--shadow-lg); }

/* ══ LOGIN SCREEN — light theme variant ════════════════ */
[data-theme="light"] .screen-login { background: #eef0f3; }
[data-theme="light"] .login-orb-1 { background: radial-gradient(circle, rgba(59,111,214,0.13) 0%, transparent 65%); }
[data-theme="light"] .login-orb-2 { background: radial-gradient(circle, rgba(99,57,235,0.09) 0%, transparent 65%); }
[data-theme="light"] .login-orb-3 { background: radial-gradient(circle, rgba(16,185,129,0.07) 0%, transparent 65%); }
[data-theme="light"] .login-left { background: linear-gradient(155deg, #eef0f3 0%, #e4e8f0 100%); }
[data-theme="light"] .login-brand-name,
[data-theme="light"] .login-hero-title { color: #1c2336; }
[data-theme="light"] .login-hero-sub,
[data-theme="light"] .login-feature { color: rgba(28,35,54,0.65); }
[data-theme="light"] .lf-powered { color: rgba(28,35,54,0.35); }
[data-theme="light"] .lf-company { color: rgba(28,35,54,0.55); }
[data-theme="light"] .lf-credit { color: rgba(28,35,54,0.28); }
[data-theme="light"] .login-right { background: transparent; }
[data-theme="light"] .login-mobile-hero {
  background: linear-gradient(175deg, rgba(238,240,243,0.98) 0%, rgba(228,232,240,0.92) 60%, rgba(218,224,236,0.75) 100%);
  border-bottom-color: rgba(30,35,45,0.08);
}
[data-theme="light"] .login-mobile-hero::after { background: linear-gradient(to bottom, transparent, #eef0f3); }
[data-theme="light"] .lmh-headline { color: #2b2618; }
[data-theme="light"] .lmh-company,
[data-theme="light"] .lmh-sub { color: rgba(28,35,54,0.55); }
[data-theme="light"] .lmh-chip { background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.18); color: rgba(28,35,54,0.75); }
[data-theme="light"] .login-card-appname,
[data-theme="light"] .login-card-title { color: #2b2618; }
[data-theme="light"] .login-card-company,
[data-theme="light"] .login-card-sub { color: rgba(28,35,54,0.55); }
[data-theme="light"] .lf-label-top { color: rgba(28,35,54,0.55); }
[data-theme="light"] .login-field { background: rgba(30,35,45,0.05); border-color: rgba(30,35,45,0.14); }
[data-theme="light"] .login-field:focus-within { background: rgba(37,99,235,0.06); border-color: rgba(37,99,235,0.5); }
[data-theme="light"] .lf-icon { color: rgba(28,35,54,0.38); }
[data-theme="light"] .login-field:focus-within .lf-icon { color: #2563eb; }
[data-theme="light"] .lf-input { color: #2b2618; }
[data-theme="light"] .lf-input::placeholder { color: rgba(28,35,54,0.3); }
[data-theme="light"] .lf-eye { color: rgba(28,35,54,0.35); }
[data-theme="light"] .lf-eye:hover { color: #2563eb; }
[data-theme="light"] .login-error { color: var(--danger); }
[data-theme="light"] .login-credit-line,
[data-theme="light"] .login-version-line { color: rgba(28,35,54,0.38); }
@media (min-width: 900px) {
  [data-theme="light"] .login-card {
    background: rgba(250,248,242,0.85);
    border-color: rgba(40,35,20,0.1);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.5) inset, 0 32px 80px rgba(40,35,20,0.16);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  height: 100%; -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); font-size: 13px; }

/* ══ SCROLLBARS ════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }

/* ══ BUTTONS ════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 20px; height: 44px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  color: #fff; box-shadow: 0 2px 6px var(--brand-glow);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 3px 10px var(--brand-glow); }
.btn-ghost {
  background: var(--surface-3); color: var(--text);
  border: 1.5px solid var(--border-2);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-4); border-color: var(--border-3); }
.btn-danger {
  background: var(--danger-bg); color: var(--danger);
  border: 1.5px solid var(--danger);
  box-shadow: none;
}
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-success {
  background: var(--success);
  color: #fff; box-shadow: 0 2px 6px var(--success-bg);
}
.btn-success:hover:not(:disabled) { filter: brightness(1.1); }
.btn-sm  { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-xs  { height: 30px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg  { height: 52px; padding: 0 32px; font-size: 16px; border-radius: var(--radius); }
.btn-full { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); cursor: pointer; color: var(--text-muted);
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--surface-4); color: var(--danger); border-color: rgba(248,113,113,0.3); }

/* ══ FORM CONTROLS ═══════════════════════════════════════ */
.input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text);
  background: var(--surface-2);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none; appearance: none;
  -webkit-appearance: none;
}
.input::placeholder { color: var(--text-light); }
.input:focus {
  border-color: rgba(96,165,250,0.65);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.22);
  background: var(--surface-3);
}
textarea.input { resize: vertical; min-height: 72px; line-height: 1.6; }
select.input, .select-sm, select {
  background-color: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(220,220,225,0.5)' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px !important;
  outline: none;
}
select.input:focus, .select-sm:focus, select:focus {
  border-color: rgba(96,165,250,0.65);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.22);
  background-color: var(--surface-3) !important;
}
select option, select optgroup {
  background-color: var(--surface-2) !important;
  color: var(--text) !important;
}
.select-sm { width: auto; padding: 9px 36px 9px 12px; font-size: 13px; height: 38px; }
.input-color { height: 44px; padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; background: var(--surface-2); border: 1.5px solid var(--border-2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; gap: 10px; } }

/* ══ LOGIN SCREEN ════════════════════════════════════════
   Desktop: split left hero + right form card
   Mobile: full-screen with hero header on top
══════════════════════════════════════════════════════ */
.screen-login {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; overflow: hidden;
  background: #07090f;
}
.login-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* ── Orbs ─────────────────────────────────────────── */
.login-orb { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; }
.login-orb-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 65%);
  top: -260px; left: -220px;
  animation: orbFloat1 20s ease-in-out infinite alternate;
}
.login-orb-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(99,57,235,0.15) 0%, transparent 65%);
  bottom: -200px; right: -180px;
  animation: orbFloat2 26s ease-in-out infinite alternate;
}
.login-orb-3 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 65%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: orbFloat3 16s ease-in-out infinite alternate;
}
@keyframes orbFloat1 { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(70px,50px) scale(1.06)} }
@keyframes orbFloat2 { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(-60px,-70px) scale(1.1)} }
@keyframes orbFloat3 { 0%{transform:translate(-50%,-50%) scale(1)} 100%{transform:translate(-47%,-53%) scale(1.12)} }

/* ── Grid texture ──────────────────────────────────── */
.login-grid-lines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 100%);
}

/* ── Desktop left panel ─────────────────────────────── */
.login-left { display: none; }
/* Show left panel on tablets landscape and desktop */
@media (min-width: 700px) {
  .login-left {
    display: flex; flex: 1; position: relative; z-index: 1;
    align-items: center; justify-content: center;
    padding: 40px 40px; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (min-width: 900px) {
  .login-left { padding: 60px 60px; }
}
.login-left-content {
  position: relative; z-index: 1; max-width: 460px;
  width: 100%; margin: auto 0;
  display: flex; flex-direction: column;
  animation: loginLeftIn 0.9s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes loginLeftIn { from{opacity:0;transform:translateX(-50px)} to{opacity:1;transform:none} }

.login-brand-row { display: flex; align-items: center; gap: 16px; margin-bottom: 44px; }
.login-brand-icon {
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(37,99,235,0.7), rgba(99,57,235,0.45));
  border: 1px solid rgba(96,165,250,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 7px rgba(37,99,235,0.07), 0 14px 36px rgba(37,99,235,0.35);
  animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
  0%,100% { box-shadow: 0 0 0 7px rgba(37,99,235,0.07), 0 14px 36px rgba(37,99,235,0.35); }
  50%      { box-shadow: 0 0 0 12px rgba(37,99,235,0.04), 0 18px 44px rgba(37,99,235,0.45); }
}
.login-brand-name { font-size: 1.75rem; font-weight: 900; color: #fff; letter-spacing: -0.035em; }

.login-hero-title {
  font-size: 3rem; font-weight: 900; color: #fff;
  letter-spacing: -0.045em; line-height: 1.1; margin-bottom: 20px;
  min-height: 3.5em;
}
.login-hero-accent {
  display: inline-block;
  background: linear-gradient(100deg, #60a5fa 0%, #a78bfa 40%, #34d399 70%, #60a5fa 100%);
  background-size: 300%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s linear infinite;
}
@keyframes gradientShift { 0%{background-position:0% 50%} 100%{background-position:300% 50%} }

.login-hero-sub {
  font-size: 0.95rem; color: rgba(225,225,230,0.48);
  line-height: 1.75; margin-bottom: 28px; max-width: 380px;
}

/* ── Feature bullets ────────────────────────────── */
.login-features { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.login-feature {
  display: flex; align-items: center; gap: 14px;
  font-size: 13.5px; color: rgba(225,225,230,0.68); font-weight: 500;
  animation: featureIn 0.6s cubic-bezier(0.22,1,0.36,1) both;
}
.login-feature:nth-child(1) { animation-delay: 0.2s; }
.login-feature:nth-child(2) { animation-delay: 0.3s; }
.login-feature:nth-child(3) { animation-delay: 0.4s; }
.login-feature:nth-child(4) { animation-delay: 0.5s; }
@keyframes featureIn { from{opacity:0;transform:translateX(-18px)} to{opacity:1;transform:none} }
.lf-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.15), 0 0 10px rgba(74,222,128,0.55);
  animation: dotPulse 2.5s ease-in-out infinite;
}
.login-feature:nth-child(2) .lf-dot { animation-delay: 0.5s; }
.login-feature:nth-child(3) .lf-dot { animation-delay: 1.0s; }
.login-feature:nth-child(4) .lf-dot { animation-delay: 1.5s; }
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.15), 0 0 10px rgba(74,222,128,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(74,222,128,0.05), 0 0 18px rgba(74,222,128,0.35); }
}

.login-left-brand { display: flex; align-items: center; gap: 6px; }
.lf-powered { font-size:11px; color:rgba(255,255,255,0.22); text-transform:uppercase; letter-spacing:.1em; }
.lf-company { font-size:13px; font-weight:800; color:rgba(255,255,255,0.38); }
.lf-credit { font-size:11px; color:rgba(255,255,255,0.18); font-weight:400; margin-left:4px; }
.lf-credit:not(:empty)::before { content:'·'; margin-right:6px; color:rgba(255,255,255,0.16); }

/* ── Divider — hidden, no border between panels ──── */
.login-divider { display: none; }

/* ── Right panel ─────────────────────────────────── */
.login-right {
  flex: 0 0 100%;
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100%; position: relative; z-index: 1;
  overflow-y: auto; padding: 0;
  background: transparent;
}
@media (min-width: 700px) {
  .login-right {
    flex: 0 0 440px;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    overflow-y: auto;
    background: transparent; /* no box — canvas shows through */
    border: none;
  }
}
@media (min-width: 1100px) {
  .login-right { flex: 0 0 500px; padding: 48px 48px; }
}

/* ── Login card ───────────────────────────────────── */
.login-card {
  width: 100%; max-width: 100%;
  min-height: 100%;
  display: flex; flex-direction: column;
  background: transparent; border: none; border-radius: 0; padding: 0; box-shadow: none;
  animation: loginCardBounce 0.75s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
@keyframes loginCardIn { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:none} }
@media (min-width: 700px) {
  .login-card { min-height: auto; max-width: 380px; width: 100%; }
}

/* ── Mobile hero ─────────────────────────────────── */
.login-mobile-hero {
  position: relative; padding: 40px 28px 36px;
  background: linear-gradient(175deg, rgba(7,9,15,0.99) 0%, rgba(12,14,22,0.92) 60%, rgba(18,20,30,0.72) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07); overflow: hidden;
  flex-shrink: 0;
}
.login-mobile-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 75% at 30% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 30% 40%, black, transparent);
}
.login-mobile-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 72px;
  background: linear-gradient(to bottom, transparent, #07090f); pointer-events: none;
}
@media (min-width: 700px) { .login-mobile-hero { display: none; } }
.lmh-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; position: relative; z-index: 1; }
.lmh-icon {
  width: 66px; height: 66px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(37,99,235,0.75), rgba(99,57,235,0.5));
  border: 1px solid rgba(96,165,250,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 7px rgba(37,99,235,0.1), 0 18px 44px rgba(37,99,235,0.38);
  animation: iconPulse 3s ease-in-out infinite;
}
.lmh-icon img { width: 42px; height: 42px; border-radius: 12px; object-fit: contain; }
.lmh-name { font-size: 2.1rem; font-weight: 900; color: #fff; letter-spacing: -0.04em; line-height: 1; }
.lmh-company { font-size: 12.5px; color: rgba(225,225,230,0.38); font-weight: 500; margin-top: 6px; }
.lmh-headline { font-size: 1.6rem; font-weight: 900; color: #fff; letter-spacing: -0.035em; line-height: 1.2; margin-bottom: 8px; position: relative; z-index: 1; }
.lmh-sub { font-size: 13px; color: rgba(225,225,230,0.48); line-height: 1.6; margin-bottom: 16px; position: relative; z-index: 1; }
/* On very short screens (keyboard open) hide tagline and chips */
@media (max-height: 680px) and (max-width: 899px) {
  .lmh-sub   { display: none; }
  .lmh-chips { display: none; }
  .lmh-top   { margin-bottom: 10px; }
  .login-mobile-hero { padding: 24px 28px 20px; }
}
.lmh-chips { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.lmh-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 20px;
  background: rgba(37,99,235,0.12); border: 1px solid rgba(96,165,250,0.18);
  font-size: 12px; font-weight: 600; color: rgba(180,210,255,0.82);
  backdrop-filter: blur(8px);
  animation: featureIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.lmh-chip:nth-child(1){animation-delay:.1s} .lmh-chip:nth-child(2){animation-delay:.18s}
.lmh-chip:nth-child(3){animation-delay:.26s} .lmh-chip:nth-child(4){animation-delay:.34s}
.lmh-chip:nth-child(5){animation-delay:.42s}
.lmh-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.7); flex-shrink: 0; }

/* ── Form section ────────────────────────────────── */
.login-form-section { flex: 1; padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 0; }
@media (min-width: 700px) { .login-form-section { padding: 0; flex: unset; } }
.login-card-brand { display: none; }
@media (min-width: 700px) {
  .login-card-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
}
.login-card-logo {
  width: 54px; height: 54px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(37,99,235,0.75), rgba(99,57,235,0.5));
  border: 1px solid rgba(96,165,250,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 5px rgba(37,99,235,0.08), 0 12px 32px rgba(37,99,235,0.3);
  animation: iconPulse 3s ease-in-out infinite;
}
.login-card-appname { font-size:1.4rem; font-weight:900; color:#fff; letter-spacing:-0.03em; }
.login-card-company { font-size:12px; color:rgba(225,225,230,0.38); margin-top:3px; font-weight:500; }
.login-card-heading { margin-bottom: 30px; }
.login-card-title { font-size: 1.65rem; font-weight: 900; color: #fff; letter-spacing: -0.03em; margin-bottom: 6px; }
.login-card-sub { font-size: 14px; color: rgba(225,225,230,0.42); line-height: 1.5; }
.lf-group { display: flex; flex-direction: column; gap: 8px; }
.lf-label-top { font-size: 11px; font-weight: 800; color: rgba(200,215,255,0.5); letter-spacing: 0.06em; padding-left: 2px; text-transform: uppercase; }
.login-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.login-field {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.055);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 14px; overflow: hidden;
  transition: border-color .22s, background .22s, box-shadow .22s, transform .14s;
}
.login-field:focus-within {
  border-color: rgba(96,165,250,0.7);
  background: rgba(37,99,235,0.07);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.16), 0 6px 28px rgba(37,99,235,0.12);
  transform: translateY(-2px);
}
.lf-icon { width: 52px; display: flex; align-items: center; justify-content: center; color: rgba(200,200,215,0.3); flex-shrink: 0; transition: color .22s; }
.login-field:focus-within .lf-icon { color: #93c5fd; }
.lf-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 16px; font-weight: 500;
  padding: 18px 14px 18px 0; caret-color: #60a5fa;
}
.lf-input::placeholder { color: rgba(190,190,205,0.25); }
.lf-label { display: none; }
.lf-eye { background: none; border: none; cursor: pointer; color: rgba(190,190,205,0.28); padding: 0 18px; display: flex; align-items: center; transition: color .18s; }
.lf-eye:hover { color: #93c5fd; }

/* Error with shake */
.login-error {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 0;
  background: rgba(220,38,38,0.09); border: 1px solid rgba(248,113,113,0.22);
  border-radius: 12px; font-size: 13px; font-weight: 500; color: #fca5a5;
  animation: shakeError 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shakeError {
  10%,90%  { transform: translateX(-2px); }
  20%,80%  { transform: translateX(3px); }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60%  { transform: translateX(4px); }
}

/* ── Sign In button — premium ─────────────────────── */
.btn-login {
  width: 100%; height: 58px; border: none; border-radius: 16px;
  cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a45d0 0%, #2563eb 55%, #4285f4 100%);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 0.025em;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset,
    0 8px 30px rgba(37,99,235,0.6),
    0 3px 10px rgba(37,99,235,0.35);
  transition: transform .2s cubic-bezier(0.22,1,0.36,1), box-shadow .2s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
/* Shimmer sweep */
.btn-login::before {
  content: ''; position: absolute; top: 0; left: -110%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.22) 50%, transparent 80%);
  transition: left 0.6s ease; pointer-events: none; z-index: 1;
}
.btn-login:hover::before { left: 160%; }
/* Top highlight */
.btn-login::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 55%);
  pointer-events: none; z-index: 0;
}
.btn-login > * { position: relative; z-index: 2; }
.btn-login:hover {
  filter: brightness(1.1);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 -1px 0 rgba(0,0,0,0.2) inset,
    0 16px 48px rgba(37,99,235,0.75),
    0 6px 16px rgba(37,99,235,0.45);
  transform: translateY(-3px) scale(1.005);
}
.btn-login:active { transform: scale(0.98) translateY(0); transition-duration: 0.08s; }
.btn-login:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Loading state — pulse glow */
.btn-login.loading {
  background: linear-gradient(135deg, #1a45d0, #2563eb, #4285f4, #2563eb, #1a45d0);
  background-size: 200% 100%;
  animation: btnLoadingPulse 1.5s ease-in-out infinite;
}
@keyframes btnLoadingPulse {
  0%,100% { background-position: 0% 0%; box-shadow: 0 8px 30px rgba(37,99,235,0.6); }
  50%      { background-position: 100% 0%; box-shadow: 0 8px 44px rgba(37,99,235,0.85); }
}

.login-footer { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; font-size: 12px; color: rgba(255,255,255,0.18); flex-direction: column; }
.login-credit-line { font-size: 12px; color: rgba(225,225,230,0.35); font-weight: 500; }
.login-version-line { font-size: 10.5px; color: rgba(225,225,230,0.18); letter-spacing: 0.04em; }
.mobile-only-credit { display: inline; }
@media (min-width: 900px) { .mobile-only-credit { display: none; } }

/* ══ TOPBAR ════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h); background: rgba(12,13,16,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; padding: 0 12px; gap: 8px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.topbar-menu-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  cursor: pointer; color: var(--text-muted); transition: all var(--transition); flex-shrink: 0;
}
.topbar-menu-btn:hover { background: var(--surface-4); color: var(--text); }
.topbar-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 8px; }
.topbar-brand { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar-brand-icon { flex-shrink: 0; opacity: 0.85; }
.topbar-title { font-size: 1rem; font-weight: 900; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .topbar-title { font-size: 0.9rem; } }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.topbar-user-pill {
  display: none; align-items: center; gap: 8px;
  background: var(--surface-3); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 4px 12px 4px 4px;
}
@media (min-width: 600px) { .topbar-user-pill { display: flex; } }
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #2563eb, #60a5fa);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0;
  cursor: pointer;
}
.topbar-avatar-mobile {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, #2563eb, #60a5fa);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
  cursor: pointer;
}
@media (min-width: 600px) { .topbar-avatar-mobile { display: none; } }
.topbar-user { font-size: 13px; font-weight: 600; color: var(--text-muted); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 8px rgba(52,211,153,0.7);
}
.conn-dot.offline { background: var(--danger); box-shadow: 0 0 8px rgba(248,113,113,0.7); }
.btn-signout {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); padding: 0 12px; height: 36px;
  color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
}
.btn-signout:hover { color: var(--danger); border-color: rgba(248,113,113,0.4); background: var(--danger-bg); }
.signout-label { display: none; }
@media (min-width: 600px) { .signout-label { display: inline; } }

/* ══ LAYOUT ════════════════════════════════════════════ */
.app { display: flex; flex-direction: column; height: 100%; }
.layout {
  display: flex;
  height: calc(100dvh - var(--topbar-h));
  height: calc(100vh - var(--topbar-h));
  margin-top: var(--topbar-h);
  position: relative; overflow: hidden;
}

/* ══ SIDEBAR ════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  position: fixed; left: 0; top: var(--topbar-h);
  height: calc(100dvh - var(--topbar-h));
  height: calc(100vh - var(--topbar-h));
  z-index: 80;
  transform: translateX(-100%) translateZ(0);
  -webkit-transform: translateX(-100%) translateZ(0);
  will-change: transform;
}
@media (min-width: 900px) { .sidebar { position: relative; top: auto; transform: none !important; z-index: auto; } }
.sidebar.open { transform: translateX(0) translateZ(0) !important; -webkit-transform: translateX(0) translateZ(0) !important; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 79;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
}
.sidebar.open ~ .sidebar-overlay { display: block; }
@media (min-width: 900px) { .sidebar-overlay { display: none !important; } }
.sidebar-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: scroll; overflow-x: hidden;
  padding: 14px 10px;
  padding-bottom: max(90px, calc(env(safe-area-inset-bottom) + 70px));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; touch-action: pan-y; position: relative;
}
.nav-section { margin-bottom: 8px; }
.nav-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); padding: 10px 12px 5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-xs);
  cursor: pointer; color: var(--text-muted);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition); position: relative;
  text-decoration: none; margin-bottom: 1px;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--brand-light); color: var(--brand);
  border-left: 3px solid var(--brand); padding-left: 9px;
}
.nav-icon { display: flex; align-items: center; flex-shrink: 0; opacity: 0.65; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 6px; border-radius: 10px; margin-left: auto;
}
.sidebar-footer {
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-version-text { font-size: 11px; color: var(--text-light); }

/* ══ MAIN CONTENT ════════════════════════════════════════ */
.main {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 16px 14px 100px; min-width: 0;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
@media (min-width: 600px) { .main { padding: 22px 22px 80px; } }
@media (min-width: 900px) { .main { padding: 28px 32px 60px; } }
.view { animation: viewIn 0.22s ease both; }
@keyframes viewIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.view-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.view-title { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.02em; color: var(--text); }
.view-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.view-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* ══ SESSION BANNER ══════════════════════════════════════ */
.session-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(59,130,246,0.1));
  border: 1px solid rgba(96,165,250,0.3); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.session-banner-info { display: flex; align-items: center; gap: 10px; }
.session-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,0.7); flex-shrink: 0; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }
.session-banner-name { font-weight: 700; font-size: 14px; color: var(--text); }
.session-banner-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* ══ STATS ROW ════════════════════════════════════════════ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat-pill {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: all var(--transition);
}
.stat-pill:hover { background: var(--surface-3); border-color: var(--border-2); }
.stat-icon { opacity: 0.5; }
.stat-val { font-size: 1.3rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; text-align: center; }
.value-pill .stat-val { color: var(--success); font-size: 1rem; }
.last-pill .stat-val { font-size: 0.85rem; color: var(--info); }

/* ══ POINTS BANNER ════════════════════════════════════════ */
.points-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.07));
  border: 1px solid rgba(251,191,36,0.3); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap;
}
.points-banner-left { display: flex; align-items: center; gap: 12px; }
.points-flame { font-size: 1.6rem; }
.points-title { font-weight: 700; font-size: 14px; color: var(--warning); }
.points-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.points-right { text-align: right; }
.points-score-wrap { display: flex; align-items: baseline; gap: 4px; }
.points-score { font-size: 1.8rem; font-weight: 900; color: var(--warning); }
.points-label { font-size: 14px; font-weight: 700; color: var(--warning); opacity: 0.7; }
.points-ghc-value { font-size: 12px; color: var(--success); font-weight: 600; }
.points-items-counted { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ══ TOOLBAR ══════════════════════════════════════════════ */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; color: var(--text-light); pointer-events: none; flex-shrink: 0; }
.search-input {
  padding: 9px 12px 9px 38px; height: 38px;
  background: var(--surface-2); border: 1.5px solid var(--border-2);
  border-radius: var(--radius-xs); color: var(--text); font-size: 14px;
  outline: none; width: 200px; transition: all var(--transition);
}
.search-input:focus { border-color: rgba(96,165,250,0.5); width: 240px; background: var(--surface-3); }
.search-input::placeholder { color: var(--text-light); }

/* ══ ENTRY LIST ════════════════════════════════════════════ */
.entries-container { display: flex; flex-direction: column; gap: 8px; padding-bottom: 80px; }
.entry-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  transition: all var(--transition); position: relative; cursor: pointer;
}
.entry-card:hover { border-color: var(--border-2); background: var(--surface-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.entry-card:active { transform: scale(0.99); }
.entry-thumb-wrap { flex-shrink: 0; }
.entry-thumb { width: 48px; height: 48px; border-radius: var(--radius-xs); object-fit: cover; border: 1px solid var(--border); }
.entry-no-photo {
  width: 48px; height: 48px; border-radius: var(--radius-xs);
  background: var(--surface-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-light);
}
.entry-info { flex: 1; min-width: 0; }
.entry-item-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
.entry-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.entry-zone-badge { background: var(--surface-3); border: 1px solid var(--border-2); padding: 1px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; color: var(--info); }
.entry-qty { flex-shrink: 0; text-align: right; }
.entry-qty-val { font-size: 1.3rem; font-weight: 900; color: var(--text); line-height: 1; }
.entry-qty-unit { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.entry-actions { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 4px; }
.entry-card:hover .entry-actions { display: flex; }
.entry-value-badge { font-size: 11px; color: var(--success); font-weight: 700; }

/* ══ EMPTY STATE ══════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center; color: var(--text-muted); gap: 10px;
}
.empty-icon-wrap { opacity: 0.3; margin-bottom: 6px; }
.empty-state p { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.empty-sub { font-size: 13px; color: var(--text-light) !important; }

/* ══ MODALS ════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  z-index: 200;
  background: rgba(0,5,15,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: backdropIn 0.2s ease;
  /* Use overflow hidden so modal slides up from bottom */
  overflow: hidden;
}
@keyframes backdropIn { from{opacity:0} to{opacity:1} }
.modal {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface-card);
  border: 1px solid var(--border-2);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.6);
  animation: modalSlideUp 0.28s cubic-bezier(0.22,1,0.36,1);
  overflow: hidden;
  /* Prevent content overflow on mobile */
  box-sizing: border-box;
}
@keyframes modalSlideUp { from{transform:translateY(60px);opacity:0} to{transform:none;opacity:1} }

/* Tablet and desktop — centred popup */
@media (min-width: 600px) {
  .modal-backdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
  }
  .modal {
    position: relative;
    left: auto; right: auto; bottom: auto;
    border-radius: 18px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    animation: modalPop 0.22s cubic-bezier(0.22,1,0.36,1);
  }
  .modal-lg  { max-width: 680px; }
  .modal-xl  { max-width: 840px; }
  @keyframes modalPop { from{transform:scale(0.96);opacity:0} to{transform:none;opacity:1} }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 14px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px; position: sticky; top: 0; z-index: 10;
  background: var(--surface-card);
}
.modal-head h3 { font-size: 1rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.modal-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; color: var(--text-muted); transition: all var(--transition); flex-shrink: 0;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: rgba(248,113,113,0.4); }
.modal-body {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 16px 18px 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--border); flex-shrink: 0;
}

/* ══ ENTRY SECTIONS (in modals) ══════════════════════════ */
.entry-section {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.entry-section-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 2px; }

/* ══ ITEM SEARCH SUGGESTIONS ══════════════════════════════ */
.item-search-wrap { position: relative; }
.item-suggestions {
  position: fixed;
  z-index: 99999;
  background: var(--surface-card); border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4);
  max-height: 240px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none; max-width: calc(100vw - 32px);
}
.item-suggestions.open { display: block; }
.suggestion-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  transition: background var(--transition); border-bottom: 1px solid var(--border);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--surface-3); }
.sug-thumb { width: 36px; height: 36px; border-radius: var(--radius-xs); object-fit: cover; flex-shrink: 0; }
.sug-no-thumb { width: 36px; height: 36px; border-radius: var(--radius-xs); background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--text-light); flex-shrink: 0; }
.sug-info { min-width: 0; }
.sug-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ══ QUANTITY CONTROLS ════════════════════════════════════ */
.qty-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qty-btn {
  width: 46px; height: 46px; border-radius: var(--radius-xs);
  background: var(--surface-3); border: 1.5px solid var(--border-2);
  color: var(--text); font-size: 1.3rem; font-weight: 300; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition); flex-shrink: 0;
}
.qty-btn:hover { background: var(--brand-light); border-color: rgba(96,165,250,0.4); color: var(--brand); }
.qty-btn:active { transform: scale(0.9); }
.qty-input {
  width: 110px; text-align: center; font-size: 1.6rem; font-weight: 800;
  padding: 10px; background: var(--surface-3); border: 2px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text); outline: none;
  transition: border-color var(--transition);
}
.qty-input:focus { border-color: rgba(96,165,250,0.6); }
.qty-unit { font-size: 14px; font-weight: 700; color: var(--text-muted); }

/* ══ PHOTO UPLOAD ZONES ════════════════════════════════════ */
.photo-btn-zone { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-zone-btn { flex: 1; min-width: 120px; }
.photo-drop {
  border: 2px dashed var(--border-2); border-radius: var(--radius-sm);
  padding: 24px 16px; text-align: center; cursor: pointer;
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  transition: all var(--transition); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.photo-drop:hover { border-color: rgba(96,165,250,0.45); background: var(--brand-light); color: var(--text); }
.photo-drop.drag-over { border-color: var(--brand); background: var(--brand-light); }
.photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-preview-item { position: relative; }
.photo-preview-img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-xs); border: 1.5px solid var(--border-2); image-orientation: from-image; }
.photo-remove-btn {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  background: var(--danger); border: 2px solid var(--bg); border-radius: 50%;
  color: #fff; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.so-slip-preview { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.so-slip-img { max-height: 140px; max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border-2); object-fit: contain; image-orientation: from-image; }

/* ══ CATALOGUE GRID ════════════════════════════════════════ */
.catalogue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding-bottom: 80px; }
@media (min-width: 600px) { .catalogue-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
.catalogue-card {
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all var(--transition); cursor: pointer; display: flex; flex-direction: column;
}
.catalogue-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cc-photo-wrap { aspect-ratio: 1; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 2.5rem; }
.cc-photo { width: 100%; height: 100%; object-fit: cover; }
.cc-no-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--surface-2), var(--surface-3)); color: var(--text-light); }
.cc-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cc-name { font-weight: 700; font-size: 13px; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-meta { font-size: 11px; color: var(--text-muted); }
.cc-cost { font-size: 12px; color: var(--success); font-weight: 700; margin-top: 2px; }
.cc-no-cost { font-size: 11px; color: var(--text-light); font-style: italic; }
.cc-actions { display: flex; gap: 6px; padding: 0 12px 12px; }
.cc-actions .btn { flex: 1; height: 34px; font-size: 12px; }

/* ══ SELECTED ITEM CARD ════════════════════════════════════ */
.selected-item-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--success-bg); border: 1.5px solid rgba(52,211,153,0.3);
  border-radius: var(--radius-sm); padding: 10px 14px; animation: slideIn 0.2s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:none} }
.selected-item-thumb-wrap { flex-shrink: 0; }
.selected-item-thumb { width: 44px; height: 44px; border-radius: var(--radius-xs); object-fit: cover; }
.selected-item-no-photo { width: 44px; height: 44px; border-radius: var(--radius-xs); background: var(--surface-3); display: flex; align-items: center; justify-content: center; }
.selected-item-info { flex: 1; min-width: 0; }
.selected-item-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-item-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.dup-warning { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--warning-bg); border: 1.5px solid rgba(251,191,36,0.3); border-radius: var(--radius-xs); font-size: 13px; color: var(--warning); }
.dup-icon { flex-shrink: 0; }

/* ══ INLINE ITEM CREATE ════════════════════════════════════ */
.inline-create { background: var(--surface-3); border: 1.5px dashed rgba(96,165,250,0.35); border-radius: var(--radius-sm); padding: 16px; margin-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.inline-create-title { font-size: 12px; font-weight: 800; color: var(--info); text-transform: uppercase; letter-spacing: .07em; }
.cost-input-wrap { display: flex; gap: 8px; align-items: center; }
.cost-curr-select { width: auto; flex-shrink: 0; font-size: 13px; padding: 10px 28px 10px 10px; }
.cost-input { flex: 1; }

/* ══ SESSIONS / CARDS GRID ════════════════════════════════ */
.cards-grid { display: flex; flex-direction: column; gap: 10px; padding-bottom: 80px; }
.session-card {
  background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--transition), background var(--transition);
}
.session-card:hover { border-color: var(--border-2); }
.session-card.current-session { border-color: rgba(37,99,235,0.5); background: rgba(37,99,235,0.05); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.sc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sc-top-left { min-width: 0; flex: 1; }
.sc-name { font-size: 15px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.sc-active-pill { font-size: 10px; font-weight: 800; padding: 1px 7px; background: var(--brand-light); color: var(--brand); border: 1px solid var(--brand-light); border-radius: 10px; letter-spacing: .04em; flex-shrink: 0; }
.sc-location { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.sc-stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-xs); overflow: hidden; }
.sc-stat { flex: 1; padding: 10px 12px; background: var(--surface-2); text-align: center; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.sc-stat:last-child { border-right: none; }
.sc-stat-val { display: block; font-size: 1.1rem; font-weight: 800; color: var(--text); line-height: 1; }
.sc-stat-lbl { display: block; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; line-height: 1; }
.sc-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.badge-active { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52,211,153,0.3); }
.badge-completed { background: var(--surface-3); color: var(--text-light); border: 1px solid var(--border); }
.sc-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-btn { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-xs); border: 1.5px solid transparent; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transition: all var(--transition); }
.sc-btn-primary { background: var(--brand-light); color: var(--brand); border-color: var(--brand-light); }
.sc-btn-primary:hover { background: var(--brand-light); filter: brightness(1.1); border-color: var(--brand); }
.sc-btn-success { background: var(--success-bg); color: var(--success); border-color: var(--success-bg); }
.sc-btn-success:hover { filter: brightness(0.95); }
.sc-btn-ghost { background: var(--surface-3); color: var(--text-muted); border-color: var(--border-2); }
.sc-btn-ghost:hover { background: var(--surface-4); color: var(--text); }
.sc-btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bg); }
.sc-btn-danger:hover { filter: brightness(0.95); }

/* ══ SETTINGS CARDS ════════════════════════════════════════ */
.settings-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.settings-card h3 { font-size: 14px; font-weight: 800; color: var(--text); }
.logo-upload-row { display: flex; align-items: center; gap: 12px; }
.logo-preview { width: 52px; height: 52px; border-radius: var(--radius-xs); object-fit: contain; border: 1px solid var(--border-2); }

/* ══ TABLES ════════════════════════════════════════════════ */
.summary-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.detail-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--surface-3); }
th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.025); }
tfoot td { background: var(--surface-3); font-weight: 700; }
.bal-ok   { color: var(--success); }
.bal-low  { color: var(--warning); }
.bal-zero { color: var(--danger); }

/* ══ SO / OPERATIONS CARDS ════════════════════════════════ */
.so-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 80px; }
.so-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; transition: all var(--transition);
}
.so-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.so-card-left { flex-shrink: 0; }
.so-slip-thumb { width: 52px; height: 52px; border-radius: var(--radius-xs); object-fit: cover; cursor: zoom-in; border: 1px solid var(--border-2); image-orientation: from-image; }
.so-no-slip { width: 52px; height: 52px; border-radius: var(--radius-xs); background: var(--surface-3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.so-card-body { flex: 1; min-width: 0; }
.so-item-name { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.so-qty-badge { padding: 2px 9px; border-radius: 20px; font-weight: 700; font-size: 12px; background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.3); }
.so-location { color: var(--text-muted); font-size: 12px; }
.so-footer-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.so-delete { align-self: flex-start; flex-shrink: 0; }
.xfer-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.so-balance-info { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 10px; font-size: 13px; }
.so-balance-row { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-muted); align-items: center; }
.so-balance-item { display: flex; align-items: baseline; gap: 5px; font-size: 13px; }
.so-balance-item span { color: var(--text-muted); font-size: 12px; }
.so-balance-item strong { color: var(--text); font-size: 15px; font-weight: 800; }

/* ══ LEADERBOARD ═══════════════════════════════════════════ */
.my-score-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(96,165,250,0.1));
  border: 1px solid rgba(96,165,250,0.3); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px;
}
.msc-left { display: flex; align-items: center; gap: 12px; }
.msc-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, #2563eb, #60a5fa); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: #fff; flex-shrink: 0; }
.msc-name { font-weight: 800; font-size: 16px; }
.msc-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.msc-right { text-align: right; }
.msc-pts { font-size: 1.5rem; font-weight: 900; color: var(--info); }
.msc-items { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.lb-settings-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.lb-settings-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.lb-settings-input { width: 80px; padding: 6px 10px; background: var(--surface-3); border: 1.5px solid var(--border-2); border-radius: var(--radius-xs); color: var(--text); font-size: 13px; outline: none; text-align: center; }
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; transition: all var(--transition); flex-wrap: wrap; }
.lb-top3 { background: rgba(37,99,235,0.08); }
.lb-rank { width: 28px; font-size: 1.1rem; text-align: center; flex-shrink: 0; }
.lb-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; flex-shrink: 0; }
.lb-info { flex: 1; min-width: 120px; overflow: hidden; }
.lb-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lb-score-col { text-align: right; flex-shrink: 0; min-width: 70px; }
.lb-pts { font-size: 1rem; font-weight: 800; color: var(--info); white-space: nowrap; }
.lb-value { font-size: 11px; color: var(--success); margin-top: 1px; font-weight: 600; white-space: nowrap; }
.lb-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
/* On small screens stack score+actions on second line */
@media (max-width: 420px) {
  .lb-score-col { order: 3; }
  .lb-actions { order: 4; }
  .lb-info { flex: 1 1 100%; order: 2; }
  .lb-rank { order: 0; }
  .lb-avatar { order: 1; }
}
.lb-pay-btn { background: var(--success-bg); color: var(--success); border-color: var(--success-bg); }
.lb-pay-btn:hover { filter: brightness(0.95); }
.lb-del-btn { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bg); }
.lb-del-btn:hover { filter: brightness(0.95); }

/* ══ TRANSFER SHEET ════════════════════════════════════════ */
.ts-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; gap: 10px; }
.ts-doc-title { font-size: 1rem; font-weight: 900; color: var(--text); letter-spacing: 0.04em; }
.ts-ref { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ts-status-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ts-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 14px; }
.ts-meta-item { display: flex; flex-direction: column; gap: 2px; }
.ts-meta-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.ts-items-table { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.ts-table-head { display: grid; grid-template-columns: 1fr 80px 80px 65px; background: var(--surface-3); padding: 8px 12px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); gap: 6px; }
.ts-table-row { display: grid; grid-template-columns: 1fr 80px 80px 65px; padding: 10px 12px; border-top: 1px solid var(--border); align-items: center; gap: 6px; font-size: 13px; }
.ts-table-row:hover { background: rgba(255,255,255,0.02); }
.ts-item-cell { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.ts-item-thumb { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.ts-item-thumb-placeholder { width: 30px; height: 30px; border-radius: 6px; background: var(--surface-3); flex-shrink: 0; }
.ts-receive-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 12px; background: rgba(37,99,235,0.09); border-top: 1px solid rgba(37,99,235,0.2); }
.ts-recv-input { width: 90px; padding: 7px 10px; background: var(--surface-3); border: 2px solid rgba(96,165,250,0.6); border-radius: var(--radius-xs); color: var(--text); font-size: 16px; font-weight: 800; text-align: center; outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.ts-recv-input:focus { border-color: var(--info); box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }
@media (max-width: 520px) {
  .ts-table-head, .ts-table-row { grid-template-columns: 1fr 70px 70px; }
  .ts-table-head > *:last-child, .ts-table-row > *:last-child { display: none; }
}

/* ══ BASKET LINE ITEMS ════════════════════════════════════ */
.xfer-line-items { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.xfer-empty-items { text-align: center; padding: 18px; color: var(--text-light); font-size: 13px; border: 2px dashed var(--border); border-radius: var(--radius-sm); margin-top: 8px; }
.xfer-line-row {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 8px 10px; align-items: center;
}
.xfer-line-row.xfer-line-warning { border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.05); }
.xfer-line-left { display: flex; align-items: center; gap: 10px; min-width: 0; grid-column: 1; grid-row: 1; }
.xfer-line-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: var(--radius-xs); flex-shrink: 0; }
.xfer-line-no-thumb { width: 36px; height: 36px; border-radius: var(--radius-xs); background: var(--surface-3); flex-shrink: 0; }
.xfer-line-info { min-width: 0; flex: 1; }
.xfer-line-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.xfer-line-bal { font-size: 11px; margin-top: 2px; color: var(--text-muted); }
.xfer-line-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; grid-column: 2; grid-row: 1; min-width: 0; }
.xfer-qty-inline { display: flex; align-items: center; gap: 4px; }
.xfer-qty-inline .qty-btn { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 8px; flex-shrink: 0; }
.xfer-qty-inline .qty-input { width: 60px; min-width: 0; font-size: 1rem; padding: 6px 4px; text-align: center; height: 34px; }
.xfer-qty-inline .qty-unit { font-size: 12px; color: var(--text-muted); min-width: 28px; }
.xfer-bal-warn { grid-column: 1 / -1; grid-row: 2; font-size: 12px; color: var(--warning); display: flex; align-items: center; gap: 5px; }

/* ══ MOVEMENT FILTERS ══════════════════════════════════════ */
.mv-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mv-date-input { width: auto; min-width: 140px; flex: 1; padding: 9px 12px; height: 38px; font-size: 13px; }

/* ══ IMPORT ════════════════════════════════════════════════ */
.import-step-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--info); margin-bottom: 4px; }
.import-instructions { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.import-instructions code { background: var(--surface-3); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--info); }
.import-preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.import-table-wrap { overflow-x: auto; max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.import-result-box { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; }
.import-result-box.success { background: var(--success-bg); border: 1px solid rgba(52,211,153,0.3); color: var(--success); }

/* ══ CURR BADGES ═══════════════════════════════════════════ */
.curr-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 800; }
.curr-USD { background: var(--brand-light); color: var(--info); }
.curr-GHC { background: var(--success-bg); color: var(--success); }

/* ══ TOAST NOTIFICATIONS ═══════════════════════════════════ */
.toast-stack { position: fixed; bottom: 20px; right: 16px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; max-width: 360px;
  box-shadow: var(--shadow-lg); animation: toastIn 0.28s cubic-bezier(0.22,1,0.36,1);
  backdrop-filter: blur(12px); border: 1px solid transparent;
}
@keyframes toastIn { from{opacity:0;transform:translateY(20px) scale(0.95)} to{opacity:1;transform:none} }
.toast.success { background: rgba(5,100,60,0.95); border-color: rgba(52,211,153,0.4); color: #d1fae5; }
.toast.error   { background: rgba(120,15,15,0.95); border-color: rgba(248,113,113,0.4); color: #fee2e2; }
.toast.warning { background: rgba(100,70,0,0.95);  border-color: rgba(251,191,36,0.4); color: #fef3c7; }
.toast.info    { background: rgba(10,40,100,0.95); border-color: rgba(96,165,250,0.4); color: #dbeafe; }

/* ══ LIGHTBOX ══════════════════════════════════════════════ */
.lightbox-backdrop { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox-img { max-width: 100%; max-height: 90vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); object-fit: contain; image-orientation: from-image; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.2); border-radius: 50%; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* ══ LOCATION / USER CARDS ════════════════════════════════ */
.loc-card, .user-card {
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  transition: all var(--transition);
}
.loc-card:hover, .user-card:hover { border-color: var(--border-2); background: var(--surface-2); }
.lc-left, .uc-left { flex: 1; min-width: 0; }
.lc-name, .uc-name { font-weight: 700; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-actions, .uc-actions {
  display: flex; flex-direction: row; gap: 8px;
  flex-shrink: 0; align-items: center;
}
/* On very narrow screens, keep buttons side by side but smaller */
@media (max-width: 400px) {
  .lc-actions .btn, .uc-actions .btn { padding: 6px 10px; font-size: 12px; }
  .lc-actions .btn svg, .uc-actions .btn svg { display: none; }
}

/* ══ REPORT BUTTONS ════════════════════════════════════════ */
.report-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.report-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  background: var(--surface-3); border: 1.5px solid var(--border-2);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
}
.report-chip:hover { background: var(--brand-light); border-color: rgba(96,165,250,0.4); color: var(--info); }
.report-chip.active { background: var(--brand-light); border-color: rgba(96,165,250,0.5); color: var(--brand); }

/* ══ MOBILE TWEAKS ═════════════════════════════════════════ */
@media (max-width: 600px) {
  .modal .field-row { grid-template-columns: 1fr; gap: 10px; }
  .entry-section { padding: 12px; }
  .view-header { flex-direction: column; gap: 12px; align-items: stretch; }
  .view-header-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .view-header-actions select.select-sm { flex: 1; min-width: 120px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left { flex-direction: column; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }
  .catalogue-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* modal-foot stays horizontal on mobile — never stack */
  .modal-foot { flex-direction: row; flex-wrap: nowrap; }
  .modal-foot .btn { justify-content: center; }
}

/* ══ MISC UTILITY ══════════════════════════════════════════ */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.9em; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }

/* ══ RAPID COUNT MODE ══════════════════════════════════════ */
.rapid-mode-toggle { display: flex; align-items: center; gap: 6px; background: var(--surface-3); border: 1.5px solid var(--border-2); border-radius: 20px; padding: 4px 12px 4px 8px; cursor: pointer; }
.rapid-mode-toggle input[type="checkbox"] { display: none; }
.rapid-mode-label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; user-select: none; }
.rapid-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-4); flex-shrink: 0; transition: background var(--transition); }
.rapid-mode-toggle.active .rapid-dot { background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,0.6); }
.rapid-mode-toggle.active .rapid-mode-label { color: var(--text); }
.rapid-counter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 9px 18px;
  background: linear-gradient(135deg, rgba(20,40,120,0.95), rgba(14,28,90,0.95));
  border-bottom: 1px solid rgba(37,99,235,0.25);
  font-size: 13px; font-weight: 600; flex-shrink: 0;
  position: sticky; top: 0; z-index: 9;
}
.rcb-zone-label { color: rgba(200,215,255,0.6); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.rcb-zone-input {
  width: 80px; padding: 6px 10px; background: rgba(255,255,255,0.08);
  border: 2px solid rgba(96,165,250,0.45); border-radius: var(--radius-xs);
  color: #fff; font-size: 13px; outline: none; text-align: center; font-weight: 700;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.rcb-zone-input:focus { border-color: var(--info); box-shadow: 0 0 0 3px rgba(37,99,235,0.3); }
.rcb-total { margin-left: auto; color: rgba(200,215,255,0.7); font-size: 12px; }
.rcb-total strong { color: #fff; font-size: 14px; }

/* ══ SYNC BUTTON & TOAST ═══════════════════════════════════ */
.btn-sync { background: var(--surface-3); border: 1.5px solid var(--border-2); border-radius: var(--radius-xs); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: all var(--transition); }
.btn-sync:hover { background: var(--brand-light); color: var(--info); border-color: rgba(96,165,250,0.4); }
.sync-badge { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%); background: rgba(15,25,60,0.95); border: 1px solid rgba(96,165,250,0.35); border-radius: 20px; padding: 6px 16px; font-size: 12px; font-weight: 700; color: rgba(180,210,255,0.85); font-size: 12px; font-weight: 600; z-index: 8999; pointer-events: none; animation: syncBadgeIn 0.3s ease; }
@keyframes syncBadgeIn { from{opacity:0;transform:translateX(-50%) translateY(10px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ══ BASKET ITEM ROW — clean 2-row card ════════════════════ */
.bir-list { display: flex; flex-direction: column; gap: 8px; }
.bir-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.bir-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.bir-thumb { width: 36px; height: 36px; border-radius: var(--radius-xs); object-fit: cover; flex-shrink: 0; }
.bir-no-thumb { width: 36px; height: 36px; border-radius: var(--radius-xs); background: var(--surface-3); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bir-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.bir-remove { margin-left: auto; flex-shrink: 0; }
.bir-bottom { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; border-top: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.bir-bal { font-size: 11px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.bir-btn { height: 34px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-xs); border: 1.5px solid var(--border-2); background: var(--surface-3); color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.bir-btn:hover { background: var(--brand-light); color: var(--info); border-color: rgba(96,165,250,0.4); }

/* ══ DETAIL TABLE ══════════════════════════════════════════ */
.detail-section-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 6px; }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 16px; }
.detail-meta-item { display: flex; flex-direction: column; gap: 2px; }
.detail-meta-label { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 700; }
.detail-meta-val { font-size: 14px; font-weight: 700; color: var(--text); }

/* ══ WAYBILL SHEET MODAL — proper scroll layout ═══════════ */
#wbSheetModal .modal { max-height: 92vh; }
#wbSheetModal .modal-body { padding: 0; gap: 0; }
.wb-sheet-photos { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.wb-sheet-photo-item { position: relative; }
.wb-photo-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.wb-sheet-thumb { width: 80px; height: 80px; border-radius: var(--radius-xs); object-fit: cover; cursor: zoom-in; border: 1px solid var(--border-2); image-orientation: from-image; }

/* ══ TOGGLE SWITCH ═════════════════════════════════════════ */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--surface-4); border-radius: 24px; transition: .2s; }
.toggle-slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: var(--text-muted); border-radius: 50%; transition: .2s; }
input:checked + .toggle-slider { background: var(--brand); }
input:checked + .toggle-slider:before { transform: translateX(20px); background: #fff; }
.toggle-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* ══ STOCK BALANCE — clickable rows ═══════════════════════ */
.balance-row-clickable { cursor: pointer; transition: background var(--transition); }
.balance-row-clickable:hover td { background: rgba(96,165,250,0.06); }
.movement-row-clickable { cursor: pointer; transition: background var(--transition); }
.movement-row-clickable:hover td { background: rgba(96,165,250,0.06); }

/* ══ DATE RANGE FILTER ROW ════════════════════════════════ */
.date-range-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.date-range-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 130px; }
.date-range-row label { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0; }
.date-range-input { width: 100%; min-width: 0; padding: 8px 10px; height: 38px; font-size: 13px; }
@media (max-width: 480px) {
  .date-range-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .date-range-field { width: 100%; }
  .date-range-row > .btn { width: 100%; margin-top: 2px; }
}
.date-filter-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 6px 2px; margin-bottom: 10px; -webkit-tap-highlight-color: transparent; transition: color var(--transition); }
.date-filter-toggle:hover, .date-filter-toggle.date-filter-toggle-active { color: var(--brand); }

/* ══ LEADERBOARD ROW ACTIONS ══════════════════════════════ */
.lb-row-actions { display: flex; gap: 6px; margin-left: auto; }
.lb-action-btn { height: 30px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; border: 1.5px solid transparent; transition: all var(--transition); }

/* ══ STOCK ADJUSTMENT ══════════════════════════════════════ */
.adj-dir-toggle { display: flex; gap: 8px; }
.adj-dir-btn { flex: 1; height: 44px; border-radius: var(--radius-xs); border: 1.5px solid var(--border-2); background: var(--surface-3); color: var(--text-muted); cursor: pointer; font-size: 14px; font-weight: 700; transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px; }
.adj-dir-btn.active.increase { background: var(--success-bg); color: var(--success); border-color: rgba(52,211,153,0.4); }
.adj-dir-btn.active.decrease { background: var(--danger-bg); color: var(--danger); border-color: rgba(248,113,113,0.4); }

/* ══ MOVEMENT — clickable rows ════════════════════════════ */
.movement-row-clickable { cursor: pointer; }
.movement-row-clickable:hover td { background: rgba(96,165,250,0.06); }

/* ══ REPORT CARDS — fixed layout, no overflow ═══════════ */
.report-card { margin-bottom: 0 !important; cursor: pointer; display: flex; flex-direction: column; gap: 12px; }
.report-card-head { display: flex; align-items: center; gap: 12px; }
.report-card-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 1.5px solid; display: flex; align-items: center; justify-content: center; }
.report-card-title { font-weight: 800; font-size: 14px; color: var(--text); }
.report-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.report-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.report-card-row .btn { width: 100%; min-width: 0; padding: 0 8px; }
.btn-full { width: 100%; }

/* ══ DASHBOARD ════════════════════════════════════════════ */
.dash-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dash-stat-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.dash-stat-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.dash-stat-val { font-size: 1.5rem; font-weight: 900; color: var(--text); line-height: 1; }
.dash-stat-lbl { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.dash-panel { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dash-panel-head { display: flex; align-items: center; gap: 8px; }
.dash-panel-head h3 { font-size: 14px; font-weight: 800; color: var(--text); }
.dash-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.dash-list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); cursor: pointer; transition: all var(--transition); font-size: 13px; }
.dash-list-row:hover { background: var(--surface-3); border-color: var(--border-2); }
.dash-list-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dash-list-time { font-size: 11px; color: var(--text-light); white-space: nowrap; flex-shrink: 0; }
.dash-list-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }
.dash-badge-warning { background: var(--warning-bg); color: var(--warning); }
.dash-badge-danger  { background: var(--danger-bg); color: var(--danger); }
.dash-empty { font-size: 13px; color: var(--text-light); padding: 16px 0; text-align: center; }
@media (max-width: 600px) {
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ══ DASHBOARD — clickable currency toggle card ════════════ */
.dash-stat-clickable { cursor: pointer; transition: all var(--transition); user-select: none; -webkit-tap-highlight-color: transparent; }
.dash-stat-clickable:hover { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.04); }
.dash-stat-clickable:active { transform: scale(0.97); }
@keyframes dashStatFlash { 0%{background:rgba(52,211,153,0.18)} 100%{background:transparent} }
.dash-stat-flash { animation: dashStatFlash 0.3s ease; }

/* ══ THEME TOGGLE — Settings appearance card ════════════════ */
.theme-toggle-row { display: flex; gap: 14px; flex-wrap: wrap; }
.theme-option-btn { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; background: var(--surface-2); border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all var(--transition); width: 140px; }
.theme-option-btn:hover { border-color: var(--border-2); }
.theme-option-btn.theme-active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.theme-preview { width: 100%; height: 76px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.15); overflow: hidden; position: relative; }
.theme-preview-dark { background: #15161a; }
.theme-preview-light { background: #eef0f3; }
.theme-preview-bar { position: absolute; top: 0; left: 0; right: 0; height: 16px; }
.theme-preview-dark .theme-preview-bar { background: #0c0d10; border-bottom: 1px solid rgba(255,255,255,0.08); }
.theme-preview-light .theme-preview-bar { background: #e9ebef; border-bottom: 1px solid rgba(40,35,20,0.08); }
.theme-preview-card { position: absolute; top: 26px; left: 10px; right: 10px; bottom: 10px; border-radius: 6px; }
.theme-preview-dark .theme-preview-card { background: #17181c; border: 1px solid rgba(255,255,255,0.08); }
.theme-preview-light .theme-preview-card { background: #faf8f2; border: 1px solid rgba(40,35,20,0.1); }
.theme-option-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.theme-option-btn.theme-active .theme-option-label { color: var(--info); }

/* ══ DATE FILTER TOGGLE — collapsed by default ══════════════ */
.date-filter-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 6px 2px; margin-bottom: 10px; -webkit-tap-highlight-color: transparent; transition: color var(--transition); }
.date-filter-toggle:hover, .date-filter-toggle.date-filter-toggle-active { color: var(--brand); }

/* ══ AI FIELD LOCK HINT ═════════════════════════════════════ */
#aiFieldLockHint { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--brand-light); border: 1px solid rgba(96,165,250,0.3); border-radius: var(--radius-sm); }

/* ══ GRN DETAIL MODAL ═══════════════════════════════════════ */
#grnDetailModal .modal-body { padding: 0; gap: 0; }
.grn-detail-section { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.grn-detail-section:last-child { border-bottom: none; }

/* ══ STOCK CARD / STOCK CARD MODAL ══════════════════════════ */
.stock-card-running-balance { font-size: 12px; color: var(--text-muted); text-align: right; font-weight: 700; white-space: nowrap; }
.stock-card-row { cursor: default; }
.stock-card-row.sc-adj { background: rgba(251,191,36,0.04); }
.stock-card-row.sc-count { background: rgba(52,211,153,0.04); }

/* ══ REQUEST CENTRE ═══════════════════════════════════════════════ */

/* Modal overrides — needs own scroll containment */
.req-modal {
  overflow: hidden !important;
  height: 85vh; height: 85dvh; /* concrete height so children can flex properly */
  display: flex; flex-direction: column;
}
.req-modal-body {
  display: flex; flex-direction: row;
  flex: 1; min-height: 0;
  overflow: hidden;
  /* No height:100% — use flex:1 + min-height:0 instead */
}

/* LEFT catalogue panel */
.req-cat-panel {
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.req-cat-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.req-cat-grid-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}
.req-cat-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

/* Catalogue item cards */
.req-cat-card {
  display: flex; flex-direction: column;
  background: var(--surface-card); border: 2px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: all var(--transition);
  position: relative; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.req-cat-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.req-cat-card:active { transform: scale(0.97); }
.req-cat-card-active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.req-cat-card-active .req-cat-info { background: var(--brand-light); }
.req-cat-thumb {
  width: 100%;
  padding-top: 100%; /* Creates a square regardless of width */
  background: var(--surface-2);
  position: relative; overflow: hidden;
}
.req-cat-thumb > * {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.req-cat-nothumb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; background: var(--surface-3);
  color: var(--text-light);
}
.req-cat-qty-badge {
  position: absolute; top: 5px; right: 5px;
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 800;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(37,99,235,0.55);
  animation: badgePop .2s cubic-bezier(0.22,1,0.36,1);
}
@keyframes badgePop { from{transform:scale(0)} to{transform:scale(1)} }
.req-cat-info { padding: 8px 8px 10px; transition: background var(--transition); background: var(--surface-card); }
.req-cat-name {
  font-weight: 700; font-size: 12px; color: var(--text) !important;
  line-height: 1.4; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  margin-bottom: 3px; word-break: break-word;
}
.req-cat-meta { font-size: 10.5px; color: var(--text-muted); font-weight: 500; }

/* RIGHT cart/crate panel */
.req-cart-panel {
  width: 300px; flex-shrink: 0; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden; background: var(--surface-2);
}
.req-cart-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 800; color: var(--text);
}
.req-cart-badge {
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 12px; margin-left: auto;
  min-width: 20px; text-align: center;
}
.req-cart-items {
  flex: 1; min-height: 0;
  overflow-y: auto; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
  -webkit-overflow-scrolling: touch;
}
.req-cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; text-align: center; color: var(--text-muted);
  flex: 1;
}
.req-cart-item {
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.req-cart-item-top {
  display: flex; align-items: center; gap: 8px;
}
.req-cart-item-thumb {
  width: 34px; height: 34px; border-radius: 6px;
  object-fit: cover; flex-shrink: 0;
}
.req-cart-item-nothumb {
  width: 34px; height: 34px; border-radius: 6px;
  background: var(--surface-3); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.req-cart-item-name {
  flex: 1; min-width: 0;
  font-weight: 700; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.req-cart-item-unit { font-size: 11px; color: var(--text-muted); }
.req-cart-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 18px; line-height: 1;
  padding: 0 2px; transition: color var(--transition);
  flex-shrink: 0;
}
.req-cart-item-remove:hover { color: var(--danger); }
.req-cart-item-qty {
  display: flex; align-items: center; gap: 6px;
}
.req-cart-item-qty .qty-btn {
  width: 30px; height: 30px; font-size: 1rem; flex-shrink: 0;
}
.req-cart-item-qty input {
  flex: 1; min-width: 0; text-align: center;
  font-size: 14px; font-weight: 800;
  background: var(--surface-3); border: 1.5px solid var(--border-2);
  border-radius: 8px; height: 30px; color: var(--text);
  outline: none; padding: 0 4px;
}
.req-cart-item-qty .qty-unit {
  font-size: 11px; color: var(--text-muted); min-width: 24px; text-align: left;
}

/* Mobile: stack vertically */
@media (max-width: 700px) {
  .req-modal-body { flex-direction: column; }
  .req-cat-panel { border-right: none; border-bottom: 1px solid var(--border); flex: 1; min-height: 0; max-height: 44vh; }
  .req-cart-panel { width: 100%; max-height: 40vh; }
}

/* ══ EXIF ORIENTATION FIX ═══════════════════════════════════════════
   Forces browser to respect the EXIF rotation flag in JPEGs taken
   on phones/tablets so delivery slip photos display correctly.    */
img { image-orientation: from-image; }

/* ══ QUICK COUNT BUTTONS on entry cards ═══════════════════════════ */
.entry-qty-col {
  display: flex; align-items: center; gap: 4px;
  flex-direction: row;
}
.entry-qty-wrap {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; min-width: 44px; text-align: center;
}
.quick-minus, .quick-plus {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  font-size: 1.2rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.quick-minus {
  background: var(--danger-bg); color: var(--danger);
}
.quick-minus:active { background: var(--danger); color: #fff; transform: scale(0.9); }
.quick-plus {
  background: var(--success-bg); color: var(--success);
}
.quick-plus:active { background: var(--success); color: #fff; transform: scale(0.9); }
/* Bigger tap targets on mobile */
@media (max-width: 640px) {
  .quick-minus, .quick-plus { width: 38px; height: 38px; font-size: 1.4rem; }
}

/* ══ ENHANCED LOGIN ANIMATIONS ════════════════════════════════════ */

/* Floating particle dots on left panel */
.login-particle {
  position: absolute; border-radius: 50%;
  background: rgba(96,165,250,0.6);
  animation: particleFloat linear infinite;
  pointer-events: none; z-index: 0;
}
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-120vh) translateX(40px) scale(0.4); opacity: 0; }
}

/* Hero title reveal animation */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.login-hero-title {
  animation: heroReveal 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s both;
}
.login-hero-sub {
  animation: heroReveal 0.7s cubic-bezier(0.22,1,0.36,1) 0.3s both;
}

/* Input field focus glow pulse */
@keyframes inputGlowPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(37,99,235,0.16), 0 6px 28px rgba(37,99,235,0.12); }
  50%     { box-shadow: 0 0 0 6px rgba(37,99,235,0.22), 0 8px 32px rgba(37,99,235,0.2); }
}
.login-field:focus-within {
  animation: inputGlowPulse 2s ease-in-out infinite;
}

/* Sign In button — ripple effect on click */
.btn-login::after {
  content: ''; position: absolute;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0);
  border-radius: inherit;
  top: 0; left: 0;
  pointer-events: none;
  transition: background 0.4s ease;
}
.btn-login:active::after { background: rgba(255,255,255,0.15); }

/* Card entrance with bounce */
@keyframes loginCardBounce {
  0%   { opacity: 0; transform: translateY(40px) scale(0.96); }
  60%  { transform: translateY(-4px) scale(1.01); }
  100% { opacity: 1; transform: none; }
}
.login-card {
  animation: loginCardBounce 0.75s cubic-bezier(0.22,1,0.36,1) 0.1s both !important;
}

/* Shimmer sweep on the Sign In button on hover */
@keyframes btnShimmer {
  0%   { left: -110%; }
  100% { left: 160%; }
}
.btn-login:hover::before {
  animation: btnShimmer 0.6s ease forwards;
}

/* Feature bullets — faster stagger */
.login-feature:nth-child(1) { animation-delay: 0.35s; }
.login-feature:nth-child(2) { animation-delay: 0.45s; }
.login-feature:nth-child(3) { animation-delay: 0.55s; }
.login-feature:nth-child(4) { animation-delay: 0.65s; }

/* Brand icon — stronger pulse */
@keyframes iconPulseStrong {
  0%,100% {
    box-shadow: 0 0 0 7px rgba(37,99,235,0.07), 0 14px 36px rgba(37,99,235,0.35);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(37,99,235,0.03), 0 20px 50px rgba(37,99,235,0.5);
    transform: scale(1.04);
  }
}
.login-brand-icon, .login-card-logo, .lmh-icon {
  animation: iconPulseStrong 3s ease-in-out infinite !important;
}

/* Gradient accent — faster shift */
.login-hero-accent {
  animation: gradientShift 3s linear infinite !important;
}

/* ── AI Assistant ──────────────────────────────────────── */
.ai-prompt-btn {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.ai-prompt-btn:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }

.ai-msg { display: flex; gap: 10px; align-items: flex-start; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.ai-msg.user .ai-msg-bubble {
  background: var(--brand);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.ai-msg.ai .ai-msg-bubble {
  background: var(--surface-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}
.ai-msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: var(--surface-3);
}
.ai-typing { display: flex; gap: 4px; padding: 4px 0; }
.ai-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
  animation: aiTyping 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiTyping { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }
@media (max-width: 800px) { #logisticsGrid { grid-template-columns: 1fr !important; } }

/* ── Settings Tabs ─────────────────────────────────── */
.settings-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.settings-tab:hover { color: var(--text); }
.settings-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.settings-tab-pane { display: none; }
.settings-tab-pane.active { display: block; }
