/* ═══════════════════════════════════════════════════
   BAIRAQ SYSTEM — Main Stylesheet
   Brand color: #E8661A (Bairaq orange)
   Font: Noto Kufi Arabic
═══════════════════════════════════════════════════ */

/* ─── VARIABLES ──────────────────────────────────── */
:root {
  --brand:        #E8661A;
  --brand-dark:   #c45415;
  --brand-light:  #fff3ed;
  --brand-pale:   #fde8d8;

  --sidebar-bg:   #1a2335;
  --sidebar-w:    260px;

  --bg:           #f0f4f8;
  --card:         #ffffff;
  --border:       #e2e8f0;
  --text:         #2d3748;
  --text-muted:   #718096;
  --text-light:   #a0aec0;

  --success:      #22c55e;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --info:         #3b82f6;

  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --shadow-md:    0 4px 24px rgba(0,0,0,.10);

  --transition:   .2s ease;
}

/* ─── RESET & BASE ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  overflow-x: hidden;
}

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.text-brand { color: var(--brand) !important; }

/* ─── SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }

/* ══════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════ */

/* SIDEBAR */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo img { max-height: 42px; }
.sidebar-logo-text {
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Sidebar User */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name { color: #f1f5f9; font-weight: 600; font-size: 13px; }
.user-role { color: #94a3b8; font-size: 12px; }

/* Sidebar Nav */
.sidebar-nav {
  padding: 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-item i { font-size: 16px; flex-shrink: 0; }
.nav-item:hover  { background: rgba(255,255,255,.06); color: #e2e8f0; }
.nav-item.active { background: var(--brand); color: #fff; }
.nav-item.nav-logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }
.nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 8px 0; }

/* SIDEBAR OVERLAY (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1039;
}
.sidebar-overlay.show { display: block; }

/* MAIN WRAPPER */
.main-wrapper {
  margin-right: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin var(--transition);
}

/* TOPBAR */
.topbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.topbar-toggle {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.topbar-toggle:hover { background: var(--bg); }

.topbar-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.topbar-date { color: var(--text-muted); font-size: 12px; }

/* PAGE CONTENT */
.page-content {
  padding: 24px;
  flex: 1;
}

/* ══════════════════════════════════════════════════
   CARDS / PANELS
══════════════════════════════════════════════════ */
.card-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  background: #fafafa;
}

/* ─── TABLE LIVE SEARCH ─────────────────────────── */
.table-live-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.table-live-search {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  width: 160px;
}
.table-live-search::placeholder { color: var(--text-muted); }

/* ─── TODAY REPORT ──────────────────────────────── */
.today-report {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 14px;
  padding: 18px 22px;
  color: #fff;
}
.today-report-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.today-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.today-stat {
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.today-stat-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: #fff;
}
.today-stat-lbl {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}
.today-stat-money .today-stat-val { font-size: 16px; }

/* ─── ARCHIVE PANEL ─────────────────────────────── */
.archive-panel { opacity: .92; }
.archive-panel .panel-head { background: #f8fafc; }
.archive-chevron { transition: transform .25s ease; }



.panel-body { padding: 20px; }

.panel-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

/* ══════════════════════════════════════════════════
   STATS / KPI CARDS
══════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-right: 4px solid var(--brand);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-num  { font-size: 22px; font-weight: 800; line-height: 1; }
.stat-lbl  { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.stat-total    { border-right-color: var(--brand);   } .stat-total    .stat-icon { background:#fff3ed; color:var(--brand); }
.stat-progress { border-right-color: var(--warning); } .stat-progress .stat-icon { background:#fff8e8; color:var(--warning); }
.stat-ready    { border-right-color: #14b8a6; }         .stat-ready    .stat-icon { background:#e8fdf8; color:#14b8a6; }
.stat-money    { border-right-color: var(--success); } .stat-money    .stat-icon { background:#e8fdf3; color:var(--success); }

/* KPI GRID (Manager) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform .15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.kpi-num { font-size: 20px; font-weight: 800; line-height: 1; }
.kpi-lbl { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.kpi-total     .kpi-icon { background: var(--brand-pale);   color: var(--brand); }
.kpi-progress  .kpi-icon { background: #fff8e8;              color: var(--warning); }
.kpi-ready     .kpi-icon { background: #e8fdf8;              color: #14b8a6; }
.kpi-delivered .kpi-icon { background: #e8fdf3;              color: var(--success); }
.kpi-unpaid    .kpi-icon { background: #fef2f2;              color: var(--danger); }
.kpi-partial   .kpi-icon { background: #fffbeb;              color: var(--warning); }
.kpi-paid      .kpi-icon { background: #ecfdf5;              color: var(--success); }
.kpi-revenue   .kpi-icon { background: #eff6ff;              color: var(--info); }

/* Revenue Bar */
.revenue-bar {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.rev-item    { display: flex; flex-direction: column; align-items: center; padding: 4px 28px; }
.rev-lbl     { font-size: 11px; color: var(--text-muted); }
.rev-val     { font-size: 16px; font-weight: 800; }
.rev-divider { width: 1px; height: 36px; background: var(--border); }

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  padding: 10px 14px;
  text-align: right;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafbff; }

/* Highlight no-invoice rows */
.row-no-invoice { background: #fffbf0 !important; }
.row-no-invoice:hover { background: #fff8e6 !important; }

.order-code    { font-family: monospace; font-size: 13px; font-weight: 700; color: var(--brand); }
.order-code-lg { font-family: monospace; font-size: 20px; font-weight: 800; color: var(--brand); }

/* ══════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'Noto Kufi Arabic', sans-serif;
  white-space: nowrap;
}

.badge-new       { background: #eff6ff; color: #1d4ed8; }
.badge-progress  { background: #fffbeb; color: #b45309; }
.badge-ready     { background: #f0fdfa; color: #0f766e; }
.badge-delivered { background: #f0fdf4; color: #166534; }
.badge-cancelled { background: #fef2f2; color: #991b1b; }

.badge-unpaid  { background: #fef2f2; color: #991b1b; }
.badge-partial { background: #fffbeb; color: #92400e; }
.badge-paid    { background: #f0fdf4; color: #166534; }

.badge-sm { font-size: 10.5px; padding: 2px 8px; }
.badge-lg { font-size: 13px;   padding: 5px 14px; }

.badge-warning  { background: #fef3c7; color: #b45309; padding: 2px 6px; border-radius: 4px; }
.badge-reviewed { background: #dcfce7; color: #166534; padding: 2px 7px; border-radius: 10px; font-size: 11px; }
.badge-count    { background: var(--danger); color: #fff; padding: 1px 7px; border-radius: 10px; font-size: 11px; }

/* ══════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════ */
.btn-add-order, .btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), transform .1s;
}
.btn-add-order:hover, .btn-brand:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-save:hover { background: var(--brand-dark); }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #25D366;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-whatsapp-lg    { padding: 12px 28px; font-size: 15px; }

.btn-row-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-pale);
  color: var(--brand);
  text-decoration: none;
  font-size: 15px;
  transition: background var(--transition);
}
.btn-row-edit:hover { background: var(--brand); color: #fff; }

.btn-quick-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
  white-space: nowrap;
}
.btn-quick-status:hover { opacity: .82; }
.btn-qs-ready     { background: #dcfce7; color: #15803d; }
.btn-qs-ready:hover { background: #16a34a; color: #fff; }
.btn-qs-delivered { background: #dbeafe; color: #1d4ed8; }
.btn-qs-delivered:hover { background: #2563eb; color: #fff; }

.btn-outline-brand {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-outline-brand:hover { background: var(--brand); color: #fff; }

.btn-brand { display: inline-flex; align-items: center; background: var(--brand); border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-dark); }

.btn-view-inv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #f0f9ff;
  color: var(--info);
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
}
.btn-view-inv:hover { background: var(--info); color: #fff; }

.btn-text-sm {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 11px;
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════ */
.form-label { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 5px; }
.form-label.req::after { content: ' *'; color: var(--danger); }

.form-control, .form-select {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 9px 12px;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,102,26,.12);
  outline: none;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.remaining-field {
  background: #f8fafc;
  font-weight: 700;
  font-size: 15px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.section-divider {
  position: relative;
  text-align: center;
  margin: 6px 0 2px;
}
.section-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--border);
}
.section-divider span {
  position: relative;
  background: var(--card);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════
   UPLOAD ZONE
══════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: #fafafa;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.upload-placeholder i  { font-size: 36px; color: var(--text-light); }
.upload-placeholder p  { margin: 8px 0 4px; font-size: 13px; color: var(--text-muted); }
.upload-placeholder small { font-size: 11px; }

.upload-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}

.btn-remove-file {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
}

/* ══════════════════════════════════════════════════
   INVOICE ITEMS
══════════════════════════════════════════════════ */
.invoice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background var(--transition);
}
.invoice-item:hover { background: var(--bg); }

.invoice-icon { font-size: 22px; flex-shrink: 0; }
.invoice-info { flex: 1; min-width: 0; }
.invoice-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invoice-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   HISTORY TIMELINE
══════════════════════════════════════════════════ */
.history-timeline { display: flex; flex-direction: column; gap: 12px; }

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  background: var(--border);
}
.history-dot.badge-new       { background: var(--info); }
.history-dot.badge-progress  { background: var(--warning); }
.history-dot.badge-ready     { background: #14b8a6; }
.history-dot.badge-delivered { background: var(--success); }
.history-dot.badge-cancelled { background: var(--danger); }

.history-content { flex: 1; }
.history-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════ */
.nav-tabs-custom {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
  border-bottom: 2px solid var(--border);
}

.nav-tabs-custom li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 8px 8px 0 0;
  transition: color var(--transition);
}
.nav-tabs-custom li a:hover  { color: var(--brand); }
.nav-tabs-custom li a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: var(--brand-light);
}

/* ══════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i    { font-size: 48px; display: block; margin-bottom: 12px; opacity: .4; }
.empty-state p    { font-size: 15px; margin: 0; }

/* ══════════════════════════════════════════════════
   SEARCH DROPDOWN
══════════════════════════════════════════════════ */
.phone-search-bar { position: relative; }

.search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition);
}
.search-item:hover  { background: var(--brand-light); }
.search-item strong { flex: 0 0 auto; }
.search-loading, .search-no-result { padding: 12px 14px; color: var(--text-muted); font-size: 13px; }

/* ══════════════════════════════════════════════════
   DETAIL ROWS (in modals)
══════════════════════════════════════════════════ */
.detail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
}
.detail-lbl  { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ══════════════════════════════════════════════════
   PROGRESS BAR (employee performance)
══════════════════════════════════════════════════ */
.progress-thin {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 4px;
  transition: width .5s ease;
}

/* Employee avatar in table */
.emp-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════
   SECTION TITLE
══════════════════════════════════════════════════ */
.section-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand-pale);
}

/* ══════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════ */
.login-body {
  background: #0f1c2e;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.login-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }

.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: .15;
}
.shape-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--brand), transparent);
  top: -150px; left: -100px;
}
.shape-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #1e3a5f, transparent);
  bottom: -100px; right: -50px;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo  { max-height: 70px; margin-bottom: 10px; }
.login-logo-text {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand);
  display: block;
}
.login-subtitle { color: var(--text-muted); font-size: 13px; margin: 0; }

.form-group-login { margin-bottom: 18px; }
.form-label-login { display: block; font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 6px; }

.input-icon-wrap { position: relative; }

.input-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.form-control-login {
  width: 100%;
  padding: 11px 40px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control-login:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,102,26,.15);
  outline: none;
}

.btn-show-pass {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}
.btn-show-pass:hover { color: var(--brand); }

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}
.remember-label input { accent-color: var(--brand); width: 15px; height: 15px; }

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform .1s;
}
.btn-login:hover   { background: var(--brand-dark); transform: translateY(-1px); }
.btn-login:active  { transform: translateY(0); }

.login-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-light);
  font-size: 12px;
}

/* ══════════════════════════════════════════════════
   TRACK PAGE
══════════════════════════════════════════════════ */
.track-body {
  background: linear-gradient(135deg, #0f1c2e 0%, #1a2e4a 50%, #0f1c2e 100%);
  min-height: 100vh;
}

.track-wrapper {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.track-header { text-align: center; margin-bottom: 32px; }
.track-logo   { max-height: 70px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.track-title  { color: #fff; font-size: 26px; font-weight: 800; margin: 0; }
.track-subtitle { color: #94a3b8; font-size: 14px; margin: 6px 0 0; }

.track-search-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
}

.track-input-group { display: flex; gap: 10px; }

.track-input {
  flex: 1;
  padding: 13px 16px;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  transition: border-color var(--transition);
}
.track-input::placeholder { color: rgba(255,255,255,.35); font-size: 14px; }
.track-input:focus { border-color: var(--brand); outline: none; }

.track-btn {
  padding: 13px 24px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}
.track-btn:hover { background: var(--brand-dark); }

.track-error {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fca5a5;
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

/* Track Result */
.track-result {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.track-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 16px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.track-order-code { font-family: monospace; font-size: 20px; font-weight: 800; color: var(--brand); }
.track-client     { color: var(--text); font-weight: 600; font-size: 15px; margin-top: 3px; }

/* Status Progress */
.status-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 4px;
  overflow-x: auto;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}

.step-item.done .step-circle   { background: var(--brand-pale); color: var(--brand); }
.step-item.current .step-circle { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-pale); }

.step-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.step-item.done .step-label { color: var(--brand); }
.step-item.current .step-label { color: var(--brand); font-weight: 700; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
  max-width: 60px;
  margin-bottom: 20px;
  transition: background var(--transition);
}
.step-line.done { background: var(--brand-pale); }

/* Track Details Grid */
.track-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px;
}

.track-detail-item {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.detail-value { font-size: 14px; font-weight: 600; }

.track-note {
  margin: 0 20px 16px;
  background: #fffbeb;
  border-right: 3px solid var(--warning);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
}
.track-note-title { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.track-note p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* Rating Section */
.track-rating-section {
  padding: 20px;
  background: #fafafa;
  border-top: 1px solid var(--border);
  text-align: center;
}
.rating-done { font-size: 15px; font-weight: 600; color: var(--text); }

.rating-prompt h6 { font-weight: 700; }

.star-rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.star-btn { transition: transform .1s; }
.star-btn:hover { transform: scale(1.2); }

.rating-display { display: flex; align-items: center; justify-content: center; gap: 3px; }

.track-footer {
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: 12px;
  margin-top: 32px;
}

/* ══════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════ */
.alert {
  font-family: 'Noto Kufi Arabic', sans-serif;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

/* ══════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════ */
.modal-content {
  font-family: 'Noto Kufi Arabic', sans-serif;
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header { border-bottom: 1px solid var(--border); }
.modal-title  { font-weight: 700; font-size: 15px; }

/* ══════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════ */
.pagination { font-family: 'Noto Kufi Arabic', sans-serif; }
.page-link  {
  color: var(--brand);
  border-color: var(--border);
  font-size: 13px;
  padding: 6px 12px;
}
.page-link:hover        { background: var(--brand-light); color: var(--brand); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: -10px 0 40px rgba(0,0,0,.3);
  }

  .main-wrapper  { margin-right: 0; }

  .page-content  { padding: 16px; }

  .kpi-grid      { grid-template-columns: repeat(2, 1fr); }
  .stats-row     { grid-template-columns: repeat(2, 1fr); }

  .track-details-grid { grid-template-columns: 1fr; }
  .track-input-group  { flex-direction: column; }
  .revenue-bar        { flex-direction: column; gap: 8px; }
  .rev-divider        { width: 60px; height: 1px; }
}

@media (max-width: 575.98px) {
  .login-card    { padding: 28px 22px; }
  .kpi-grid      { grid-template-columns: repeat(2, 1fr); }
  .topbar        { padding: 0 14px; }
  .data-table    { font-size: 12px; }
  .data-table thead th,
  .data-table tbody td { padding: 8px 10px; }
  .today-report-grid { grid-template-columns: repeat(2, 1fr); }
  .today-stat-val    { font-size: 18px; }
  .table-live-search { width: 110px; }
}

/* ══════════════════════════════════════════════════
   V2 ADDITIONS
══════════════════════════════════════════════════ */

/* Row inactive (disabled user) */
.row-inactive td { opacity: .5; }

/* Accounting summary cards */
.acc-sum-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.acc-sum-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.acc-sum-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.acc-sum-val { font-size: 18px; font-weight: 800; margin-top: 2px; }

.acc-rev    { background: #f0fdf4; border-color: #bbf7d0; }
.acc-rev    .acc-sum-icon { background: #dcfce7; color: var(--success); }
.acc-rev    .acc-sum-val  { color: var(--success); }

.acc-exp    { background: #fef2f2; border-color: #fecaca; }
.acc-exp    .acc-sum-icon { background: #fee2e2; color: var(--danger); }
.acc-exp    .acc-sum-val  { color: var(--danger); }

.acc-profit { background: #fff7ed; border-color: var(--brand-pale); }
.acc-profit .acc-sum-icon { background: var(--brand-pale); color: var(--brand); }
.acc-profit .acc-sum-val  { color: var(--brand); }

.acc-loss   { background: #fef2f2; border-color: #fecaca; }
.acc-loss   .acc-sum-icon { background: #fee2e2; color: var(--danger); }
.acc-loss   .acc-sum-val  { color: var(--danger); }

/* Category rows */
.cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  margin-bottom: 4px;
  transition: background var(--transition);
}
.cat-row:hover { background: var(--bg); }
.cat-name  { flex: 1; font-size: 13px; font-weight: 500; }
.cat-count { flex-shrink: 0; }
.cat-amount { flex-shrink: 0; }

/* Table tfoot summary */
.table-summary td {
  border-top: 2px solid var(--border) !important;
  background: #f8fafc;
  padding: 12px 14px;
}

/* Employee profile cards */
.emp-profile-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.emp-profile-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.emp-profile-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.emp-avatar-lg {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
}

.emp-avatar-xl {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; flex-shrink: 0;
}

.emp-profile-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0;
}

.eps-item {
  padding: 14px 12px; text-align: center;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.eps-item:last-child { border-left: none; }
.eps-num { font-size: 17px; font-weight: 800; }
.eps-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.emp-profile-footer {
  padding: 12px 16px;
  background: #fafafa;
}

/* ══════════════════════════════════════════════════
   V2 ADDITIONS
══════════════════════════════════════════════════ */

/* Accounting Page */
.acc-sum-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.acc-sum-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.acc-rev    .acc-sum-icon { background: #ecfdf5; color: var(--success); }
.acc-exp    .acc-sum-icon { background: #fef2f2; color: var(--danger); }
.acc-profit .acc-sum-icon { background: var(--brand-pale); color: var(--brand); }
.acc-loss   .acc-sum-icon { background: #fef2f2; color: var(--danger); }
.acc-sum-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.acc-sum-val { font-size: 18px; font-weight: 800; margin-top: 2px; }
.acc-rev    .acc-sum-val  { color: var(--success); }
.acc-exp    .acc-sum-val  { color: var(--danger); }
.acc-profit .acc-sum-val  { color: var(--brand); }
.acc-loss   .acc-sum-val  { color: var(--danger); }

/* Category row */
.cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.cat-row:last-child { border-bottom: none; }
.cat-name { flex: 1; font-size: 13px; font-weight: 500; }
.cat-count { flex-shrink: 0; }
.cat-amount { flex-shrink: 0; min-width: 80px; text-align: left; }

/* Table summary row */
.data-table tfoot tr td {
  background: #f8fafc;
  border-top: 2px solid var(--border);
  padding: 12px 14px;
}

/* Employee profile cards */
.emp-profile-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.emp-profile-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.emp-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.emp-avatar-lg {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  flex-shrink: 0;
}

.emp-avatar-xl {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  flex-shrink: 0;
}

.emp-profile-stats {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.eps-item {
  flex: 1; text-align: center;
  padding: 12px 8px;
  border-left: 1px solid var(--border);
}
.eps-item:last-child { border-left: none; }
.eps-num { font-size: 17px; font-weight: 800; line-height: 1; }
.eps-lbl { font-size: 10px; color: var(--text-muted); margin-top: 3px; font-weight: 600; }

.emp-profile-footer {
  padding: 12px;
  background: #fafafa;
  border-top: 1px solid var(--border);
}

/* Inactive row in users table */
.row-inactive { opacity: .55; }
.row-inactive:hover { opacity: .7; }

/* change-password input fix */
.input-icon-wrap .form-control { padding-right: 40px; }

/* Nav badges */
.nav-badge-count {
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  margin-right: auto;
}

/* Page sections */
.fw-800 { font-weight: 800; }

/* Responsive additions */
@media (max-width: 767px) {
  .emp-profile-stats { flex-wrap: wrap; }
  .eps-item { min-width: 33.33%; }
  .acc-sum-card { padding: 14px; }
}

/* ─── TARGET CARD (Employee Dashboard) ─────────────────────── */
.target-card {
  background: linear-gradient(135deg, #0f172a 0%, #1a2744 100%);
  border: 1px solid rgba(232, 102, 26, .35);
  border-radius: var(--radius);
  overflow: hidden;
}
.target-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 14px;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(232, 102, 26, .12);
}
.target-card-header .bi-bullseye { color: var(--brand); font-size: 16px; }
.target-note {
  font-size: 12px;
  font-weight: 400;
  color: rgba(241, 245, 249, .6);
  margin-right: auto;
}
.target-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.target-row {
  display: grid;
  grid-template-columns: 120px 1fr 46px;
  align-items: center;
  gap: 10px;
}
.target-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(241, 245, 249, .7);
}
.target-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.target-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
  overflow: hidden;
}
.target-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width .6s ease;
}
.target-progress-fill.tpf-near { background: #f59e0b; }
.target-progress-fill.tpf-done { background: #22c55e; }
.target-progress-nums {
  font-size: 11px;
  color: rgba(241, 245, 249, .5);
}
.target-pct {
  font-size: 13px;
  font-weight: 800;
  color: rgba(241, 245, 249, .85);
  text-align: center;
}
@media (max-width: 480px) {
  .target-row { grid-template-columns: 95px 1fr 40px; gap: 7px; }
}

/* ─── TARGET MANAGER CARD ───────────────────────────────────── */
.target-mgr-card.has-target { border-color: rgba(34, 197, 94, .3); }
.pf-warn { background: #f59e0b !important; }

/* ─── TARGET CARD (Employee Dashboard) ─────────────────────── */
.target-card {
  background: linear-gradient(135deg, #0f172a 0%, #1a2744 100%);
  border: 1px solid rgba(232, 102, 26, .35);
  border-radius: var(--radius);
  overflow: hidden;
}
.target-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 14px;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(232, 102, 26, .12);
}
.target-card-header .bi-bullseye { color: var(--brand); font-size: 16px; }
.target-note {
  font-size: 12px;
  font-weight: 400;
  color: rgba(241, 245, 249, .6);
  margin-right: auto;
}
.target-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.target-row {
  display: grid;
  grid-template-columns: 120px 1fr 46px;
  align-items: center;
  gap: 10px;
}
.target-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(241, 245, 249, .7);
}
.target-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.target-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
  overflow: hidden;
}
.target-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width .6s ease;
}
.target-progress-fill.tpf-near { background: #f59e0b; }
.target-progress-fill.tpf-done { background: #22c55e; }
.target-progress-nums {
  font-size: 11px;
  color: rgba(241, 245, 249, .5);
}
.target-pct {
  font-size: 13px;
  font-weight: 800;
  color: rgba(241, 245, 249, .85);
  text-align: center;
}
@media (max-width: 480px) {
  .target-row { grid-template-columns: 95px 1fr 40px; gap: 7px; }
}

/* ─── TARGET MANAGER CARD ───────────────────────────────────── */
.target-mgr-card.has-target { border-color: rgba(34, 197, 94, .3); }
.pf-warn { background: #f59e0b !important; }

/* ─── DASHBOARD TABS ────────────────────────────────────────── */
.dash-tabs {
  border-bottom: 2px solid var(--border);
  gap: 4px;
}
.dash-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  margin-bottom: -2px;
  background: transparent;
  transition: color .2s;
}
.dash-tabs .nav-link:hover { color: var(--brand); }
.dash-tabs .nav-link.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: transparent;
}
.dash-tabs .badge.bg-brand {
  background: var(--brand) !important;
  font-size: 10px; padding: 2px 7px;
}

/* ─── TODAY TAB ─────────────────────────────────────────────── */
.today-tab-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.today-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.today-tab-stat {
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .15s, box-shadow .2s;
}
.today-tab-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tts-icon { font-size: 28px; line-height: 1; }
.tts-val  { font-size: 28px; font-weight: 800; line-height: 1.1; }
.tts-lbl  { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.today-tab-new      .tts-icon { color: #3b82f6; }
.today-tab-new      .tts-val  { color: #3b82f6; }
.today-tab-progress .tts-icon { color: #f59e0b; }
.today-tab-progress .tts-val  { color: #f59e0b; }
.today-tab-ready    .tts-icon { color: #14b8a6; }
.today-tab-ready    .tts-val  { color: #14b8a6; }
.today-tab-delivered .tts-icon { color: var(--success); }
.today-tab-delivered .tts-val  { color: var(--success); }
.today-tab-money    .tts-icon { color: var(--success); }
.today-tab-money    .tts-val  { color: var(--success); }
.today-tab-rev      .tts-icon { color: var(--brand); }
.today-tab-rev      .tts-val  { color: var(--brand); }
@media (max-width: 600px) {
  .today-tab-grid { grid-template-columns: repeat(2, 1fr); }
  .tts-val { font-size: 22px; }
}

/* ─── DASHBOARD TABS ────────────────────────────────────────── */
.dash-tabs {
  border-bottom: 2px solid var(--border);
  gap: 4px;
}
.dash-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  margin-bottom: -2px;
  background: transparent;
  transition: color .2s;
}
.dash-tabs .nav-link:hover { color: var(--brand); }
.dash-tabs .nav-link.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: transparent;
}
.dash-tabs .badge.bg-brand {
  background: var(--brand) !important;
  font-size: 10px; padding: 2px 7px;
}

/* ─── TODAY TAB ─────────────────────────────────────────────── */
.today-tab-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.today-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.today-tab-stat {
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .15s, box-shadow .2s;
}
.today-tab-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tts-icon { font-size: 28px; line-height: 1; }
.tts-val  { font-size: 28px; font-weight: 800; line-height: 1.1; }
.tts-lbl  { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.today-tab-new      .tts-icon { color: #3b82f6; }
.today-tab-new      .tts-val  { color: #3b82f6; }
.today-tab-progress .tts-icon { color: #f59e0b; }
.today-tab-progress .tts-val  { color: #f59e0b; }
.today-tab-ready    .tts-icon { color: #14b8a6; }
.today-tab-ready    .tts-val  { color: #14b8a6; }
.today-tab-delivered .tts-icon { color: var(--success); }
.today-tab-delivered .tts-val  { color: var(--success); }
.today-tab-money    .tts-icon { color: var(--success); }
.today-tab-money    .tts-val  { color: var(--success); }
.today-tab-rev      .tts-icon { color: var(--brand); }
.today-tab-rev      .tts-val  { color: var(--brand); }
@media (max-width: 600px) {
  .today-tab-grid { grid-template-columns: repeat(2, 1fr); }
  .tts-val { font-size: 22px; }
}

/* ══════════════════════════════════════════════════
   PWA SAFE AREA — iOS notch / Android status bar
══════════════════════════════════════════════════ */
@media all and (display-mode: standalone) {
  .sidebar {
    padding-top: env(safe-area-inset-top, 0px);
  }
  .sidebar-header {
    padding-top: max(20px, calc(env(safe-area-inset-top, 0px) + 8px));
  }
  .topbar {
    padding-top: max(0px, env(safe-area-inset-top, 0px));
    height: calc(60px + env(safe-area-inset-top, 0px));
  }
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

.btn-row-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--danger);
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition);
}
.btn-row-delete:hover { background: var(--danger); color: #fff; }

.btn-qs-pay {
  background: #22c55e !important;
  color: #fff !important;
  border-color: #22c55e !important;
}
.btn-qs-pay:hover { background: #16a34a !important; }
