/* StockFlow — warehouse operations console. Slate + amber, dense & legible. */
:root {
  --ink: #0f172a; --ink-2: #1e293b; --muted: #64748b;
  --line: #e2e8f0; --bg: #f1f5f9;
  --accent: #d97706; --accent-ink: #b45309; --accent-soft: #fef3c7;
  --danger: #dc2626; --danger-soft: #fee2e2; --ok: #16a34a; --ok-soft: #dcfce7;
}
body { background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; }
h1,h2,h3,h4,h5 { font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.01em; }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* Sidebar */
.sidebar {
  width: 232px; background: var(--ink); color: #cbd5e1; min-height: 100vh;
  position: fixed; top: 0; left: 0; padding: 18px 14px; display: flex; flex-direction: column;
}
.sidebar .logo { font-family: 'Space Grotesk'; font-weight: 700; font-size: 20px; color: #fff; padding: 6px 10px 20px; }
.sidebar .logo span { color: var(--accent); }
.sidebar a.nav-link {
  color: #94a3b8; padding: 10px 12px; border-radius: 8px; font-weight: 500; margin-bottom: 2px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.sidebar a.nav-link:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.sidebar a.nav-link.active { background: var(--accent); color: #fff; }
.sidebar .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #475569; padding: 14px 12px 6px; font-weight: 600; }
.sidebar .side-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.sidebar .side-user .name { color: #fff; font-weight: 600; }
.sidebar .side-user .role { font-size: 12px; color: #94a3b8; text-transform: capitalize; }

.main { margin-left: 232px; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.topbar .crumb { color: var(--muted); font-size: 12px; }
.topbar h1 { font-size: 20px; margin: 0; }
.content { padding: 22px 26px 60px; }

/* Cards, stats */
.card { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-family: 'Space Grotesk'; font-weight: 600; }
.stat { padding: 16px 18px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.stat .v { font-family: 'Space Grotesk'; font-size: 27px; font-weight: 600; margin-top: 4px; }
.stat.dark { background: var(--ink); color: #fff; }
.stat.dark .k { color: #94a3b8; } .stat.dark .v { color: #fff; }
.stat.warn .v { color: var(--danger); }

/* Tables */
table.data { font-size: 13px; }
table.data thead th { background: #f8fafc; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; font-weight: 600; border-bottom: 1px solid var(--line); }
table.data td, table.data th { padding: 10px 14px; vertical-align: middle; }
table.data tbody tr:hover { background: #f8fafc; }
.code-cell { font-family: 'Space Grotesk'; font-weight: 600; }
.text-end-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Badges */
.badge-low { background: var(--danger-soft); color: var(--danger); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-godown { background: #e0e7ff; color: #4338ca; }
.badge-in { background: var(--ok-soft); color: var(--ok); }
.badge-out { background: var(--danger-soft); color: var(--danger); }
.badge-transfer { background: #e0e7ff; color: #4338ca; }
.badge-soft { background: var(--line); color: var(--ink-2); }

/* Buttons — amber accent */
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* Firm switch */
.firm-switch .btn { font-size: 13px; font-weight: 600; }
.firm-switch .btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { background: linear-gradient(160deg,#0f172a,#1e293b 60%,#334155); color: #fff; padding: 60px 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-brand::after { content:''; position:absolute; right:-120px; bottom:-120px; width:360px; height:360px; background: radial-gradient(circle, rgba(217,119,6,.25), transparent 70%); }
.login-brand .logo { font-family:'Space Grotesk'; font-weight:700; font-size:24px; } .login-brand .logo span { color: var(--accent); }
.login-brand h1 { font-size: 38px; line-height: 1.1; max-width: 12ch; }
.login-brand .chip { border:1px solid rgba(255,255,255,.2); padding:6px 12px; border-radius:999px; font-size:13px; color:#cbd5e1; display:inline-block; margin:4px 6px 0 0; }
.login-panel { display:flex; align-items:center; justify-content:center; padding:40px; }
.login-card { width:100%; max-width:360px; }

.form-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #334155; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(217,119,6,.15); }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; min-height: auto; flex-direction: row; flex-wrap: wrap; }
  .main { margin-left: 0; }
  .login-wrap { grid-template-columns: 1fr; } .login-brand { display: none; }
}
