*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --bg: #0f1117; --surface: #1a1d27; --border: rgba(255,255,255,0.08);
      --primary: #6366f1; --primary-light: #a5b4fc;
      --text: #e2e8f0; --muted: #64748b; --success: #10b981; --danger: #ef4444; --warning: #f59e0b;
    }
    body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

    /* Auth screen */
    #authScreen {
      display: flex; align-items: center; justify-content: center; min-height: 100vh;
    }
    .auth-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
      padding: 40px; width: 360px; text-align: center;
    }
    .auth-card h1 { font-size: 22px; margin-bottom: 8px; }
    .auth-card p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
    .auth-card input {
      width: 100%; height: 44px; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
      border-radius: 8px; color: var(--text); padding: 0 14px; font-size: 14px; margin-bottom: 12px;
      font-family: monospace; letter-spacing: 0.05em;
    }
    .auth-card input:focus { outline: none; border-color: var(--primary); }
    .btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px;
      border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none;
      transition: all 0.2s; font-family: inherit; }
    .btn-primary { background: var(--primary); color: #fff; justify-content: center; }
    .btn-primary:hover { background: #5254d4; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.2); }
    .auth-card .btn { width: 100%; justify-content: center; height: 44px; }
    .btn-danger  { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
    .btn-danger:hover  { background: rgba(239,68,68,0.25); }
    .btn-success { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
    .btn-success:hover { background: rgba(16,185,129,0.25); }
    .btn-muted   { background: rgba(255,255,255,0.06); color: var(--muted); }
    .btn-muted:hover { background: rgba(255,255,255,0.1); }

    .layout { display: flex; min-height: 100vh; }
    .sidebar { width: 250px; background: var(--surface); border-right: 1px solid var(--border); padding: 24px 0; flex-shrink: 0; }
    .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
    
    .sidebar-header { padding: 0 24px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
    .sidebar-logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: #fff; }
    .sidebar-menu { list-style: none; padding: 0 12px; }
    .sidebar-menu li { margin-bottom: 4px; }
    .sidebar-menu a {
      display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--muted); text-decoration: none;
      font-size: 14px; font-weight: 500; border-radius: 8px; transition: all 0.2s;
    }
    .sidebar-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
    .sidebar-menu a.active { background: rgba(99,102,241,0.15); color: var(--primary-light); }
    .sidebar-icon { font-size: 18px; }

    /* Main layout */
    #mainLayout { display: none; }
    .topbar {
      background: var(--surface); border-bottom: 1px solid var(--border);
      padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between;
    }
    .logo-dot { width: 28px; height: 28px; background: linear-gradient(135deg, var(--primary), #8b5cf6);
      border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
    .topbar-title { font-size: 16px; font-weight: 600; color: var(--text); }
    .topbar-right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
    .badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
    .badge-green { background: rgba(16,185,129,0.15); color: #6ee7b7; }
    .badge-red   { background: rgba(239,68,68,0.15);  color: #fca5a5; }
    .badge-yellow{ background: rgba(245,158,11,0.15); color: #fcd34d; }
    .badge-blue  { background: rgba(99,102,241,0.15); color: #a5b4fc; }

    .container { width: 100%; max-width: 100%; padding: 32px; overflow-y: auto; }

    /* Stats */
    .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
    .stat-card {
      background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
      padding: 20px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: all 0.2s;
    }
    .stat-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
    .stat-card.active { border-color: var(--primary-light); background: rgba(99,102,241,0.05); }
    .stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
    .stat-value { font-size: 28px; font-weight: 700; }

    /* Table */
    .card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
    .card-header {
      padding: 16px 20px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .card-title { font-size: 15px; font-weight: 600; }
    table { width: 100%; border-collapse: collapse; }
    th {
      text-align: left; padding: 11px 16px; font-size: 11px; font-weight: 600;
      color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase;
      border-bottom: 1px solid var(--border); white-space: nowrap;
    }
    td { padding: 13px 16px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
    tr:last-child td { border-bottom: none; }
    tr:hover td { background: rgba(255,255,255,0.02); }
    .key-cell { font-family: monospace; font-size: 12px; font-weight: 600; color: var(--primary-light); letter-spacing: 0.05em; }
    .actions { display: flex; gap: 6px; }

    /* Modal */
    .modal-overlay {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
      align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px);
    }
    .modal-overlay.open { display: flex; }
    .modal {
      background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
      width: 480px; max-width: 95vw; padding: 32px;
    }
    .modal h2 { font-size: 18px; margin-bottom: 20px; }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
    .form-group select, .form-group input, .form-group textarea {
      width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
      border-radius: 8px; color: var(--text); padding: 0 14px; height: 42px; font-size: 13px; font-family: inherit;
      transition: all 0.2s;
    }
    .form-group select:focus, .form-group input:focus, .form-group textarea:focus { 
      outline: none; border-color: var(--primary); background: rgba(99,102,241,0.05);
      box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    }
    .form-group textarea { height: 100px; padding: 12px 14px; resize: vertical; }

    /* Inline Input Styles (for Packages/Products) */
    .inline-form { display: flex; gap: 12px; flex-wrap: wrap; padding: 20px; background: rgba(255,255,255,0.01); }
    .inline-form input {
      flex: 1; min-width: 160px; height: 42px; background: rgba(255,255,255,0.03); 
      border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 0 14px;
      font-size: 13px; transition: all 0.2s;
    }
    .inline-form input:focus { 
      outline: none; border-color: var(--primary); background: rgba(255,255,255,0.06); 
      box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    }
    .inline-form .btn { height: 42px; padding: 0 24px; white-space: nowrap; }

    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

    /* Search Input Decoration */
    .search-container { position: relative; flex: 1; max-width: 320px; }
    .search-input {
      width: 100%; 
      background: rgba(255,255,255,0.03); 
      border: 1px solid var(--border); 
      border-radius: 8px; 
      color: var(--text); 
      padding: 0 14px 0 38px; 
      height: 40px; 
      font-size: 13px; 
      font-family: inherit; 
      outline: none;
      transition: all 0.2s;
    }
    .search-input:focus {
      border-color: var(--primary);
      background: rgba(255,255,255,0.06);
      box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    }
    .search-icon {
      position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
      color: var(--muted); font-size: 14px; pointer-events: none;
    }

    /* Result key */
    .result-key {
      background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3);
      border-radius: 10px; padding: 16px; text-align: center; margin-bottom: 16px;
    }
    .result-key-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
    .result-key-value { font-size: 20px; font-weight: 700; font-family: monospace; letter-spacing: 0.1em; color: var(--primary-light); }

    .empty { text-align: center; padding: 40px; color: var(--muted); font-size: 14px; }