/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== CSS Variables ===== */
:root {
  --primary: #6366f1;
  --primary-light: #6366f122;
  --primary-hover: #4f46e5;

  /* Light theme */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #ffffff;
  --sidebar-hover: rgba(255,255,255,.07);
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --radius: 10px;
  --radius-lg: 16px;

  --green: #22c55e; --green-light: #22c55e18;
  --red: #ef4444;   --red-light: #ef444418;
  --yellow: #f59e0b; --yellow-light: #f59e0b18;
  --blue: #3b82f6;  --blue-light: #3b82f618;
  --purple: #8b5cf6; --purple-light: #8b5cf618;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #162032;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.35);
  --sidebar-bg: #0f172a;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Be Vietnam Pro', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; transition: background .2s, color .2s; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: width .25s cubic-bezier(.4,0,.2,1), transform .25s;
  overflow: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .logout-btn { display: none; }
.sidebar.collapsed .brand-icon { margin: 0 auto; }

.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex-shrink: 0; }
.brand-text { min-width: 0; }
.brand-name { display: block; font-size: 14px; font-weight: 700; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { display: block; font-size: 11px; color: var(--text-light); }
.sidebar-toggle { background: none; border: none; color: var(--sidebar-text); font-size: 16px; padding: 4px; border-radius: 6px; transition: background .15s; }
.sidebar-toggle:hover { background: rgba(255,255,255,.1); }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 8px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.nav-section { margin-bottom: 20px; }
.nav-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--text-light); padding: 0 8px; margin-bottom: 4px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--sidebar-text); font-size: 13.5px; font-weight: 500; transition: all .15s; white-space: nowrap; }
.nav-item:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-item.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px var(--primary)55; }
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

.sidebar-footer { padding: 12px 8px; border-top: 1px solid rgba(255,255,255,.07); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 13px; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { display: block; font-size: 11px; color: var(--text-light); text-transform: capitalize; }
.logout-btn { color: var(--text-light); padding: 4px 6px; border-radius: 5px; transition: all .15s; font-size: 14px; }
.logout-btn:hover { color: var(--red); background: var(--red-light); }

/* Main wrapper */
.main-wrapper { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; transition: margin-left .25s; }
.main-wrapper.expanded { margin-left: 64px; }

/* Topbar */
.topbar { height: var(--topbar-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 18px; font-weight: 700; color: var(--text); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-muted); font-size: 18px; padding: 6px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all .15s; position: relative; }
.icon-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.badge-dot { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 10px; min-width: 18px; height: 18px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Notifications dropdown */
.notif-wrapper { position: relative; }
.notif-dropdown { position: absolute; top: 44px; right: 0; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); display: none; z-index: 200; overflow: hidden; }
.notif-dropdown.show { display: block; animation: fadeDown .15s ease; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.mark-all { font-size: 12px; color: var(--primary); font-weight: 500; }
.notif-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); }
.notif-empty i { font-size: 28px; margin-bottom: 8px; display: block; }
.notif-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s; }
.notif-item:hover { background: var(--surface-2); }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.notif-info .notif-icon { background: var(--blue-light); color: var(--blue); }
.notif-success .notif-icon { background: var(--green-light); color: var(--green); }
.notif-danger .notif-icon { background: var(--red-light); color: var(--red); }
.notif-warning .notif-icon { background: var(--yellow-light); color: var(--yellow); }
.notif-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.notif-time { font-size: 11px; color: var(--text-muted); }

/* User dropdown */
.user-menu-wrapper { position: relative; }
.user-menu-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); transition: all .15s; }
.user-menu-btn:hover { border-color: var(--primary); color: var(--primary); }
.user-menu-btn i { font-size: 11px; color: var(--text-muted); }
.avatar-sm { width: 24px; height: 24px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
.user-dropdown { position: absolute; top: 44px; right: 0; width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); display: none; z-index: 200; overflow: hidden; padding: 4px; }
.user-dropdown.show { display: block; animation: fadeDown .15s ease; }
.user-dropdown a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 7px; font-size: 13px; transition: background .15s; }
.user-dropdown a:hover { background: var(--surface-2); }
.user-dropdown a i { width: 16px; font-size: 13px; color: var(--text-muted); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.text-danger { color: var(--red) !important; }

/* Flash message */
.flash-message { display: flex; align-items: center; gap: 10px; padding: 12px 24px; font-size: 13px; font-weight: 500; }
.flash-success { background: var(--green-light); color: #166534; border-bottom: 2px solid var(--green); }
.flash-error, .flash-danger { background: var(--red-light); color: #991b1b; border-bottom: 2px solid var(--red); }
.flash-warning { background: var(--yellow-light); color: #92400e; border-bottom: 2px solid var(--yellow); }
.flash-message button { margin-left: auto; background: none; border: none; color: inherit; font-size: 14px; opacity: .6; }
.flash-message button:hover { opacity: 1; }

/* Content area */
.content { flex: 1; padding: 24px; }

/* ===== Cards ===== */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); }

/* ===== Stats Cards ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-info {}
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.1; font-family: 'JetBrains Mono', monospace; }
.stat-change { font-size: 12px; margin-top: 4px; font-weight: 500; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); background: var(--surface-2); padding: 10px 14px; text-align: left; white-space: nowrap; }
tbody td { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
tbody tr:hover td { background: var(--surface-2); }
table .actions { display: flex; gap: 4px; }
table .btn-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); transition: all .15s; }
table .btn-icon:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
table .btn-icon.danger:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.badge-success { background: var(--green-light); color: #166534; }
.badge-danger { background: var(--red-light); color: #991b1b; }
.badge-warning { background: var(--yellow-light); color: #92400e; }
.badge-info { background: var(--blue-light); color: #1e40af; }
.badge-secondary { background: var(--border); color: var(--text-muted); }
[data-theme="dark"] .badge-success { color: var(--green); }
[data-theme="dark"] .badge-danger { color: var(--red); }
[data-theme="dark"] .badge-warning { color: var(--yellow); }
[data-theme="dark"] .badge-info { color: var(--blue); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: all .15s; font-family: inherit; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--primary)44; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn i { font-size: 13px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label span.req { color: var(--red); margin-left: 2px; }
.form-control { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13.5px; font-family: inherit; transition: border-color .15s, box-shadow .15s; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--red); margin-top: 4px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: 8px 0 0 8px; flex: 1; }
.input-group .btn { border-radius: 0 8px 8px 0; }
.input-addon { padding: 9px 12px; background: var(--surface-2); border: 1.5px solid var(--border); border-left: none; border-radius: 0 8px 8px 0; color: var(--text-muted); font-size: 13px; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 24px; transition: .2s; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 300; display: none; backdrop-filter: blur(2px); }
.modal-overlay.show { display: block; animation: fadeIn .15s ease; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.95); background: var(--surface); border-radius: var(--radius-lg); width: 90%; max-width: 540px; z-index: 400; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: none; max-height: 90vh; overflow-y: auto; }
.modal.show { display: block; animation: modalIn .2s cubic-bezier(.34,1.56,.64,1) forwards; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--border); background: none; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: all .15s; }
.modal-close:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ===== Charts area ===== */
.chart-container { position: relative; }
.chart-container canvas { max-width: 100%; }

/* ===== Page toolbar ===== */
.page-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface); padding: 0 12px; width: 240px; }
.search-box i { color: var(--text-muted); font-size: 13px; }
.search-box input { border: none; background: none; outline: none; padding: 8px 0; font-size: 13.5px; color: var(--text); width: 100%; }

/* ===== Service cards ===== */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all .2s; cursor: pointer; }
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.service-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.service-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.service-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.service-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.service-price { font-size: 16px; font-weight: 800; color: var(--primary); font-family: 'JetBrains Mono', monospace; }
.service-actions { display: flex; gap: 4px; }

/* ===== Color swatch picker ===== */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all .15s; }
.color-swatch:hover, .color-swatch.selected { border-color: var(--text); transform: scale(1.1); }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; transition: all .15s; }
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.active { cursor: default; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 48px; color: var(--text-light); margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 13px; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab { padding: 9px 16px; font-size: 13px; font-weight: 600; color: var(--text-muted); border-radius: 7px 7px 0 0; cursor: pointer; transition: all .15s; border-bottom: 2px solid transparent; margin-bottom: -2px; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Settings ===== */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; height: fit-content; }
.settings-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.settings-nav-item:hover { background: var(--surface-2); color: var(--text); }
.settings-nav-item.active { background: var(--primary-light); color: var(--primary); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }

/* ===== Login page ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.login-card { background: var(--surface); border-radius: 20px; padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .icon { width: 56px; height: 56px; background: var(--primary); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; margin: 0 auto 12px; }
.login-logo h1 { font-size: 22px; font-weight: 800; }
.login-logo p { color: var(--text-muted); font-size: 13px; }
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--text-muted); }

/* ===== Misc ===== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.mb-0 { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.fw-700 { font-weight: 700; }
.w-100 { width: 100%; }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .mobile-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
  .page-toolbar { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
