@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  /* Brand palette — committed, not scattered */
  --sky:       #7DD3FC;
  --sky-dim:   rgba(125,211,252,.12);
  --sky-glow:  rgba(125,211,252,.06);
  --amber:     #F59E0B;
  --amber-dim: rgba(245,158,11,.12);
  --mint:      #6EE7B7;
  --green:     #34D399;
  --danger:    #F87171;
  --warn:      #FCD34D;

  /* Surface system — 4 distinct layers */
  --bg:     #060D18;   /* page background */
  --s1:     #0C1524;   /* card surface */
  --s2:     #111E30;   /* elevated / sidebar */
  --s3:     #19273C;   /* hover / input */
  --s4:     #223047;   /* active states */
  --border: rgba(255,255,255,.06);
  --border-bright: rgba(255,255,255,.11);

  /* Text */
  --text:  #F0F6FF;
  --dim:   #C4D0E3;
  --muted: #6B7E99;
  --faint: #3D5068;

  /* Layout */
  --sidebar-w: 232px;
  --header-h:  52px;

  /* Shape */
  --r:    12px;
  --r-sm: 7px;
  --r-xs: 4px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow:    0 2px 8px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  --glow-sky:  0 0 24px rgba(125,211,252,.08);
}
/* ── Base ──────────────────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: var(--text); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 4px; }

/* ── Layout shell ──────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--s2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  position: relative;
}
/* subtle top accent stripe */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--sky), transparent);
  opacity: .5;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 18px 15px;
  border-bottom: 1px solid var(--border);
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(140deg, #38BDF8 0%, #0EA5E9 100%);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(56,189,248,.25);
}
.logo-text { font-weight: 800; font-size: 14px; letter-spacing: -.3px; color: var(--text); }
.logo-sub { font-size: 9.5px; color: var(--muted); margin-top: 1px; letter-spacing: .02em; }

.sidebar-branch {
  margin: 10px 12px 4px;
  padding: 7px 11px;
  background: var(--sky-dim);
  border: 1px solid rgba(125,211,252,.14);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--sky);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-section {
  padding: 14px 18px 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  margin: 1px 8px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  transition: color .12s, background .12s;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--dim); }
.nav-item.active {
  background: var(--sky-dim);
  color: var(--sky);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--sky);
  border-radius: 0 3px 3px 0;
}
.nav-item .icon { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; opacity: .8; }
.nav-item .badge {
  margin-left: auto;
  background: var(--amber);
  color: #0a0e17;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: .02em;
}
.nav-item .badge-alert {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 10px 10px 12px;
  border-top: 1px solid var(--border);
}
.staff-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: rgba(255,255,255,.03);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.staff-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  color: #060D18;
  flex-shrink: 0;
  letter-spacing: -.3px;
}
.staff-info .name { font-size: 12px; font-weight: 600; color: var(--dim); }
.staff-info .role { font-size: 10px; color: var(--muted); }

/* ── Topbar ────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--header-h);
  background: var(--s2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-title { font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.topbar-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-time {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  padding: 4px 10px;
  background: var(--s3);
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
}

/* ── Content ───────────────────────────────────────────────────────────── */
.content { flex: 1; overflow-y: auto; padding: 20px 22px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Stat cards ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
/* top edge glow line */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
}
.stat-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  margin-bottom: 12px;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.5px;
  color: var(--text);
}
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.stat-delta { font-size: 10.5px; color: var(--mint); margin-top: 5px; font-weight: 600; }

/* ── Status badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}
.badge-received { background: rgba(107,126,153,.15); color: #8A9BB5; }
.badge-washing  { background: var(--sky-dim); color: var(--sky); }
.badge-drying   { background: rgba(251,146,60,.12); color: #FB923C; }
.badge-ironing  { background: var(--amber-dim); color: var(--amber); }
.badge-ready    { background: rgba(110,231,183,.12); color: var(--mint); }
.badge-delivered{ background: rgba(52,211,153,.12); color: var(--green); }

/* ── Table ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid rgba(255,255,255,.03); transition: background .1s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody td { padding: 10px 12px; font-size: 13px; vertical-align: middle; }
tbody tr:last-child { border-bottom: none; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 12.5px;
  transition: all .13s;
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: -.1px;
}
.btn-primary {
  background: var(--sky);
  color: #060D18;
  box-shadow: 0 1px 8px rgba(125,211,252,.2);
}
.btn-primary:hover { background: #93DEFF; box-shadow: 0 2px 12px rgba(125,211,252,.3); }
.btn-outline {
  border: 1px solid var(--border-bright);
  color: var(--dim);
  background: rgba(255,255,255,.02);
}
.btn-outline:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.18); }
.btn-sm { padding: 4px 10px; font-size: 11.5px; }
.btn-danger  { background: rgba(248,113,113,.1); color: var(--danger); border: 1px solid rgba(248,113,113,.18); }
.btn-success { background: rgba(52,211,153,.1); color: var(--green); border: 1px solid rgba(52,211,153,.18); }
.btn-amber   { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,.2); }
.btn-ghost   { color: var(--muted); padding: 4px 9px; border-radius: var(--r-xs); }
.btn-ghost:hover { color: var(--dim); background: rgba(255,255,255,.04); }

/* ── Filters ───────────────────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  flex: 1;
  min-width: 180px;
  transition: border .12s;
}
.search-box:focus-within { border-color: rgba(125,211,252,.3); }
.search-box input { background: none; border: none; outline: none; color: var(--text); flex: 1; font-size: 13px; }
.search-box input::placeholder { color: var(--faint); }
.filter-tabs { display: flex; gap: 3px; }
.filter-tab {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .13s;
  border: 1px solid transparent;
}
.filter-tab:hover { background: rgba(255,255,255,.04); color: var(--dim); }
.filter-tab.active {
  background: var(--sky-dim);
  color: var(--sky);
  border-color: rgba(125,211,252,.2);
  font-weight: 600;
}

/* ── Kanban pipeline ───────────────────────────────────────────────────── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.pipeline-col {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px;
  min-width: 138px;
}
.pipeline-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pipeline-col-title { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pipeline-count {
  font-size: 10px;
  background: var(--s3);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--dim);
}
.pipeline-card {
  background: var(--s2);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color .12s, transform .1s;
  border: 1px solid var(--border);
}
.pipeline-card:hover { border-color: rgba(125,211,252,.22); transform: translateY(-1px); }
.pipeline-card .pc-id { font-size: 10px; font-weight: 800; color: var(--sky); letter-spacing: .01em; }
.pipeline-card .pc-name { font-size: 12px; font-weight: 600; margin-top: 2px; color: var(--dim); }
.pipeline-card .pc-items { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.pipeline-card .pc-amount { font-size: 11px; font-weight: 700; color: var(--amber); margin-top: 4px; }

/* ── Avatar ────────────────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  color: #060D18;
  flex-shrink: 0;
  letter-spacing: -.3px;
}

/* ── Notification dot ──────────────────────────────────────────────────── */
.notif-dot { border-radius: 50%; flex-shrink: 0; }
.notif-success { background: var(--green); }
.notif-warning { background: var(--warn); }
.notif-danger  { background: var(--danger); }
.notif-info    { background: var(--sky); }

/* ── Chart ─────────────────────────────────────────────────────────────── */
.chart-bar-wrap { display: flex; align-items: flex-end; gap: 5px; height: 72px; }
.chart-bar {
  flex: 1;
  background: var(--s3);
  border-radius: 4px 4px 0 0;
  transition: all .25s;
  cursor: pointer;
  min-width: 22px;
  border: 1px solid var(--border);
  border-bottom: none;
}
.chart-bar:hover { background: rgba(125,211,252,.3); }
.chart-bar.today { background: rgba(125,211,252,.35); border-color: rgba(125,211,252,.4); }
.chart-labels { display: flex; gap: 5px; margin-top: 6px; }
.chart-label { flex: 1; text-align: center; font-size: 9.5px; color: var(--muted); font-weight: 500; }

/* ── Grid layouts ──────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.form-input {
  width: 100%;
  background: var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border .13s;
}
.form-input:focus { border-color: rgba(125,211,252,.35); background: var(--s4); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7E99'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* ── Demo banner ───────────────────────────────────────────────────────── */
.demo-banner {
  background: linear-gradient(90deg, rgba(125,211,252,.06), rgba(245,158,11,.04));
  border: 1px solid rgba(125,211,252,.14);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}
.demo-banner strong { color: var(--sky); font-weight: 600; }
.demo-banner a { color: var(--amber); font-weight: 600; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4,8,16,.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--s2);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 18px; }

/* ── Divider ───────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Inventory ─────────────────────────────────────────────────────────── */
.inv-ok       { color: var(--green); }
.inv-low      { color: var(--warn); }
.inv-critical { color: var(--danger); }
.inv-bar { height: 3px; border-radius: 2px; background: var(--s4); margin-top: 5px; overflow: hidden; }
.inv-bar-fill { height: 100%; border-radius: 2px; transition: width .5s; }

/* ── Progress ──────────────────────────────────────────────────────────── */
.progress-track { height: 4px; background: var(--s4); border-radius: 2px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--sky) 0%, var(--mint) 100%);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--s2);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s cubic-bezier(.4,0,.2,1);
  max-width: 310px;
  font-weight: 500;
}
.toast.success { border-left: 2px solid var(--green); }
.toast.warning { border-left: 2px solid var(--warn); }
.toast.error   { border-left: 2px solid var(--danger); }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Map ───────────────────────────────────────────────────────────────── */
.map-placeholder {
  background: linear-gradient(160deg, #060e1e 0%, #0a1628 100%);
  border-radius: var(--r);
  height: 220px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(125,211,252,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.map-pin { position: absolute; width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; }
.map-route { position: absolute; height: 2px; background: linear-gradient(90deg, var(--sky), var(--mint)); border-radius: 1px; }
.map-label { position: absolute; font-size: 9.5px; color: var(--muted); white-space: nowrap; font-weight: 500; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .content { padding: 14px; }
}
