    :root {
      --primary: #667eea; --primary-dark: #5a6fd6; --accent: #764ba2;
      --success: #22c55e; --danger: #ef4444; --warning: #f59e0b;
      --text: #1a1a2e; --text-secondary: #4a4a5e; --text-muted: #8e8e9a;
      --bg: #f5f7fb; --card: #ffffff; --border: #e8e8ef; --input-bg: #f3f4f6;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06); --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
      --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
      --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 20px;
      --sidebar-width: 260px;
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh; }
    .login-container { max-width: 420px; margin: 80px auto; background: var(--card); padding: 40px; border-radius: var(--radius-xl); text-align: center; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
    .login-container h2 { font-size: 24px; font-weight: 800; margin: 16px 0; }
    .login-container p { color: var(--text-muted); margin-bottom: 20px; }
    .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-width); height: 100%; background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%); color: white; padding: 20px 0; overflow-y: auto; z-index: 100; transition: transform 0.3s ease; }
    .sidebar .logo { font-size: 20px; font-weight: 800; text-align: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }
    .sidebar .logo i { color: #f59e0b; margin-right: 8px; }
    .nav-item { padding: 12px 20px; margin: 3px 10px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; gap: 12px; color: #b0b0c0; transition: all 0.25s ease; font-size: 14px; font-weight: 500; }
    .nav-item:hover, .nav-item.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(102,126,234,0.3); }
    .nav-item i { width: 20px; text-align: center; font-size: 16px; }
    .main-content { margin-left: var(--sidebar-width); padding: 20px; min-height: 100vh; transition: margin 0.3s ease; }
    .header { background: var(--card); padding: 20px 24px; border-radius: var(--radius-lg); margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
    .header h1 { font-size: 20px; font-weight: 700; }
    .header p { color: var(--text-muted); font-size: 13px; }
    .mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); padding: 8px; }
    .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99; }
    .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
    .stat-card { background: var(--card); padding: 20px; border-radius: var(--radius-lg); display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
    .stat-info h3 { font-size: 26px; font-weight: 800; }
    .stat-info p { color: var(--text-muted); font-size: 13px; margin-top: 4px; font-weight: 500; }
    .section { display: none; animation: fadeIn 0.3s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    .section.active { display: block; }
    .card { background: var(--card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
    .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); flex-wrap: wrap; gap: 10px; }
    .card-header h2 { font-size: 17px; font-weight: 700; }
    .table-container { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; min-width: 600px; }
    th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
    th { background: var(--input-bg); font-weight: 700; font-size: 12px; text-transform: uppercase; }
    tr:hover td { background: #fafbff; }
    .btn { border: none; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; }
    .btn:hover { transform: translateY(-1px); }
    .btn-approve { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
    .btn-reject { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
    .btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
    .btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1a2e; }
    .btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
    .btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
    .btn-info { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; }
    .btn-logout { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; padding: 10px 22px; border-radius: var(--radius-sm); }
    .btn-sm { padding: 5px 10px; font-size: 10px; }
    .btn-xs { padding: 3px 8px; font-size: 9px; }
    .status-pending { background: rgba(245,158,11,0.15); color: #92400e; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
    .status-approved, .status-active, .status-delivered { background: rgba(34,197,94,0.15); color: #15803d; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
    .status-rejected, .status-cancelled { background: rgba(239,68,68,0.15); color: #991b1b; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
    .status-new, .status-processing, .status-preparing, .status-ready, .status-delivering { background: rgba(102,126,234,0.15); color: #5a6fd6; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
    .form-group { margin-bottom: 15px; }
    .form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 12px; text-transform: uppercase; }
    .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 14px; font-family: inherit; background: var(--card); color: var(--text); }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
    .form-row { display: flex; gap: 15px; }
    .form-row .form-group { flex: 1; }
    .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 16px; }
    .modal.show { display: flex; }
    .modal-content { background: var(--card); width: 100%; max-width: 650px; padding: 28px; border-radius: var(--radius-xl); max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
    .modal-content h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
    .product-img { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); }
    .brand-logo-img { width: 60px; height: 60px; object-fit: contain; border-radius: var(--radius-sm); background: var(--input-bg); padding: 4px; }
    .search-box { padding: 10px 14px; margin-bottom: 15px; width: 100%; max-width: 300px; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 13px; }
    .search-box:focus { border-color: var(--primary); }
    .message { padding: 12px; border-radius: var(--radius-sm); margin-top: 10px; font-size: 13px; }
    .message.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
    .message.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
    .badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: rgba(102,126,234,0.1); color: var(--primary); margin: 2px; }
    .discount-badge { background: rgba(239,68,68,0.15); color: #dc2626; }
    .toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: var(--radius); color: white; z-index: 9999; font-weight: 500; font-size: 14px; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; max-width: 380px; }
    .toast.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
    .toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
    .toast.info { background: linear-gradient(135deg, #667eea, #764ba2); }
    @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    @media (max-width: 768px) {
      .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); }
      .sidebar-overlay.show { display: block; } .main-content { margin-left: 0; }
      .mobile-menu-btn { display: block; } .form-row { flex-direction: column; }
      .modal-content { max-width: 95%; padding: 20px; }
    }

        :root{--primary:#e4002b;--bg:#f8f9fa;--card:#fff;--text:#1a1a2e;--border:#e8e8ef;--success:#22c55e;--danger:#ef4444;--warning:#f59e0b}
        *{margin:0;padding:0;box-sizing:border-box}
        body{font-family:-apple-system,BlinkMacSystemFont,sans-serif;background:var(--bg);color:var(--text);padding:20px}
        .container{max-width:900px;margin:0 auto}
        .header{background:var(--primary);color:white;padding:20px;border-radius:16px;margin-bottom:20px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
        .header h1{font-size:22px}
        .back-btn{background:rgba(255,255,255,0.2);color:white;border:none;padding:10px 18px;border-radius:10px;cursor:pointer;font-size:14px}
        .card{background:var(--card);border-radius:16px;padding:20px;margin-bottom:16px;box-shadow:0 1px 3px rgba(0,0,0,0.06)}
        .card h2{font-size:18px;margin-bottom:16px;display:flex;align-items:center;gap:8px}
        .form-row{display:flex;gap:12px;margin-bottom:12px;flex-wrap:wrap}
        .form-group{flex:1;min-width:200px}
        .form-group label{display:block;font-size:12px;font-weight:600;margin-bottom:4px;color:#666}
        .form-group input,.form-group select{width:100%;padding:10px 14px;border:2px solid var(--border);border-radius:10px;font-size:14px}
        .form-group input:focus,.form-group select:focus{border-color:var(--primary);outline:none}
        .btn{padding:10px 20px;border:none;border-radius:10px;font-weight:600;cursor:pointer;font-size:14px;display:inline-flex;align-items:center;gap:6px}
        .btn-primary{background:var(--primary);color:white}
        .btn-success{background:var(--success);color:white}
        .btn-danger{background:var(--danger);color:white;padding:6px 12px;font-size:12px}
        .btn-warning{background:var(--warning);color:white;padding:6px 12px;font-size:12px}
        .btn-outline{background:white;border:2px solid var(--border);color:var(--text)}
        .table-wrapper{overflow-x:auto}
        table{width:100%;border-collapse:collapse;font-size:14px}
        th{background:#f8f8f8;padding:12px;text-align:left;font-weight:600;font-size:12px;color:#666}
        td{padding:12px;border-bottom:1px solid var(--border)}
        .badge{background:#e8f5e9;color:#2e7d32;padding:4px 10px;border-radius:20px;font-size:11px;font-weight:600}
        .actions{display:flex;gap:6px}
        .toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#1a1a2e;color:white;padding:14px 24px;border-radius:12px;z-index:1000;font-size:14px}
        .loading{text-align:center;padding:40px;color:#999}
        .login-prompt{text-align:center;padding:60px;color:#999}
        @media(max-width:640px){.form-row{flex-direction:column}.header h1{font-size:18px}}

  :root {
      --primary: #e4002b;
      --primary-dark: #c4001f;
      --success: #22c55e;
      --danger: #ef4444;
      --warning: #f59e0b;
      --info: #3b82f6;
      --text: #1a1a2e;
      --text-secondary: #4a4a5e;
      --text-muted: #8e8e9a;
      --bg: #f8f9fa;
      --card: #ffffff;
      --border: #e8e8ef;
      --input-bg: #f3f4f6;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
      --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
      --radius-sm: 8px;
      --radius: 12px;
      --radius-lg: 16px;
      --radius-xl: 20px;
      --safe-bottom: env(safe-area-inset-bottom, 0px);
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: var(--bg);
      color: var(--text);
      padding-bottom: calc(80px + var(--safe-bottom));
      -webkit-font-smoothing: antialiased;
      line-height: 1.5;
      min-height: 100vh;
    }
    .top-bar { background: var(--primary); color: white; padding: 8px 16px; text-align: center; font-size: 12px; font-weight: 600; }
    .status-bar {
      background: rgba(255,255,255,0.98);
      padding: 12px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 100;
      backdrop-filter: blur(20px);
    }
    .header-left { display: flex; align-items: center; gap: 12px; }
    .back-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      background: var(--input-bg);
      border: none;
      font-size: 16px;
      color: var(--text);
    }
    .logo { font-size: 22px; font-weight: 900; color: var(--primary); cursor: pointer; display: flex; align-items: center; gap: 8px; }
    .logo img { height: 32px; object-fit: contain; }
    .employee-badge {
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      color: white;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 600;
      margin-left: 8px;
    }
    .header-right { display: flex; gap: 12px; align-items: center; }
    .header-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: white;
      font-weight: 700;
      font-size: 16px;
    }
    .container { max-width: 1400px; margin: 0 auto; padding: 20px; }
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }
    .stat-card {
      background: var(--card);
      padding: 20px;
      border-radius: var(--radius-lg);
      text-align: center;
      box-shadow: var(--shadow-sm);
      border: 1px solid var(--border);
    }
    .stat-card h3 { font-size: 28px; font-weight: 800; color: var(--primary); }
    .stat-card p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
    .section {
      background: var(--card);
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 20px;
      border: 1px solid var(--border);
    }
    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap;
      gap: 12px;
    }
    .section-header h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
    .section-header h2 i { color: var(--primary); }
    .btn {
      padding: 10px 20px;
      border: none;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-weight: 600;
      font-size: 13px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
    }
    .btn:hover { transform: translateY(-1px); }
    .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
    .btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
    .btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
    .btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
    .btn-info { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
    .btn-sm { padding: 6px 12px; font-size: 11px; }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--text-secondary); }
    .form-group input, .form-group select, .form-group textarea {
      width: 100%;
      padding: 12px 14px;
      border: 2px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-family: inherit;
      background: var(--card);
      color: var(--text);
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
      outline: none;
      border-color: var(--primary);
    }
    .form-row { display: flex; gap: 16px; flex-wrap: wrap; }
    .form-row .form-group { flex: 1; min-width: 200px; }
    .table-container { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; }
    th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
    th { background: var(--input-bg); font-weight: 700; font-size: 12px; text-transform: uppercase; }
    tr:hover td { background: var(--bg); }
    .status-active { background: rgba(34,197,94,0.15); color: #15803d; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
    .status-inactive { background: rgba(239,68,68,0.15); color: #991b1b; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
    .product-select-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      margin-bottom: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .product-select-item:hover { background: var(--input-bg); border-color: var(--primary); }
    .product-select-item.selected { background: rgba(228,0,43,0.05); border-color: var(--primary); }
    .product-select-item img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }
    .selected-products-list {
      background: var(--bg);
      padding: 12px;
      border-radius: var(--radius-sm);
      margin-top: 12px;
    }
    .selected-product-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 12px;
      background: white;
      border-radius: var(--radius-sm);
      margin-bottom: 6px;
    }
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.6);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
    .modal.show { display: flex; }
    .modal-content {
      background: var(--card);
      width: 100%;
      max-width: 800px;
      max-height: 90vh;
      overflow-y: auto;
      border-radius: var(--radius-xl);
    }
    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 18px 22px;
      border-bottom: 1px solid var(--border);
    }
    .modal-header h3 { font-size: 18px; font-weight: 700; }
    .close-modal { font-size: 24px; cursor: pointer; color: var(--text-muted); }
    .modal-body { padding: 22px; }
    .toast {
      position: fixed;
      bottom: 100px;
      left: 16px;
      right: 16px;
      max-width: 440px;
      margin: 0 auto;
      background: #1a1a2e;
      color: #fff;
      padding: 14px 20px;
      border-radius: var(--radius);
      text-align: center;
      z-index: 1001;
    }
    .toast.error { background: rgba(239,68,68,0.95); }
    .loader { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.6s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .login-container {
      max-width: 420px;
      margin: 80px auto;
      background: var(--card);
      padding: 40px;
      border-radius: var(--radius-xl);
      text-align: center;
      box-shadow: var(--shadow-lg);
    }
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(255,255,255,0.98);
      backdrop-filter: blur(20px);
      display: flex;
      justify-content: space-around;
      padding: 8px;
      padding-bottom: calc(8px + var(--safe-bottom));
      border-top: 1px solid var(--border);
      z-index: 100;
    }
    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      cursor: pointer;
      padding: 8px 14px;
      border-radius: 12px;
      text-decoration: none;
    }
    .nav-item i { font-size: 20px; color: var(--text-muted); }
    .nav-item.active i, .nav-item.active span { color: var(--primary); }
    .nav-item span { font-size: 10px; color: var(--text-muted); font-weight: 600; }
  :root {
      --primary: #667eea; --primary-dark: #5a6fd6; --accent: #764ba2;
      --success: #22c55e; --danger: #ef4444; --warning: #f59e0b; --info: #06b6d4;
      --text: #1a1a2e; --text-secondary: #4a4a5e; --text-muted: #8e8e9a;
      --bg: #f5f7fb; --card: #ffffff; --border: #e8e8ef; --input-bg: #f3f4f6;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06); --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
      --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
      --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 20px;
      --sidebar-width: 260px;
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; min-height: 100vh; }
    .login-container { max-width: 420px; margin: 80px auto; background: var(--card); padding: 40px; border-radius: var(--radius-xl); text-align: center; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
    .login-container h2 { font-size: 24px; font-weight: 800; margin: 16px 0; }
    .login-container p { color: var(--text-muted); margin-bottom: 20px; }
    .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-width); height: 100%; background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%); color: white; padding: 20px 0; overflow-y: auto; z-index: 100; transition: transform 0.3s ease; }
    .sidebar .logo { font-size: 20px; font-weight: 800; text-align: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }
    .sidebar .logo i { color: #f59e0b; margin-right: 8px; }
    .nav-item { padding: 12px 20px; margin: 3px 10px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; gap: 12px; color: #b0b0c0; transition: all 0.25s ease; font-size: 14px; font-weight: 500; }
    .nav-item:hover, .nav-item.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(102,126,234,0.3); }
    .nav-item i { width: 20px; text-align: center; font-size: 16px; }
    .main-content { margin-left: var(--sidebar-width); padding: 20px; min-height: 100vh; transition: margin 0.3s ease; }
    .header { background: var(--card); padding: 16px 24px; border-radius: var(--radius-lg); margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
    .header h1 { font-size: 20px; font-weight: 700; }
    .header p { color: var(--text-muted); font-size: 13px; }
    .mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); padding: 8px; }
    .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 99; }
    .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
    .stat-card { background: var(--card); padding: 16px; border-radius: var(--radius-lg); display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
    .stat-info h3 { font-size: 22px; font-weight: 800; }
    .stat-info p { color: var(--text-muted); font-size: 12px; margin-top: 2px; font-weight: 500; }
    .section { display: none; animation: fadeIn 0.3s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    .section.active { display: block; }
    .card { background: var(--card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
    .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); flex-wrap: wrap; gap: 10px; }
    .card-header h2 { font-size: 17px; font-weight: 700; }
    .table-container { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; min-width: 600px; }
    th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
    th { background: var(--input-bg); font-weight: 700; font-size: 11px; text-transform: uppercase; }
    tr:hover td { background: #fafbff; }
    .btn { border: none; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
    .btn:hover { transform: translateY(-1px); }
    .btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
    .btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
    .btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1a2e; }
    .btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
    .btn-info { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; }
    .btn-logout { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; padding: 8px 18px; border-radius: var(--radius-sm); }
    .btn-sm { padding: 5px 10px; font-size: 10px; }
    .btn-xs { padding: 3px 8px; font-size: 9px; }
    .badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; margin: 2px; }
    .badge-active { background: rgba(34,197,94,0.15); color: #15803d; }
    .badge-inactive { background: rgba(239,68,68,0.15); color: #991b1b; }
    .badge-role { background: rgba(102,126,234,0.1); color: var(--primary); }
    .form-group { margin-bottom: 12px; }
    .form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 11px; text-transform: uppercase; }
    .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 13px; font-family: inherit; background: var(--card); color: var(--text); }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
    .form-row { display: flex; gap: 12px; }
    .form-row .form-group { flex: 1; }
    .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 16px; }
    .modal.show { display: flex; }
    .modal-content { background: var(--card); width: 100%; max-width: 600px; padding: 24px; border-radius: var(--radius-xl); max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
    .modal-content h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
    .toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: var(--radius); color: white; z-index: 9999; font-weight: 500; font-size: 14px; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; max-width: 380px; }
    .toast.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
    .toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
    .toast.info { background: linear-gradient(135deg, #667eea, #764ba2); }
    @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    .permission-tag { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 500; margin: 1px; }
    .permission-tag.allowed { background: #dcfce7; color: #15803d; }
    .permission-tag.denied { background: #fef2f2; color: #991b1b; }
    .product-img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
    .search-box { padding: 8px 12px; margin-bottom: 12px; width: 100%; max-width: 300px; border: 2px solid var(--border); border-radius: var(--radius-sm); outline: none; font-size: 13px; }
    .search-box:focus { border-color: var(--primary); }
    @media (max-width: 768px) {
      .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); }
      .sidebar-overlay.show { display: block; } .main-content { margin-left: 0; }
      .mobile-menu-btn { display: block; } .form-row { flex-direction: column; }
      .modal-content { max-width: 95%; padding: 16px; }
    }
   :root{--primary:#667eea;--primary-dark:#5a6fd6;--accent:#764ba2;--success:#22c55e;--danger:#ef4444;--warning:#f59e0b;--info:#06b6d4;--text:#1a1a2e;--text-secondary:#4a4a5e;--text-muted:#8e8e9a;--bg:#f5f7fb;--card:#ffffff;--border:#e8e8ef;--input-bg:#f3f4f6;--shadow-sm:0 1px 3px rgba(0,0,0,0.06);--shadow-md:0 4px 12px rgba(0,0,0,0.08);--shadow-lg:0 10px 25px rgba(0,0,0,0.1);--radius-sm:8px;--radius:12px;--radius-lg:16px;--radius-xl:20px}
        *{margin:0;padding:0;box-sizing:border-box}
        body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;line-height:1.5;min-height:100vh}
        .login-container{max-width:420px;margin:80px auto;background:var(--card);padding:40px;border-radius:var(--radius-xl);text-align:center;box-shadow:var(--shadow-lg);border:1px solid var(--border)}
        .login-container h2{font-size:24px;font-weight:800;margin:16px 0}
        .login-container p{color:var(--text-muted);margin-bottom:20px;font-size:14px}
        .header{background:linear-gradient(135deg,#1a1a2e 0%,#16213e 100%);color:white;padding:16px 24px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
        .header h1{font-size:20px;font-weight:700}
        .header .employee-info{display:flex;align-items:center;gap:12px}
        .header .employee-info span{font-size:14px;opacity:0.9}
        .content{padding:20px;max-width:1400px;margin:0 auto}
        .card{background:var(--card);border-radius:var(--radius-lg);padding:20px;margin-bottom:16px;box-shadow:var(--shadow-sm);border:1px solid var(--border)}
        .card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-wrap:wrap;gap:10px}
        .card-header h2{font-size:17px;font-weight:700}
        .table-container{overflow-x:auto}
        table{width:100%;border-collapse:collapse;min-width:700px}
        th,td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);font-size:13px}
        th{background:var(--input-bg);font-weight:700;font-size:11px;text-transform:uppercase;color:var(--text-secondary)}
        tr:hover td{background:#fafbff}
        .product-img{width:50px;height:50px;object-fit:cover;border-radius:var(--radius-sm)}
        .search-box{padding:10px 14px;margin-bottom:15px;width:100%;max-width:300px;border:2px solid var(--border);border-radius:var(--radius-sm);outline:none;font-size:13px}
        .search-box:focus{border-color:var(--primary)}
        .btn{border:none;padding:8px 16px;border-radius:var(--radius-sm);cursor:pointer;font-weight:600;font-size:12px;display:inline-flex;align-items:center;gap:6px;text-transform:uppercase;transition:all 0.2s}
        .btn:hover{transform:translateY(-1px);box-shadow:var(--shadow-md)}
        .btn-primary{background:linear-gradient(135deg,#667eea,#764ba2);color:white}
        .btn-success{background:linear-gradient(135deg,#22c55e,#16a34a);color:white}
        .btn-danger{background:linear-gradient(135deg,#ef4444,#dc2626);color:white}
        .btn-info{background:linear-gradient(135deg,#06b6d4,#0891b2);color:white}
        .btn-sm{padding:5px 10px;font-size:10px}
        .btn-xs{padding:3px 7px;font-size:9px}
        .btn-logout{background:rgba(255,255,255,0.2);color:white;padding:8px 16px;border-radius:var(--radius-sm);border:1px solid rgba(255,255,255,0.3);cursor:pointer;font-weight:600;font-size:13px}
        .form-group{margin-bottom:14px}
        .form-group label{display:block;margin-bottom:5px;font-weight:600;font-size:12px;text-transform:uppercase}
        .form-group input,.form-group select,.form-group textarea{width:100%;padding:11px 14px;border:2px solid var(--border);border-radius:var(--radius-sm);outline:none;font-size:14px;font-family:inherit;background:var(--card);color:var(--text)}
        .form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,126,234,0.1)}
        .form-row{display:flex;gap:15px}.form-row .form-group{flex:1}
        .badge{display:inline-block;padding:4px 10px;border-radius:20px;font-size:11px;font-weight:600;background:rgba(102,126,234,0.1);color:var(--primary);margin:2px}
        .discount-badge{background:rgba(239,68,68,0.15);color:#dc2626}
        .var-badge{background:rgba(34,197,94,0.15);color:#15803d}
        .variation-section{border:1.5px dashed var(--border);border-radius:var(--radius-sm);padding:12px;margin-top:10px}
        .variation-row{display:flex;gap:6px;align-items:center;margin-bottom:6px;flex-wrap:wrap}
        .variation-row input{flex:1;min-width:70px;padding:7px 9px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:12px;background:var(--card);color:var(--text)}
        .variation-row input:focus{border-color:var(--primary);outline:none}
        .variation-row input.small{flex:0.5;min-width:60px}
        .modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6);z-index:1000;backdrop-filter:blur(4px);align-items:center;justify-content:center;padding:16px}
        .modal.show{display:flex}
        .modal-content{background:var(--card);width:100%;max-width:600px;padding:28px;border-radius:var(--radius-xl);max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.3)}
        .modal-content h3{font-size:18px;font-weight:700;margin-bottom:20px}
        .message{padding:12px;border-radius:var(--radius-sm);margin-top:10px;font-size:13px}
        .message.success{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0}
        .message.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
        .toast{position:fixed;top:20px;right:20px;padding:12px 20px;border-radius:var(--radius);color:white;z-index:9999;font-weight:500;font-size:14px;box-shadow:var(--shadow-lg);animation:slideIn 0.3s ease;max-width:380px}
        .toast.success{background:linear-gradient(135deg,#22c55e,#16a34a)}
        .toast.error{background:linear-gradient(135deg,#ef4444,#dc2626)}
        .toast.info{background:linear-gradient(135deg,#667eea,#764ba2)}
        @keyframes slideIn{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}
        @media(max-width:768px){.form-row{flex-direction:column}.modal-content{max-width:95%;padding:20px}.variation-row{flex-direction:column}}
 :root {
            --ios-blue: #007AFF;
            --ios-red: #FF3B30;
            --ios-orange: #FF9500;
            --ios-green: #34C759;
            --ios-purple: #AF52DE;
            
            --bg: #F2F2F7;
            --card: #FFFFFF;
            --text: #000000;
            --text-secondary: #8E8E93;
            --separator: #E5E5EA;
            --fill: #F2F2F7;
            
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
            --radius-lg: 20px;
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.4;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            padding-top: var(--safe-top);
            padding-bottom: var(--safe-bottom);
        }

        /* Login */
        .login-overlay {
            position: fixed; top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.4);
            z-index: 1000;
            display: none;
            align-items: center; justify-content: center;
            backdrop-filter: blur(4px);
        }
        .login-overlay.show { display: flex; }

        .login-card {
            background: var(--card);
            padding: 32px 24px;
            border-radius: var(--radius-lg);
            text-align: center;
            max-width: 360px; width: 90%;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
        }

        .login-icon {
            width: 72px; height: 72px;
            border-radius: 18px;
            background: linear-gradient(135deg, #5856D6, #AF52DE);
            display: flex; align-items: center; justify-content: center;
            font-size: 36px;
            margin: 0 auto 16px;
        }

        .login-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
        .login-card p { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; }

        /* Nav Bar */
        .nav-bar {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: saturate(180%) blur(20px);
            -webkit-backdrop-filter: saturate(180%) blur(20px);
            border-bottom: 0.5px solid var(--separator);
            position: sticky; top: 0; z-index: 100;
        }

        .nav-content {
            display: flex; justify-content: space-between; align-items: center;
            padding: 12px 16px; max-width: 600px; margin: 0 auto;
        }

        .nav-title { font-size: 17px; font-weight: 600; letter-spacing: -0.2px; }
        .nav-actions { display: flex; align-items: center; gap: 8px; }

        .avatar-ring {
            width: 32px; height: 32px; border-radius: 50%;
            background: linear-gradient(135deg, #5856D6, #AF52DE);
            display: flex; align-items: center; justify-content: center;
            color: white; font-weight: 600; font-size: 14px;
        }

        /* Cards */
        .cards-container {
            padding: 20px 16px;
            max-width: 600px; margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .nav-card {
            background: var(--card);
            border-radius: var(--radius-lg);
            padding: 24px 16px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            color: var(--text);
            box-shadow: var(--shadow-sm);
            display: flex; flex-direction: column; align-items: center; gap: 10px;
            position: relative;
        }

        .nav-card:active { transform: scale(0.96); }

        .nav-card .card-icon {
            width: 56px; height: 56px;
            border-radius: 16px;
            display: flex; align-items: center; justify-content: center;
            font-size: 26px;
        }

        .nav-card.dashboard .card-icon { background: #E8F2FF; }
        .nav-card.orders .card-icon { background: #FFF3E0; }
        .nav-card.inventory .card-icon { background: #E8F8ED; }
        .nav-card.users .card-icon { background: #F3E8FF; }
        .nav-card.deals .card-icon { background: #FFE5E5; }
        .nav-card.products .card-icon { background: #E0F2FE; }

        .nav-card h3 { font-size: 15px; font-weight: 600; }
        .nav-card p { font-size: 12px; color: var(--text-secondary); }

        /* Buttons */
        .btn-ios {
            display: inline-flex; align-items: center; justify-content: center;
            gap: 4px; padding: 6px 14px; border-radius: 20px;
            font-size: 13px; font-weight: 600; border: none; cursor: pointer;
            transition: all 0.2s; font-family: inherit; min-height: 32px;
            text-decoration: none;
        }
        .btn-ios:active { transform: scale(0.96); }
        .btn-ios.primary { background: var(--ios-blue); color: white; }
        .btn-ios.danger { background: var(--ios-red); color: white; }
        .btn-ios.small { padding: 4px 10px; font-size: 11px; min-height: 26px; border-radius: 14px; }
        .btn-ios.block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; border-radius: 14px; }

        /* Loading */
        .loading-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(242, 242, 247, 0.9); z-index: 9998;
            display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
        }
        .loading-overlay.show { display: flex; }

        .spinner-ios {
            width: 32px; height: 32px;
            border: 3px solid var(--fill);
            border-top-color: var(--ios-blue);
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        @media (max-width: 400px) {
            .cards-container { gap: 10px; padding: 16px 12px; }
            .nav-card { padding: 20px 12px; }
        }
