@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 40px;
  cursor: pointer;
}

:root {
  /* ── Cinabon Browns ── */
  --brown-dark: #3D1F10;
  --brown: #6B3A2A;
  --brown-mid: #8B4E35;
  --brown-light: #A0614A;
  --gold-dark: #A0732A;
  --gold: #C8973A;
  --gold-light: #E8B86D;
  --gold-pale: #F5E4C3;

  /* ── Card Gradients (icon boxes) ── */
  --grad-1: linear-gradient(135deg, #6B3A2A 0%, #8B4E35 100%);
  --grad-2: linear-gradient(135deg, #C8973A 0%, #E8B86D 100%);
  --grad-3: linear-gradient(135deg, #3D1F10 0%, #6B3A2A 100%);
  --grad-4: linear-gradient(135deg, #8B4E35 0%, #B06040 100%);
  --grad-5: linear-gradient(135deg, #A0732A 0%, #C8973A 100%);
  --grad-6: linear-gradient(135deg, #5C2E18 0%, #8B4E35 100%);

  /* ── UI Colors (oil station light style) ── */
  --bg: #F4F6F9;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --border: #E8ECF0;
  --border2: #D0D8E4;
  --text: #1A1A2E;
  --text2: #64748B;
  --text3: #94A3B8;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;

  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.10);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);

  --radius: 1.5rem;
  --radius-sm: 0.9rem;
  --radius-lg: 2rem;
  --sidebar-w: 230px;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}

/* ══════════════════════════════════════
   LOGIN
══════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 100%);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 151, 58, 0.2) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.login-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 6px;
}

.login-title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: 4px;
}

.login-sub {
  text-align: center;
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ══════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--brown-dark) 0%, #2A1108 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  z-index: 50;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--grad-2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(200, 151, 58, 0.4);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-title {
  padding: 10px 10px 4px;
  font-size: 0.67rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: right;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--grad-2);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(200, 151, 58, 0.35);
}

.nav-icon {
  font-size: 1rem;
}

.sidebar-footer {
  padding: 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  flex: 1;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--grad-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-name {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ══════════════════════════════════════
   CONTENT
══════════════════════════════════════ */
.content {
  margin-right: var(--sidebar-w);
  flex: 1;
  padding: 28px;
  min-height: 100vh;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.page-header h1 {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text);
}

/* ══════════════════════════════════════
   HOVER LIFT  (oil station hover-lift)
══════════════════════════════════════ */
.hover-lift {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px -12px rgba(107, 58, 42, 0.18);
}

/* ══════════════════════════════════════
   PAGE CARD  (oil station bg-white rounded-[2rem])
══════════════════════════════════════ */
.page-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* ══════════════════════════════════════
   MINI STATS  (oil station QuickStats / top-of-page stats)
══════════════════════════════════════ */
.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.mini-stat {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.28s, box-shadow 0.28s;
  cursor: pointer;
}

.mini-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* icon box color variants */
.icon-box-1 {
  background: var(--grad-1);
  box-shadow: 0 4px 16px rgba(107, 58, 42, 0.35);
}

.icon-box-2 {
  background: var(--grad-2);
  box-shadow: 0 4px 16px rgba(200, 151, 58, 0.35);
}

.icon-box-3 {
  background: var(--grad-3);
  box-shadow: 0 4px 16px rgba(61, 31, 16, 0.4);
}

.icon-box-4 {
  background: var(--grad-4);
  box-shadow: 0 4px 16px rgba(139, 78, 53, 0.3);
}

.icon-box-5 {
  background: var(--grad-5);
  box-shadow: 0 4px 16px rgba(160, 115, 42, 0.35);
}

.icon-box-6 {
  background: var(--grad-6);
  box-shadow: 0 4px 16px rgba(92, 46, 24, 0.35);
}

.mini-stat-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 3px;
}

.mini-stat-label {
  font-size: 0.82rem;
  color: var(--text2);
}

/* ══════════════════════════════════════
   DASHBOARD CHARTS ROW
══════════════════════════════════════ */
.dash-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.chart-sub {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 2px;
}

.chart-filter-btns {
  display: flex;
  gap: 6px;
}

.chart-filter-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  color: var(--text2);
}

.chart-filter-btn.active {
  background: var(--gold-pale);
  color: var(--brown);
}

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 160px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  justify-content: center;
  height: 140px;
}

.bar {
  width: 14px;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
}

.bar-1 {
  background: linear-gradient(to top, var(--brown), var(--brown-light));
}

.bar-2 {
  background: linear-gradient(to top, var(--gold), var(--gold-light));
}

.bar-label {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 600;
}

/* Donut chart */
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donut-svg-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-pct {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
}

.donut-sub {
  font-size: 0.7rem;
  color: var(--text2);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.donut-leg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.donut-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-leg-label {
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-leg-val {
  font-weight: 700;
  color: var(--text);
}

/* ══════════════════════════════════════
   ACTIVITIES + RECENT TABLE (bottom row)
══════════════════════════════════════ */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  cursor: pointer;
}

.activity-item:hover {
  background: var(--gold-pale);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.activity-icon-1 {
  background: rgba(107, 58, 42, 0.1);
}

.activity-icon-2 {
  background: rgba(200, 151, 58, 0.1);
}

.activity-icon-3 {
  background: rgba(139, 78, 53, 0.1);
}

.activity-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.activity-desc {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 2px;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text3);
  white-space: nowrap;
}

/* ══════════════════════════════════════
   INVOICE ROWS  (oil station InvoicesPage)
══════════════════════════════════════ */
.inv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inv-row {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
}

.inv-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.inv-row-id {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
  text-transform: uppercase;
}

.inv-row-date {
  font-size: 0.75rem;
  color: var(--text3);
  margin-top: 2px;
}

.inv-row-customer {
  font-weight: 700;
  color: var(--text);
}

.inv-row-sub {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 2px;
}

.inv-row-amount {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--brown);
}

.inv-row-amount small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text2);
}

/* ══════════════════════════════════════
   STATUS TABS  (oil station tab pills)
══════════════════════════════════════ */
.tab-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-pill {
  padding: 7px 18px;
  border-radius: 10px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  color: var(--text2);
}

.tab-pill.active {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(107, 58, 42, 0.25);
}

.tab-pill:hover:not(.active) {
  background: var(--gold-pale);
  color: var(--brown);
}

/* ══════════════════════════════════════
   EMPLOYEE CARDS  (oil station CustomersPage)
══════════════════════════════════════ */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.emp-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.emp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.emp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.emp-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
}

.emp-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.emp-card-role {
  font-size: 0.8rem;
  color: var(--text2);
}

.emp-card-stats {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emp-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
}

.emp-stat-key {
  color: var(--text2);
}

.emp-stat-val {
  font-weight: 700;
  color: var(--text);
}

/* ══════════════════════════════════════
   MATERIAL CARDS  (oil station InventoryPage)
══════════════════════════════════════ */
.mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.mat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
  position: relative;
}

.mat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.mat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.mat-card-body {
  margin-bottom: 16px;
}

.mat-card-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.mat-card-cat {
  font-size: 0.8rem;
  color: var(--text2);
}

.mat-qty-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.mat-qty-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
}

.mat-qty-label {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 700;
  text-transform: uppercase;
}

.mat-bar-wrap {
  margin-top: 4px;
}

.mat-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text3);
  font-weight: 700;
  margin-bottom: 6px;
}

.mat-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
}

.mat-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.mat-bar-ok {
  background: linear-gradient(90deg, var(--brown), var(--brown-light));
}

.mat-bar-low {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}

.mat-bar-empty {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* ══════════════════════════════════════
   ALERT PANELS  (oil station red/amber banners)
══════════════════════════════════════ */
.alert-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.alert-panel {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.alert-panel-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.alert-panel-sub {
  font-size: 0.8rem;
  opacity: 0.75;
}

.alert-panel-empty {
  background: rgba(107, 58, 42, 0.07);
  border: 1px solid rgba(107, 58, 42, 0.12);
}

.alert-panel-empty .alert-panel-icon {
  background: rgba(107, 58, 42, 0.1);
}

.alert-panel-empty .alert-panel-title {
  color: var(--brown-dark);
}

.alert-panel-empty .alert-panel-sub {
  color: var(--brown);
}

.alert-panel-low {
  background: rgba(200, 151, 58, 0.08);
  border: 1px solid rgba(200, 151, 58, 0.2);
}

.alert-panel-low .alert-panel-icon {
  background: rgba(200, 151, 58, 0.15);
}

.alert-panel-low .alert-panel-title {
  color: var(--gold-dark);
}

.alert-panel-low .alert-panel-sub {
  color: var(--gold);
}

/* search bar (oil station search input) */
.search-bar {
  position: relative;
  flex: 1;
}

.search-bar-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  background: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Cairo', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
  direction: rtl;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 151, 58, 0.2), var(--shadow-sm);
}

.search-input::placeholder {
  color: var(--text3);
}

/* ══════════════════════════════════════
   STATS GRID  ← Colored full cards like oil station
══════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

/* stat cards are fully colored (like oil station StatsCards) */
.stat-card {
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-card:nth-child(1) {
  background: var(--grad-1);
  box-shadow: 0 8px 28px rgba(107, 58, 42, 0.35);
}

.stat-card:nth-child(2) {
  background: var(--grad-2);
  box-shadow: 0 8px 28px rgba(200, 151, 58, 0.35);
}

.stat-card:nth-child(3) {
  background: var(--grad-3);
  box-shadow: 0 8px 28px rgba(61, 31, 16, 0.4);
}

.stat-card:nth-child(4) {
  background: var(--grad-4);
  box-shadow: 0 8px 28px rgba(139, 78, 53, 0.35);
}

.stat-card:nth-child(5) {
  background: var(--grad-5);
  box-shadow: 0 8px 28px rgba(160, 115, 42, 0.35);
}

.stat-card:nth-child(6) {
  background: var(--grad-1);
  box-shadow: 0 8px 28px rgba(107, 58, 42, 0.35);
}

.stat-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ══════════════════════════════════════
   QUICK ACTIONS
══════════════════════════════════════ */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.quick-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.quick-btn:hover {
  background: var(--grad-1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(107, 58, 42, 0.3);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════
   DASH ALERTS
══════════════════════════════════════ */
.dash-alerts {
  margin-bottom: 24px;
}

.dash-alert {
  background: #FFF8E7;
  border: 1px solid #F5D68A;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: #92610A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-alert.danger {
  background: #FFF0F0;
  border-color: #FFBDBD;
  color: #C0392B;
}

/* ══════════════════════════════════════
   CARDS GRID
══════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.cat-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
}

.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-card-body {
  padding: 14px;
}

.cat-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 10px;
}

.cat-card-actions {
  display: flex;
  gap: 6px;
}

/* ══════════════════════════════════════
   BRANCH CARD
══════════════════════════════════════ */
.branch-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-right: 4px solid var(--brown);
  transition: transform 0.2s;
}

.branch-info-card:hover {
  transform: translateY(-3px);
}

.branch-info-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.branch-detail {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.87rem;
  color: var(--text2);
  margin-bottom: 6px;
}

/* ══════════════════════════════════════
   TABLE
══════════════════════════════════════ */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: var(--bg);
  color: var(--text2);
  padding: 13px 16px;
  text-align: right;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover td {
  background: var(--gold-pale);
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success {
  background: #D1FAE5;
  color: #065F46;
}

.badge-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-warning {
  background: #FEF3C7;
  color: #92610A;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(107, 58, 42, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(107, 58, 42, 0.4);
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border2);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.btn-danger:hover {
  background: #FECACA;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  direction: rtl;
}

.form-group select {
  padding-left: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 151, 58, 0.15);
}

.form-row {
  display: flex;
  gap: 14px;
}

.flex-1 {
  flex: 1;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600 !important;
  color: var(--text) !important;
  font-size: 0.88rem;
}

.checkbox-label input {
  width: auto !important;
  accent-color: var(--brown);
}

.img-preview {
  margin-top: 8px;
}

.img-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border2);
}

/* ══════════════════════════════════════
   FILTERS BAR
══════════════════════════════════════ */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.filters-bar select,
.filters-bar input[type="date"],
.filters-bar input[type="number"] {
  padding: 9px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: 'Cairo', sans-serif;
  font-size: 0.87rem;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.filters-bar select {
  padding-left: 40px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}

/* ══════════════════════════════════════
   REPORT TABS
══════════════════════════════════════ */
.report-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.report-tab {
  padding: 9px 24px;
  border: 1px solid var(--border2);
  border-radius: 30px;
  background: var(--white);
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.report-tab.active {
  background: var(--grad-1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(107, 58, 42, 0.3);
}

.report-tab:hover:not(.active) {
  background: var(--gold-pale);
  color: var(--brown);
  border-color: var(--gold);
}

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal-lg {
  max-width: 620px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

form {
  padding: 20px 24px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ══════════════════════════════════════
   SUPPLIER CARDS
══════════════════════════════════════ */
.sup-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sup-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.sup-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.sup-card-detail {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 5px;
}

.sup-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--brown-dark);
  color: #fff;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  z-index: 999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: #065F46;
}

.toast.error {
  background: #991B1B;
}

/* ══════════════════════════════════════
   TEXT HELPERS
══════════════════════════════════════ */
.text-muted {
  color: var(--text2);
  font-size: 0.88rem;
}

.w-full {
  width: 100%;
  justify-content: center;
}

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brown-light);
}

/* ══════════════════════════════════════
   BRANCH CARDS  (oil station customers grid)
══════════════════════════════════════ */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.branch-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.branch-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.branch-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  letter-spacing: 1px;
}

.branch-card-actions-top {
  display: flex;
  gap: 6px;
}

.branch-act-btn {
  width: 34px;
  height: 34px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.branch-act-btn:hover {
  background: var(--gold-pale);
}

.branch-act-btn.danger:hover {
  background: #FEE2E2;
  border-color: #FECACA;
}

.branch-card-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}

.branch-card-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.branch-card-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text2);
}

.branch-card-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════
   TOP HEADER BAR  (oil station Header.tsx)
══════════════════════════════════════ */
.top-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.sidebar-toggle:hover {
  background: var(--gold-pale);
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all 0.3s;
}

.top-search {
  flex: 1;
  position: relative;
  max-width: 420px;
}

.top-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text3);
  pointer-events: none;
}

.top-search-input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  direction: rtl;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.top-search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 151, 58, 0.15);
}

.top-search-input::placeholder {
  color: var(--text3);
}

.top-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.top-bell {
  width: 38px;
  height: 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.top-bell:hover {
  background: var(--gold-pale);
}

.top-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
  transition: background 0.2s;
}

.top-user:hover {
  background: var(--gold-pale);
}

.top-user-name {
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content transition for sidebar collapse */
.content {
  transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════
   SIDEBAR COLLAPSE  (oil station Sidebar.tsx collapsed)
══════════════════════════════════════ */
.sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item span:last-child,
.sidebar.collapsed .user-name,
.sidebar.collapsed .btn-logout {
  display: none;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 22px 0;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .sidebar-footer {
  justify-content: center;
}

.sidebar.collapsed .user-info {
  justify-content: center;
}

.content.shifted {
  margin-right: 72px;
}