:root {
  --bg: #0c0c0e;
  --surface: #141418;
  --surface2: #1e1e24;
  --border: #2c2c36;
  --accent: #e8ff3a;
  --accent2: #ff4757;
  --green: #2ecc71;
  --blue: #3498db;
  --text: #f0f0f0;
  --muted: #666680;
  --sidebar-w: 220px;
  --topbar-h: 56px;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'DM Sans',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; }
a { text-decoration:none; color:inherit; }

/* ── SIDEBAR ─────────────────────────────── */
.sidebar {
  position:fixed; top:0; left:0; bottom:0;
  width:var(--sidebar-w);
  background:var(--surface);
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
  z-index:100; transition:.25s;
}
.sidebar-logo {
  display:flex; align-items:center; gap:12px;
  padding:20px 16px 18px;
  border-bottom:1px solid var(--border);
}
.logo-icon { font-size:28px; }
.logo-title {
  font-family:'Bebas Neue',sans-serif;
  font-size:18px; letter-spacing:2px;
  color:var(--accent); line-height:1;
}
.logo-sub { font-size:9px; color:var(--muted); letter-spacing:3px; margin-top:2px; }

.nav { flex:1; padding:12px 8px; overflow-y:auto; }
.nav-section {
  font-size:9px; letter-spacing:3px; color:var(--muted);
  padding:12px 10px 4px; margin-top:4px;
}
.nav-item {
  display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:6px;
  font-size:13px; color:var(--muted);
  transition:.15s; margin:1px 0; cursor:pointer;
}
.nav-item:hover { background:var(--surface2); color:var(--text); }
.nav-item.active {
  background:var(--accent);
  color:#000; font-weight:600;
}
.nav-icon { font-size:14px; width:18px; text-align:center; }

.sidebar-footer { padding:12px; border-top:1px solid var(--border); }
.worker-chip {
  display:flex; align-items:center; gap:10px;
  padding:10px; background:var(--surface2);
  border-radius:8px; margin-bottom:8px;
}
.worker-avatar {
  width:32px; height:32px; border-radius:50%;
  background:var(--accent); color:#000;
  display:flex; align-items:center; justify-content:center;
  font-family:'Bebas Neue',sans-serif; font-size:16px;
}
.worker-name { font-size:13px; font-weight:600; }
.worker-role { font-size:10px; color:var(--accent); letter-spacing:1px; }
.logout-btn {
  display:block; text-align:center; padding:8px;
  background:transparent; border:1px solid var(--border);
  border-radius:6px; font-size:12px; color:var(--muted);
  transition:.15s; cursor:pointer;
}
.logout-btn:hover { border-color:var(--accent2); color:var(--accent2); }

/* ── TOPBAR ──────────────────────────────── */
.topbar {
  position:fixed; top:0; left:var(--sidebar-w); right:0;
  height:var(--topbar-h);
  background:var(--surface); border-bottom:1px solid var(--border);
  display:flex; align-items:center; padding:0 20px; gap:16px;
  z-index:90;
}
.menu-toggle { display:none; background:none; border:none; color:var(--text); font-size:20px; cursor:pointer; }
.topbar-title {
  font-family:'Bebas Neue',sans-serif;
  font-size:20px; letter-spacing:2px; flex:1;
}
.topbar-right { display:flex; align-items:center; gap:10px; }
.notif-bell {
  position:relative; cursor:pointer;
  padding:6px 10px; background:var(--surface2);
  border:1px solid var(--border); border-radius:6px;
  font-size:14px; transition:.15s;
}
.notif-bell:hover { border-color:var(--accent); }
.notif-count {
  position:absolute; top:-6px; right:-6px;
  background:var(--accent2); color:#fff;
  font-size:10px; font-weight:700;
  width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}

/* ── MAIN CONTENT ────────────────────────── */
.main-content {
  margin-left:var(--sidebar-w);
  margin-top:var(--topbar-h);
  padding:24px; min-height:calc(100vh - var(--topbar-h));
}

/* ── BUTTONS ─────────────────────────────── */
.btn {
  padding:9px 18px; border-radius:6px; border:none;
  cursor:pointer; font-family:'DM Sans',sans-serif;
  font-size:13px; font-weight:500; transition:.15s;
  display:inline-flex; align-items:center; gap:6px;
}
.btn-primary { background:var(--accent); color:#000; font-weight:700; }
.btn-primary:hover { background:#d4e82e; transform:translateY(-1px); }
.btn-secondary { background:var(--surface2); color:var(--text); border:1px solid var(--border); }
.btn-secondary:hover { border-color:var(--accent); color:var(--accent); }
.btn-danger { background:rgba(255,71,87,.15); color:var(--accent2); border:1px solid rgba(255,71,87,.3); }
.btn-success { background:rgba(46,204,113,.15); color:var(--green); border:1px solid rgba(46,204,113,.3); }
.btn-sm { padding:5px 12px; font-size:12px; }
.btn-lg { padding:12px 28px; font-size:15px; }
.btn-block { width:100%; justify-content:center; }

/* ── STATS ───────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:20px; position:relative; overflow:hidden;
}
.stat-card::after {
  content:''; position:absolute; bottom:0; left:0; right:0;
  height:3px;
}
.stat-card.yellow::after { background:var(--accent); }
.stat-card.red::after { background:var(--accent2); }
.stat-card.green::after { background:var(--green); }
.stat-card.blue::after { background:var(--blue); }
.stat-num {
  font-family:'Bebas Neue',sans-serif;
  font-size:32px; letter-spacing:1px; line-height:1;
}
.stat-label { font-size:11px; color:var(--muted); letter-spacing:1px; text-transform:uppercase; margin-top:6px; }
.stat-change { font-size:11px; margin-top:8px; color:var(--green); }
.stat-change.down { color:var(--accent2); }
.stat-icon { font-size:24px; margin-bottom:10px; }

/* ── CARDS ───────────────────────────────── */
.card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; overflow:hidden; margin-bottom:20px;
}
.card-header {
  padding:14px 20px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.card-title { font-family:'Bebas Neue',sans-serif; font-size:16px; letter-spacing:1px; }
.card-body { padding:20px; }

/* ── TABLES ──────────────────────────────── */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
thead th {
  padding:10px 16px; text-align:left;
  font-size:10px; color:var(--muted);
  text-transform:uppercase; letter-spacing:1.5px;
  border-bottom:1px solid var(--border);
  background:var(--surface2); font-weight:600;
}
tbody td {
  padding:12px 16px; font-size:13px;
  border-bottom:1px solid rgba(44,44,54,.6);
}
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover td { background:rgba(232,255,58,.02); }

/* ── FORMS ───────────────────────────────── */
.form-section {
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:20px; margin-bottom:16px;
}
.form-section-title {
  font-family:'Bebas Neue',sans-serif;
  font-size:15px; letter-spacing:1px;
  margin-bottom:16px; color:var(--accent);
  display:flex; align-items:center; gap:8px;
}
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-group { display:flex; flex-direction:column; gap:5px; }
.form-group.full { grid-column:1/-1; }
label { font-size:11px; color:var(--muted); letter-spacing:1px; text-transform:uppercase; font-weight:500; }
input, select, textarea {
  background:var(--surface2); border:1px solid var(--border);
  border-radius:6px; padding:10px 12px;
  color:var(--text); font-family:'DM Sans',sans-serif;
  font-size:14px; outline:none; transition:.15s; width:100%;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(232,255,58,.08);
}
select option { background:var(--surface2); }
textarea { resize:vertical; min-height:80px; }
.input-group { position:relative; }
.input-icon { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--muted); cursor:pointer; }

/* ── BADGES ──────────────────────────────── */
.badge {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 8px; border-radius:4px;
  font-size:10px; font-weight:700; letter-spacing:.5px; text-transform:uppercase;
}
.badge-green { background:rgba(46,204,113,.15); color:var(--green); }
.badge-red { background:rgba(255,71,87,.15); color:var(--accent2); }
.badge-yellow { background:rgba(232,255,58,.15); color:var(--accent); }
.badge-blue { background:rgba(52,152,219,.15); color:var(--blue); }
.badge-gray { background:var(--surface2); color:var(--muted); }

/* ── MODAL ───────────────────────────────── */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.8);
  backdrop-filter:blur(4px); z-index:9999;
  display:none; align-items:center; justify-content:center; padding:20px;
}
.modal-overlay.open { display:flex; }
.modal {
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px; width:100%; max-width:600px;
  max-height:90vh; overflow-y:auto;
}
.modal-header {
  padding:18px 24px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  position:sticky; top:0; background:var(--surface); z-index:1;
}
.modal-title { font-family:'Bebas Neue',sans-serif; font-size:18px; letter-spacing:1px; }
.modal-close {
  width:30px; height:30px; background:var(--surface2);
  border:1px solid var(--border); border-radius:6px;
  cursor:pointer; color:var(--muted); font-size:16px;
  display:flex; align-items:center; justify-content:center;
}
.modal-body { padding:24px; }
.modal-footer {
  padding:14px 24px; border-top:1px solid var(--border);
  display:flex; gap:10px; justify-content:flex-end;
}

/* ── NOTIFICATIONS DRAWER ────────────────── */
.notif-drawer {
  position:fixed; top:0; right:0; bottom:0; width:340px;
  background:var(--surface); border-left:1px solid var(--border);
  z-index:150; transform:translateX(100%); transition:.25s;
  display:flex; flex-direction:column;
}
.notif-drawer.open { transform:translateX(0); }
.notif-drawer-header {
  padding:16px 20px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.notif-drawer-header button { background:none; border:none; color:var(--muted); cursor:pointer; font-size:18px; }
.notif-item {
  padding:14px 20px; border-bottom:1px solid var(--border);
  display:flex; gap:12px; cursor:pointer; transition:.15s;
}
.notif-item:hover { background:var(--surface2); }
.notif-item.unread { border-left:3px solid var(--accent); }
.notif-dot {
  width:36px; height:36px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-size:16px; flex-shrink:0;
}
.notif-dot.buy { background:rgba(46,204,113,.15); }
.notif-dot.sell { background:rgba(255,71,87,.15); }
.notif-dot.stock { background:rgba(232,255,58,.15); }
.notif-text { font-size:13px; line-height:1.5; }
.notif-time { font-size:11px; color:var(--muted); margin-top:3px; }
.empty-notif { padding:32px; text-align:center; color:var(--muted); font-size:13px; }

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

/* ── ALERTS ──────────────────────────────── */
.alert {
  padding:12px 16px; border-radius:8px; font-size:13px;
  margin-bottom:16px; display:flex; align-items:center; gap:10px;
}
.alert-success { background:rgba(46,204,113,.1); border:1px solid rgba(46,204,113,.3); color:var(--green); }
.alert-error { background:rgba(255,71,87,.1); border:1px solid rgba(255,71,87,.3); color:var(--accent2); }
.alert-warning { background:rgba(232,255,58,.1); border:1px solid rgba(232,255,58,.3); color:var(--accent); }
.alert-info { background:rgba(52,152,219,.1); border:1px solid rgba(52,152,219,.3); color:var(--blue); }

/* ── MISC ────────────────────────────────── */
.fw { font-weight:600; }
.text-muted { color:var(--muted); font-size:13px; }
.text-green { color:var(--green); }
.text-red { color:var(--accent2); }
.text-accent { color:var(--accent); }
.text-bold { font-family:'Bebas Neue',sans-serif; letter-spacing:1px; }
.mt { margin-top:16px; }
.mb { margin-bottom:16px; }
.gap-row { display:flex; gap:10px; align-items:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.divider { height:1px; background:var(--border); margin:16px 0; }
.chip { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; background:var(--surface2); color:var(--muted); }
.empty-state { text-align:center; padding:48px; color:var(--muted); }
.empty-state .icon { font-size:40px; margin-bottom:12px; }

/* ── IMEI RESULT BOX ─────────────────────── */
.imei-result {
  background:var(--surface2); border:1px solid var(--border);
  border-radius:10px; padding:20px; margin-top:16px;
}
.imei-result.blacklisted { border-color:var(--accent2); background:rgba(255,71,87,.05); }
.imei-result.warning { border-color:var(--accent); background:rgba(232,255,58,.05); }
.imei-timeline { margin-top:16px; }
.timeline-item {
  display:flex; gap:14px; padding:12px 0;
  border-bottom:1px solid var(--border);
}
.timeline-item:last-child { border-bottom:none; }
.timeline-dot {
  width:8px; height:8px; border-radius:50%;
  margin-top:5px; flex-shrink:0;
}
.timeline-dot.buy { background:var(--green); }
.timeline-dot.sell { background:var(--accent2); }

/* ── PHONE CARDS (STOCK) ─────────────────── */
.stock-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:14px; }
.phone-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:16px; cursor:pointer; transition:.15s;
}
.phone-card:hover { border-color:var(--accent); transform:translateY(-2px); }
.phone-card.selected { border-color:var(--accent); border-width:2px; background:rgba(232,255,58,.03); }
.phone-emoji { font-size:36px; margin-bottom:12px; display:block; }
.phone-brand { font-size:10px; color:var(--accent); letter-spacing:2px; text-transform:uppercase; font-weight:600; }
.phone-model { font-family:'Bebas Neue',sans-serif; font-size:17px; letter-spacing:1px; margin:4px 0; }
.phone-specs { font-size:11px; color:var(--muted); }
.phone-price { font-family:'Bebas Neue',sans-serif; font-size:22px; color:var(--green); margin-top:10px; letter-spacing:1px; }

/* ── LOGIN PAGE ──────────────────────────── */
.login-page {
  min-height:100vh; display:flex;
  align-items:center; justify-content:center;
  background:var(--bg); padding:20px;
  background-image: radial-gradient(ellipse at 20% 50%, rgba(232,255,58,.04) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(255,71,87,.04) 0%, transparent 50%);
}
.login-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:16px; padding:40px; width:100%; max-width:400px;
}
.login-logo {
  text-align:center; margin-bottom:32px;
}
.login-logo-title {
  font-family:'Bebas Neue',sans-serif;
  font-size:36px; letter-spacing:4px; color:var(--accent);
}
.login-logo-sub { font-size:11px; color:var(--muted); letter-spacing:4px; text-transform:uppercase; }
.role-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:20px; }
.role-tab {
  padding:12px; border:2px solid var(--border); border-radius:8px;
  cursor:pointer; text-align:center; transition:.15s;
}
.role-tab:hover { border-color:var(--accent); }
.role-tab.active { border-color:var(--accent); background:rgba(232,255,58,.08); }
.role-tab-icon { font-size:22px; margin-bottom:4px; }
.role-tab-name { font-size:13px; font-weight:600; }

/* ── DECLARATION BOX ─────────────────────── */
.declaration-box {
  background:rgba(232,255,58,.05); border:1px solid rgba(232,255,58,.2);
  border-radius:8px; padding:16px; margin-top:8px;
}
.declaration-text { font-size:13px; color:var(--muted); line-height:1.6; }
.declaration-check { display:flex; align-items:flex-start; gap:10px; margin-top:10px; cursor:pointer; }
.declaration-check input { width:18px; height:18px; margin-top:2px; accent-color:var(--accent); flex-shrink:0; }

/* ── TOAST ───────────────────────────────── */
#toast {
  position:fixed; bottom:24px; right:24px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:8px; padding:12px 20px; font-size:13px;
  z-index:999; transform:translateY(100px);
  transition:.3s; box-shadow:0 8px 32px rgba(0,0,0,.5);
  max-width:320px;
}
#toast.show { transform:translateY(0); }
#toast.success { border-color:var(--green); }
#toast.error { border-color:var(--accent2); }

/* ── SUCCESS SCREEN ──────────────────────── */
.success-screen {
  text-align:center; padding:48px 24px;
}
.success-icon { font-size:64px; margin-bottom:16px; }
.success-title { font-family:'Bebas Neue',sans-serif; font-size:28px; letter-spacing:2px; margin-bottom:8px; }
.success-ref { font-size:13px; color:var(--muted); margin-bottom:24px; }

/* ── SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:4px; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width:768px) {
  .sidebar { transform:translateX(-100%); z-index:200; }
  .sidebar.open { transform:translateX(0); box-shadow:4px 0 20px rgba(0,0,0,.5); }
  .topbar { left:0; }
  .main-content { margin-left:0; }
  .menu-toggle { display:block; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .form-grid { grid-template-columns:1fr; }
  .grid-2 { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .stats-grid { grid-template-columns:1fr; }
}
