/* ═══════════════════════════════════════════════════════
   Nyati Fleet & Events — Equipment Management System
   Design System — AYCAS product-family tokens
   ═══════════════════════════════════════════════════════ */

@import url('../assets/fonts/fonts.css');

:root {
  /* ─── AYCAS brand tokens (tier 2 — tenant-swappable accent) ─── */
  --zta-green:        #3e9a8f;   /* accent */
  --zta-green-deep:   #1d5c57;   /* deep — sidebar, headers, primary actions */
  --zta-green-darker: #14403c;   /* darkest — heavy surfaces, button hover */
  --zta-gold:         #56c4b6;   /* lifted accent — active states, highlights */
  --zta-gold-deep:    #3e9a8f;   /* accent hover */
  --zta-red:          #a2401f;   /* fixed semantic danger */
  --zta-red-deep:     #8a361a;   /* deeper danger for buttons */

  /* ─── Legacy `--navy` tokens now alias the brand accent ───
     Codebase uses --navy extensively. Re-pointing to the AYCAS
     accent applies the reskin across every button, sidebar,
     and panel header in one place. */
  --navy:        var(--zta-green-darker);
  --navy-mid:    var(--zta-green-deep);
  --navy-light:  var(--zta-green);
  --slate:       #3a4441;
  --muted:       #7a8582;
  --border:      #e3e7e6;
  --bg:          #F2F4F3;
  --white:       #FFFFFF;
  --text:        #171d1c;

  /* Role colours — --admin/--mgmt double as the fixed AYCAS
     semantic warning/danger tokens (never tenant-swapped);
     --finance/--warehouse/--services/--sub are role-accent
     hues kept distinguishable from the semantic pair. */
  --admin:       #8a6414;   /* fixed semantic warning text */
  --admin-bg:    #faf3e4;   /* fixed semantic warning bg */
  --admin-pill:  #f3e6c8;
  --finance:     #1d5c57;
  --finance-bg:  #eef6f4;
  --finance-pill:#d7ece8;
  --warehouse:   #6d5bb3;
  --wh-bg:       #f2f0fa;
  --wh-pill:     #e2ddf3;
  --mgmt:        #a2401f;   /* fixed semantic danger text */
  --mgmt-bg:     #fdeeea;   /* fixed semantic danger bg */
  --mgmt-pill:   #f9d9d0;
  --services:    #2c7a92;
  --svc-bg:      #eaf4f7;
  --sub:         #8a6414;
  --sub-bg:      #faf3e4;
  --sub-pill:    #f3e6c8;

  /* Status */
  --status-draft:     #7a8582;
  --status-pending:   #8a6414;
  --status-confirmed: #2c7a92;
  --status-active:    #1d5c57;
  --status-returned:  #6d5bb3;
  --status-closed:    #3a4441;
  --status-cancelled: #a2401f;

  /* Layout */
  --sidebar-w: 240px;
  --header-h:  60px;
  --radius:    8px;
  --radius-lg: 10px;   /* AYCAS card radius */

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 12px rgba(0,0,0,.1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
.font-display { font-family: 'Zalando Sans SemiExpanded', 'DM Sans', sans-serif; }
.font-accent  { font-family: 'Bitcount Grid Single', 'DM Sans', monospace; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ══════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 400px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .org { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.login-logo .sys { font-size: 20px; font-weight: 700; font-family:'Zalando Sans SemiExpanded', 'DM Sans', sans-serif; color: var(--navy); margin-top: 4px; }
.login-logo .zta-bar {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
}
.zta-bar span {
  display: block;
  width: 28px;
  height: 5px;
  border-radius: 2px;
}
.zta-bar .g { background: var(--zta-green); }
.zta-bar .y { background: var(--zta-gold); }
.zta-bar .r { background: var(--zta-red); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--slate); text-transform: uppercase; letter-spacing: .5px; }
.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s;
  background: var(--white);
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--navy-light); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
  font-weight: 500;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { opacity: .88; }
.btn-success { background: var(--finance); color: var(--white); }
.btn-success:hover { opacity: .88; }
.btn-warning { background: var(--admin); color: var(--white); }
.btn-warning:hover { opacity: .88; }
.btn-danger  { background: var(--mgmt); color: var(--white); }
.btn-danger:hover { opacity: .88; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--slate);
}
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius); }
.login-footer { margin-top: 20px; text-align: center; font-size: 11px; color: var(--muted); }

/* ══════════════════════════════════════
   APP SHELL (sidebar layout)
══════════════════════════════════════ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--navy-light);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand .brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: 50%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-brand .brand-logo img,
.sidebar-brand .brand-logo svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sidebar-brand .brand-text { flex: 1; min-width: 0; }
.sidebar-brand .brand-zta {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--zta-gold);
}
.sidebar-brand .brand-sys {
  font-size: 13px;
  font-weight: 700; font-family:'Zalando Sans SemiExpanded', 'DM Sans', sans-serif;
  color: var(--white);
  margin-top: 2px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.module-a-mark { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }

/* ── DEMO / SYNTHETIC pill ── */
.sidebar-demo-pill { padding: 0 20px 10px; }
.demo-pill,
.demo-pill-topbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--admin-bg);
  color: var(--admin);
  font-family: 'Bitcount Grid Single', 'DM Sans', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sidebar-role {
  padding: 10px 20px;
  border-bottom: 1px solid var(--navy-light);
}
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.rb-admin     { background: var(--admin-pill);  color: var(--admin); }
.rb-finance   { background: var(--finance-pill);color: var(--finance); }
.rb-warehouse { background: var(--wh-pill);     color: var(--warehouse); }
.rb-mgmt      { background: var(--mgmt-pill);   color: var(--mgmt); }
.rb-sub       { background: var(--sub-pill);    color: var(--sub); }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section {
  padding: 8px 20px 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--navy-light);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.nav-item:hover { color: var(--white); background: rgba(255,255,255,.04); }
.nav-item.active { color: var(--white); border-left-color: var(--zta-gold); background: rgba(255,255,255,.06); font-weight: 500; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--mgmt);
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--navy-light);
}
.sidebar-user { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sidebar-user strong { display: block; color: var(--white); font-size: 13px; }
/* .btn-outline defaults to light-chrome contrast; override for
   the dark sidebar so Sign out / Reset demo data stay legible. */
.sidebar-footer .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,.3);
}
.sidebar-footer .btn-outline:hover { background: rgba(255,255,255,.08); }

/* ── MAIN AREA ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 500; flex: 1; }
.topbar-meta  { font-size: 12px; color: var(--muted); }
.page-content { padding: 28px; }

/* ══════════════════════════════════════
   STAT CARDS
══════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 700; font-family:'Zalando Sans SemiExpanded', 'DM Sans', sans-serif; color: var(--navy); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--muted); }
.stat-card.accent-admin    { border-top: 3px solid var(--admin); }
.stat-card.accent-finance  { border-top: 3px solid var(--finance); }
.stat-card.accent-warehouse{ border-top: 3px solid var(--warehouse); }
.stat-card.accent-mgmt     { border-top: 3px solid var(--mgmt); }
.stat-card.accent-services { border-top: 3px solid var(--services); }

/* ══════════════════════════════════════
   PANELS & TABLES
══════════════════════════════════════ */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-hdr {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-title { font-size: 14px; font-weight: 500; flex: 1; }
.panel-body  { padding: 20px; }
.panel-body.p0 { padding: 0; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table .td-num { font-weight: 500; font-variant-numeric: tabular-nums; }
.data-table .td-muted { color: var(--muted); font-size: 12px; }

/* Empty state */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-title { font-size: 15px; font-weight: 500; color: var(--slate); margin-bottom: 6px; }
.empty-desc  { font-size: 13px; }

/* ══════════════════════════════════════
   STATUS BADGES
══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-draft     { background: #F1F5F9; color: var(--status-draft); }
.badge-pending   { background: #FFFBEB; color: var(--status-pending); }
.badge-confirmed { background: #EFF6FF; color: var(--status-confirmed); }
.badge-active    { background: #ECFDF5; color: var(--status-active); }
.badge-returned  { background: #F5F3FF; color: var(--status-returned); }
.badge-closed    { background: #F9FAFB; color: var(--status-closed); }
.badge-cancelled { background: #FFF1F2; color: var(--status-cancelled); }
.badge-available { background: #ECFDF5; color: var(--finance); }
.badge-out       { background: #EFF6FF; color: var(--status-confirmed); }
.badge-damaged   { background: #FFF1F2; color: var(--mgmt); }
.badge-paid      { background: #ECFDF5; color: var(--finance); }
.badge-unpaid    { background: #FFFBEB; color: var(--admin); }
.badge-overdue   { background: #FFF1F2; color: var(--mgmt); }

/* Equipment condition */
.badge-good      { background: #ECFDF5; color: var(--finance); }
.badge-fair      { background: #FFFBEB; color: var(--admin); }
.badge-poor      { background: #FFF1F2; color: var(--mgmt); }

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span2 { grid-column: span 2; }
.form-label { font-size: 12px; font-weight: 500; color: var(--slate); }
.form-label .req { color: var(--mgmt); margin-left: 2px; }
.form-control {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  transition: border-color .15s;
  background: var(--white);
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--navy-mid); }
.form-control.error { border-color: var(--mgmt); }
.form-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.form-section { margin-bottom: 24px; }
.form-section-title { font-size: 13px; font-weight: 500; color: var(--navy); padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.form-actions { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 24px; }

/* ══════════════════════════════════════
   EQUIPMENT SELECTOR (in booking form)
══════════════════════════════════════ */
.equip-selector { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.equip-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg);
}
.equip-search input { flex: 1; border: none; background: transparent; font-size: 13px; outline: none; }
.equip-list { max-height: 320px; overflow-y: auto; }
.equip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.equip-row:last-child { border-bottom: none; }
.equip-row:hover { background: var(--bg); }
.equip-row.selected { background: #EFF6FF; }
.equip-name { flex: 1; font-size: 13px; font-weight: 500; }
.equip-avail { font-size: 11px; color: var(--muted); }
.equip-qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--navy);
  font-weight: 500;
}
.qty-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.qty-input {
  width: 44px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  font-size: 13px;
  font-weight: 500;
}
.equip-cart {
  border-top: 2px solid var(--border);
  background: #F8FAFC;
  padding: 12px 14px;
}
.equip-cart-title { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 8px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-remove { color: var(--mgmt); cursor: pointer; font-size: 16px; }

/* ══════════════════════════════════════
   MODALS
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-hdr {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-title { font-size: 16px; font-weight: 500; flex: 1; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body  { padding: 24px; }
.modal-foot  { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ══════════════════════════════════════
   ALERTS & TOASTS
══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn .2s ease;
}
.toast.success { background: var(--finance); }
.toast.error   { background: var(--mgmt); }
.toast.warning { background: var(--admin); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(120%); } }
.toast.exiting { animation: fadeOut .2s ease forwards; }

/* ══════════════════════════════════════
   INVENTORY GRID (warehouse)
══════════════════════════════════════ */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.inv-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inv-icon  { font-size: 24px; }
.inv-name  { font-size: 13px; font-weight: 500; line-height: 1.3; }
.inv-avail { font-size: 22px; font-weight: 700; font-family:'Zalando Sans SemiExpanded', 'DM Sans', sans-serif; color: var(--navy); }
.inv-total { font-size: 11px; color: var(--muted); }
.inv-bar   { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.inv-bar-fill { height: 100%; border-radius: 2px; transition: width .3s; }
.inv-bar-fill.good    { background: var(--finance); }
.inv-bar-fill.warning { background: var(--admin); }
.inv-bar-fill.danger  { background: var(--mgmt); }

/* ══════════════════════════════════════
   DISPATCH / RETURN CARD (warehouse)
══════════════════════════════════════ */
.dispatch-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.dc-hdr { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.dc-ref  { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dc-name { font-size: 15px; font-weight: 500; margin-top: 2px; }
.dc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dc-items { border-top: 1px solid var(--border); padding-top: 10px; }
.dc-item  { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.dc-item:last-child { border-bottom: none; }
.dc-item-name { font-weight: 500; }
.dc-item-qty  { color: var(--muted); }
.dc-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ══════════════════════════════════════
   CONDITION CHECK WIDGET
══════════════════════════════════════ */
.condition-check { border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cc-row:last-child { border-bottom: none; }
.cc-name { flex: 1; font-weight: 500; }
.cc-qty  { color: var(--muted); font-size: 12px; margin-right: 8px; }
.cc-options { display: flex; gap: 6px; }
.cc-opt {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  background: var(--white);
  color: var(--muted);
}
.cc-opt:hover { border-color: currentColor; }
.cc-opt.ok       { color: var(--finance); }
.cc-opt.ok.sel   { background: var(--finance);   color: var(--white); border-color: var(--finance); }
.cc-opt.dmg      { color: var(--admin); }
.cc-opt.dmg.sel  { background: var(--admin);     color: var(--white); border-color: var(--admin); }
.cc-opt.miss     { color: var(--mgmt); }
.cc-opt.miss.sel { background: var(--mgmt);      color: var(--white); border-color: var(--mgmt); }

/* ══════════════════════════════════════
   FINANCE / INVOICE
══════════════════════════════════════ */
.invoice-summary {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.inv-s-item { display: flex; flex-direction: column; gap: 4px; }
.inv-s-lbl  { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.inv-s-val  { font-size: 22px; font-weight: 700; font-family:'Zalando Sans SemiExpanded', 'DM Sans', sans-serif; }
.inv-s-val.green { color: #4ADE80; }
.inv-s-val.amber { color: #FCD34D; }
.inv-s-val.red   { color: #FCA5A5; }

/* ══════════════════════════════════════
   DASHBOARD CHARTS (placeholder style)
══════════════════════════════════════ */
.chart-bar-grid { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.chart-bar-row  { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.chart-bar-label { width: 140px; flex-shrink: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.chart-bar-fill  { height: 100%; border-radius: 4px; transition: width .6s ease; }
.chart-bar-val   { width: 40px; text-align: right; font-weight: 500; color: var(--navy); }

/* ══════════════════════════════════════
   MISC UTILITIES
══════════════════════════════════════ */
.flex           { display: flex; }
.flex-center    { display: flex; align-items: center; }
.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.gap-16         { gap: 16px; }
.mt-4           { margin-top: 4px; }
.mt-8           { margin-top: 8px; }
.mt-16          { margin-top: 16px; }
.mb-16          { margin-bottom: 16px; }
.mb-20          { margin-bottom: 20px; }
.text-muted     { color: var(--muted); }
.text-sm        { font-size: 12px; }
.text-bold      { font-weight: 500; }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.divider        { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.chip { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; font-size: 11px; color: var(--muted); }
.tag-admin     { background: var(--admin-pill);   color: var(--admin); }
.tag-finance   { background: var(--finance-pill); color: var(--finance); }
.tag-warehouse { background: var(--wh-pill);      color: var(--warehouse); }
.tag-mgmt      { background: var(--mgmt-pill);    color: var(--mgmt); }
.tag-services  { background: var(--svc-bg);       color: var(--services); }
.hidden         { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Print */
@media print {
  .sidebar, .topbar, .btn, .modal-overlay { display: none !important; }
  .main { margin-left: 0; }
  .panel { box-shadow: none; border: 1px solid #ccc; }
}
