/* =========================================================
   1. ROOT VARIABLES
========================================================= */
:root {
    --dark: #0E0E25;
    --primary: #4B4DAE;
    --gold: #CC921D;
  
    --border-light: #e5e7eb;
    --text-muted: #6b7280;
    --text-muted-dark: #9ca3af;
  }
  
  /* =========================================================
     2. BASE
  ========================================================= */
  
  
  /* =========================================================
     LOGIN COMPONENTS
  ========================================================= */
  
  .login-btn-primary {
    background: var(--gold);
    color: var(--dark);
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 10px;
    transition: background 0.2s ease;
  }
  
  .login-btn-primary:hover {
    background: #b8821a;
  }
  
  .login-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
  }
  
  .login-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
  }
  
  /* =========================================================
     3. SIDEBAR (Collapsed Logic)
  ========================================================= */
  #sidebar.collapsed .submenu {
    display: none !important;
  }
  
  #sidebar.collapsed .sidebar-chevron {
    display: none;
  }
  
  #sidebar.collapsed nav a,
  #sidebar.collapsed nav button {
    justify-content: center;
  }
  
  #sidebar.collapsed .submenu {
    margin-left: 0;
  }
  
  /* =========================================================
     4. INPUTS & BUTTONS
  ========================================================= */
  .input,
  .filter-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: white;
    font-size: 14px;
    color: #111827;
  }
  
  .dark .input,
  .dark .filter-input {
    background: var(--dark);
    border-color: rgba(255,255,255,0.1);
    color: white;
  }
  
  .input:focus,
  .filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
  }
  
  /* Primary Button */
  .btn-primary {
    background: var(--gold);
    color: var(--dark);
    font-weight: 600;
  }
  
  .btn-primary:hover {
    background: #b8821a;
  }
  
  /* =========================================================
     5. KPI / STATS CARDS (Shared)
  ========================================================= */
  .kpi-card,
  .order-stat {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
  }
  
  .dark .kpi-card,
  .dark .order-stat {
    background: var(--dark);
    border-color: rgba(255,255,255,0.1);
  }
  
  .kpi-card:hover,
  .order-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  }
  
  /* Icon */
  .kpi-icon,
  .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }
  
  /* Text */
  .kpi-label,
  .stat-label {
    font-size: 13px;
    color: var(--text-muted);
  }
  
  .dark .kpi-label,
  .dark .stat-label {
    color: var(--text-muted-dark);
  }
  
  .kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
  }
  
  .stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
  }
  
  .dark .kpi-value,
  .dark .stat-value {
    color: white;
  }
  
  .kpi-trend {
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  
  .wallet-card {
    border: 1px solid #e5e7eb;        /* border */
    border-radius: 0.75rem;           /* rounded-xl */
    padding: 1rem;                    /* p-4 */
  }
  
  /* Dark mode */
  .dark .wallet-card {
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .wallet-label {
    font-size: 0.875rem;              /* text-sm */
    color: #6b7280;                   /* text-gray-500 */
  }
  
  .wallet-value {
    font-size: 1.25rem;               /* text-xl */
    font-weight: 600;                 /* font-semibold */
    color: #111827;                   /* text-dark */
  }
  
  .dark .wallet-value {
    color: #ffffff;
  }
  
  .wallet-sub {
    font-size: 0.75rem;               /* text-xs */
    color: #9ca3af;                   /* text-gray-400 */
  }
  
  .stat-row {
    display: flex;                    /* flex */
    justify-content: space-between;   /* justify-between */
    border-bottom: 1px solid #e5e7eb; /* border-b */
    padding-bottom: 0.5rem;           /* pb-2 */
  }
  
  .stat-row:last-child {
    border-bottom: none;              /* last:border-0 */
  }
  
  .activity-row {
    display: flex;                    /* flex */
    align-items: center;              /* items-center */
    justify-content: space-between;   /* justify-between */
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
  }
  
  .activity-row:last-child {
    border-bottom: none;
  }
  
  .activity-meta {
    font-size: 0.75rem;               /* text-xs */
    color: #9ca3af;                   /* text-gray-400 */
  }
  
  /* =========================================================
     6. FILTERS & CHIPS
  ========================================================= */
  .filter-chip {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #f3f4f6;
    color: #374151;
    transition: all 0.2s ease;
  }
  
  .dark .filter-chip {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
  }
  
  .filter-chip:hover {
    background: #e5e7eb;
  }
  
  .dark .filter-chip:hover {
    background: rgba(255,255,255,0.15);
  }
  
  .filter-chip.active {
    background: var(--primary);
    color: white;
  }
  
  /* Active Filter Badge */
  .active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--primary);
    color: white;
  }
  
  .active-filter .remove-filter {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* =========================================================
     7. STATUS BADGES
  ========================================================= */
  .status-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
  }
  
  .status-badge.active {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
  }
  
  .status-badge.pending {
    background: rgba(234,179,8,0.15);
    color: #eab308;
  }
  
  .status-badge.completed {
    background: rgba(59,130,246,0.15);
    color: #3b82f6;
  }
  
  .status-badge.cancelled {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
  }
  
  /* =========================================================
     8. ACTION MENU
  ========================================================= */
  .action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    color: var(--dark);
  }
  
  .dark .action-item {
    color: #e5e7eb;
  }
  
  .action-item i {
    width: 16px;
  }
  
  .action-item:hover {
    background: rgba(75,77,174,0.1);
  }
  
  .dark .action-item:hover {
    background: rgba(255,255,255,0.08);
  }
  
  .action-item.text-red-500 {
    color: #ef4444;
  }
  
  .dark .action-item.text-red-500 {
    color: #f87171;
  }
  
  /* =========================================================
     9. SECTIONS & TIMELINE
  ========================================================= */
  .section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
  }
  
  .dark .section-title {
    color: var(--text-muted-dark);
  }
  
  /* Timeline */
  .timeline-item {
    position: relative;
    padding-left: 26px;
    font-size: 14px;
    color: var(--text-muted);
  }
  
  .timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
  }
  
  .timeline-item.done {
    color: #22c55e;
  }
  
  .timeline-item.done::before {
    background: #22c55e;
  }
  
  .timeline-item.active {
    color: var(--primary);
    font-weight: 600;
  }
  
  .timeline-item.active::before {
    background: var(--primary);
  }
  
  .settings-tab {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
  }
  
  .settings-tab:hover {
    background: rgba(75,77,174,0.08);
    color: #4B4DAE;
  }
  
  .settings-tab.active {
    background: rgba(75,77,174,0.12);
    color: #4B4DAE;
  }
  
  .settings-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
  }
  
  .dark .settings-panel {
    background: #0E0E25;
    border-color: rgba(255,255,255,0.1);
  }
  
  .label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    display: block;
  }
  
  .doc-card {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
  }
  
  .dark .doc-card {
    background: #0E0E25;
    border-color: rgba(255,255,255,0.1);
  }
  
  .doc-card.upload {
    border-style: dashed;
    text-align: center;
    color: #6b7280;
    cursor: pointer;
  }
  
  .doc-status.success {
    font-size: 12px;
    color: #22c55e;
  }
  