:root {
  --bg: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #1E293B;
  --bg-input: #334155;
  --surface: #334155;
  --primary: #38BDF8;
  --primary-hover: #0EA5E9;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #334155;
  --border-light: #475569;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--bg-secondary); border-right: 1px solid var(--border);
  padding: 20px 0; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 50;
}
.sidebar-logo { padding: 0 20px 24px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.sidebar-logo .mark { width: 32px; height: 32px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--bg); font-weight: 800; font-size: 16px; }
.sidebar-logo span { font-weight: 700; font-size: 15px; }
.sidebar-logo small { display: block; font-size: 10px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-nav { padding: 8px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all 0.2s; cursor: pointer; margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--primary); color: var(--bg); font-weight: 600; }
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-section { padding: 12px 24px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); margin-top: auto; position: absolute; bottom: 0; width: 100%; }
.sidebar-user { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sidebar-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: var(--bg); font-size: 13px; font-weight: 700; }

.main-content { margin-left: 240px; flex: 1; padding: 28px 32px; min-height: 100vh; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card .label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat-card .icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 8px; }

/* Tables */
.table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.table-header h3 { font-size: 15px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); background: rgba(15,23,42,0.5); }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
tbody tr:hover { background: rgba(56,189,248,0.03); }

/* Badges */
.badge { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-green { background: #064E3B; color: #6EE7B7; }
.badge-amber { background: #78350F; color: #FCD34D; }
.badge-red { background: #7F1D1D; color: #FCA5A5; }
.badge-blue { background: #1E3A5F; color: #93C5FD; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: var(--bg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: var(--error); color: white; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 5px; }
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border-light); border-radius: 8px; font-size: 13px; color: var(--text); background: var(--bg-input); outline: none; transition: all 0.2s; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(56,189,248,0.15); }
.form-textarea { min-height: 100px; resize: vertical; }

/* Login */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.login-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px; padding: 36px; width: 100%; max-width: 400px; }
.login-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 24px; }

/* Inventory item */
.inv-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.inv-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.inv-item .info { flex: 1; }
.inv-item .title { font-weight: 600; font-size: 14px; }
.inv-item .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.inv-controls { display: flex; gap: 8px; align-items: center; }
.inv-controls input { width: 70px; text-align: center; }

/* Review card */
.review-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stars { display: flex; gap: 2px; }
.stars i.filled { color: #F59E0B; }
.stars i.empty { color: var(--border-light); }

/* Toast */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; }
.toast { padding: 10px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 6px; animation: slideIn 0.3s; max-width: 320px; font-weight: 500; }
.toast.success { background: #064E3B; color: #6EE7B7; }
.toast.error { background: #7F1D1D; color: #FCA5A5; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.spinner { width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state i { font-size: 36px; margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

.pending-banner { background: #78350F; border: 1px solid #92400E; border-radius: var(--radius); padding: 20px; text-align: center; margin: 40px auto; max-width: 500px; }
.pending-banner h2 { font-size: 18px; font-weight: 700; color: #FCD34D; margin-bottom: 6px; }
.pending-banner p { font-size: 13px; color: #FDE68A; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
