/* ══════════════════════════════════════════════════════════════
   LK Manager — Design System
   Tokens derived from docs/login.html reference design
   ══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --white: #ffffff;
  --gray-50: #f7f8f9;
  --gray-100: #f0f2f4;
  --gray-200: #e4e7eb;
  --gray-300: #cdd2d8;
  --gray-400: #9ba5b0;
  --gray-500: #6b7685;
  --gray-600: #4a5260;
  --gray-700: #333a44;
  --gray-800: #1e2530;
  --gray-900: #111620;

  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-soft: rgba(37,99,235,0.07);
  --success: #059669;
  --success-light: #10b981;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0891b2;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 3px rgba(17,22,32,0.06);
  --shadow-md: 0 4px 16px rgba(17,22,32,0.08);
  --shadow-lg: 0 12px 40px rgba(17,22,32,0.12);
  --shadow-card: 0 0 0 1px var(--gray-200), 0 2px 8px rgba(17,22,32,0.04);

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

/* ══════════════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main
   ══════════════════════════════════════════════════════════════ */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}

/* Sidebar grid overlay */
.sidebar::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}
/* Sidebar glow */
.sidebar::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 90%, rgba(37,99,235,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(99,102,241,0.08) 0%, transparent 55%);
  pointer-events: none; z-index: 0;
}

.sidebar-scroll {
  position: relative; z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.sidebar-scroll::-webkit-scrollbar { display: none; }

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon-wrap {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  box-shadow: 0 4px 18px rgba(37,99,235,0.45);
  flex-shrink: 0;
  cursor: pointer;
}

.brand-text { overflow: hidden; white-space: nowrap; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 600;
  color: #fff; letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-version {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-top: 1px;
}

.toggle-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.4);
  font-size: 18px;
  margin-left: auto;
  transition: all 0.15s;
  flex-shrink: 0;
}
.toggle-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }

/* Profile */
.sidebar-profile {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}

.profile-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.12);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { overflow: hidden; white-space: nowrap; }
.profile-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; }
.profile-role {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.3);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px 8px;
  display: flex;
  flex-direction: column;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  padding: 12px 12px 6px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
}
.nav-item.active {
  background: rgba(37,99,235,0.15);
  color: var(--accent-light);
}

.nav-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.nav-label { overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
  flex-shrink: 0;
}

.nav-arrow {
  font-size: 12px;
  margin-left: auto;
  transition: transform 0.2s;
  opacity: 0.4;
}
.nav-item.open .nav-arrow { transform: rotate(90deg); opacity: 0.7; }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 12px;
}

/* Sub-menu */
.nav-group { display: flex; flex-direction: column; }
.nav-children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
  padding-left: 16px;
}
.nav-children.open { max-height: 200px; }
.nav-child {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 6px;
  color: rgba(255,255,255,0.35);
  font-size: 12.5px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.15s;
}
.nav-child i { font-size: 15px; }
.nav-child:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.7); }
.nav-child.active { color: var(--accent-light); }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* ── COLLAPSED SIDEBAR ── */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .profile-info,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-children,
.sidebar.collapsed .toggle-btn { display: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 20px 8px 16px; }
.sidebar.collapsed .toggle-btn { margin-left: 0; }
.sidebar.collapsed .sidebar-profile { justify-content: center; padding: 10px; margin: 0 8px; }
.sidebar.collapsed .profile-avatar { width: 40px; height: 40px; font-size: 20px; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.sidebar.collapsed .nav-icon { font-size: 22px; width: 26px; height: 26px; }
.sidebar.collapsed .sidebar-footer .nav-item { justify-content: center; }
.sidebar.collapsed + .main-content { margin-left: var(--sidebar-collapsed); }

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%; transform: translateY(-50%);
  background: var(--gray-800);
  color: #fff;
  font-size: 11px; font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 200;
  box-shadow: var(--shadow-md);
}
.sidebar.collapsed .nav-item[data-tip]:hover::after { opacity: 1; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--gray-100);
  transition: margin-left 0.25s cubic-bezier(.22,1,.36,1);
  position: relative;
}
/* Subtle grid on content area */
.main-content::before {
  content: '';
  position: fixed;
  top: 0; left: var(--sidebar-width); right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
  transition: left 0.25s cubic-bezier(.22,1,.36,1);
}
.sidebar.collapsed + .main-content::before { left: var(--sidebar-collapsed); }
.app-layout.no-sidebar .main-content { margin-left: 0; }
.app-layout.no-sidebar .main-content::before { left: 0; }

/* ── TOPBAR ── */
.main-header {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(17,22,32,0.03);
}

.topbar-left { display: flex; flex-direction: column; }
.topbar-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.topbar-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-top: 2px;
}

.topbar-right { display: flex; align-items: center; gap: 6px; }

.topbar-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 19px;
  transition: all 0.15s;
  position: relative;
}
.topbar-btn:hover { background: var(--gray-50); border-color: var(--gray-300); color: var(--gray-600); }
.topbar-dot {
  position: absolute; top: 7px; right: 7px;
  width: 6px; height: 6px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}

.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.topbar-user:hover { background: var(--gray-50); }
.topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--gray-400);
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-uname { font-size: 13px; font-weight: 600; color: var(--gray-700); }

/* ── CONTENT BODY ── */
.content-body {
  flex: 1;
  padding: 28px;
  position: relative;
  z-index: 1;
}


/* ══════════════════════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════════════════════ */

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--gray-100);
}

/* Dashboard card heads */
.card-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}
.card-head-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head-title i { font-size: 16px; color: var(--accent); }
.view-all {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.view-all:hover { color: var(--accent); }

/* ── STAT CARDS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.stat-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-trend {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--gray-50);
  color: var(--gray-400);
}
.stat-trend.trend-up { background: #ecfdf5; color: var(--success); }
.stat-trend.trend-down { background: #fef2f2; color: var(--danger); }
.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 500;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ── TWO COL LAYOUT ── */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ── TABLES ── */
.table-container { overflow-x: auto; }

.table, .data-table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .data-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}
.table td, .data-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-50);
  vertical-align: middle;
}
.table tbody tr:hover, .data-table tbody tr:hover {
  background: var(--gray-50);
}
.table tbody tr:last-child td, .data-table tbody tr:last-child td {
  border-bottom: none;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-700);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn i { font-size: 17px; }

.btn-primary {
  background: var(--gray-900);
  color: #fff;
  box-shadow: 0 2px 6px rgba(17,22,32,0.18);
}
.btn-primary:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(17,22,32,0.2);
  color: #fff;
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--gray-500);
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--gray-50); color: var(--gray-700); }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: #fef2f2; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sm i { font-size: 14px; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-800);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--gray-300); }
.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: var(--gray-300);
  background: var(--white);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-helper { font-size: 11px; color: var(--gray-400); margin-top: 5px; }
.required { color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

/* ── BADGES / PILLS ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-success { background: #ecfdf5; color: var(--success); }
.badge-danger { background: #fef2f2; color: var(--danger); }
.badge-warning { background: #fffbeb; color: var(--warning); }
.badge-info { background: #ecfeff; color: var(--info); }
.badge-secondary { background: var(--gray-100); color: var(--gray-500); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.pill i { font-size: 10px; }
.pill-active, .pill-valid { background: #ecfdf5; color: var(--success); }
.pill-mismatch { background: #fef2f2; color: var(--danger); }

/* ── TABS ── */
.tabs-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  transition: all 0.2s;
  font-family: var(--font-body);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn i { font-size: 17px; }
.tab-btn:hover { color: var(--gray-600); }

.tab-btn.active {
  color: var(--gray-900);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease-out; }

/* ── ALERTS ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 13px;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--success); }
.alert-error { background: #fff5f5; border: 1px solid #fecaca; color: var(--danger); }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid var(--gray-200);
  background: var(--white);
}
.pagination-btn:hover { background: var(--gray-50); color: var(--gray-700); }
.pagination-btn.active {
  background: var(--gray-900);
  color: #fff;
  border-color: var(--gray-900);
}

/* ── FILTERS ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filter-group { display: flex; flex-direction: column; }
.filter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 5px;
}
.filter-input {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  transition: all 0.2s;
}
.filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(17,22,32,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--font-heading); font-size: 16px; font-weight: 500; color: var(--gray-900); }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-400); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 10px; }

/* ── UPLOAD DROP ZONE ── */
.upload-drop-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--gray-50);
}
.upload-drop-zone:hover, .upload-drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(37,99,235,0.03);
}

/* ── SECURITY ALERT ── */
.security-alert {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.security-alert-icon { font-size: 20px; color: var(--warning); flex-shrink: 0; margin-top: 1px; }
.security-alert-title { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.security-alert-text { font-size: 12.5px; color: var(--gray-600); line-height: 1.6; }

/* ── DASHBOARD HEALTH / SYSINFO ── */
.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-50);
}
.health-row:last-child { border-bottom: none; }
.health-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.health-sub { font-family: var(--font-mono); font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.health-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
}
.health-status i { font-size: 16px; }
.hs-green { color: var(--success); }
.hs-blue { color: var(--accent); }

.sysinfo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 6px 0;
}
.sysinfo-row {
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-50);
}
.sysinfo-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 3px;
}
.sysinfo-val { font-size: 13px; font-weight: 600; color: var(--gray-700); }

.disk-bar-bg {
  height: 6px;
  background: var(--gray-100);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
}
.disk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* ── PAGE FOOTER ── */
.page-footer {
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  margin-top: auto;
}

/* ── LICENSE KEY DISPLAY ── */
.license-key {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}
.license-key-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: 0.02em;
}
.license-key-copy {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 16px;
  transition: color 0.15s;
  display: flex;
}
.license-key-copy:hover { color: var(--accent); }

/* ── LOGO PREVIEW ── */
.logo-preview-container {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  flex-shrink: 0;
}
.logo-preview { width: 100%; height: 100%; object-fit: contain; }
.logo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--gray-400);
  background: var(--gray-50);
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes fadeSlideUp { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeSlideDown { from { opacity:0; transform:translateY(-12px) } to { opacity:1; transform:translateY(0) } }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 16px; }
.text-2xl { font-size: 22px; }
.text-3xl { font-size: 28px; }
.text-muted { color: var(--gray-400); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-20 { padding-top: 80px; padding-bottom: 80px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.w-full { width: 100%; }
.w-4 { width: 16px; }
.w-7 { width: 28px; }
.w-8 { width: 32px; }
.w-10 { width: 40px; }
.w-20 { width: 80px; }
.h-4 { height: 16px; }
.h-7 { height: 28px; }
.h-8 { height: 32px; }
.h-10 { height: 40px; }
.h-20 { height: 80px; }
.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 100px; }
.border { border: 1px solid var(--gray-200); }
.shadow-md { box-shadow: var(--shadow-md); }
.object-cover { object-fit: cover; }
.select-none { user-select: none; }
.cursor-pointer { cursor: pointer; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.border-4 { border-width: 4px; }
.border-white { border-color: var(--white); }
.max-w-xs { max-width: 320px; }
.opacity-20 { opacity: 0.2; }
.transition-colors { transition: background 0.15s, color 0.15s, border-color 0.15s; }
.transition-transform { transition: transform 0.15s; }
.hover\:scale-110:hover { transform: scale(1.1); }

/* Color utilities */
.bg-slate-50, .bg-glass { background: var(--gray-50); }
.bg-slate-100 { background: var(--gray-100); }
.bg-emerald-50 { background: #ecfdf5; }
.bg-rose-50 { background: #fff5f5; }
.bg-indigo-600 { background: var(--accent); }
.border-emerald-100 { border-color: #a7f3d0; }
.border-rose-100 { border-color: #fecaca; }
.border-slate-100 { border-color: var(--gray-100); }
.border-slate-200 { border-color: var(--gray-200); }
.border-slate-300 { border-color: var(--gray-300); }
.text-emerald-700 { color: var(--success); }
.text-rose-700 { color: var(--danger); }
.text-slate-400 { color: var(--gray-400); }
.text-slate-500 { color: var(--gray-500); }
.text-slate-700 { color: var(--gray-700); }
.text-slate-800 { color: var(--gray-800); }
.text-indigo-600 { color: var(--accent); }
.text-amber-600 { color: var(--warning); }
.text-rose-600 { color: var(--danger); }
.text-white { color: #fff; }
.text-xl { font-size: 20px; }
.text-5xl { font-size: 48px; }

.hover\:bg-slate-100:hover { background: var(--gray-100); }
.hover\:bg-indigo-50:hover { background: rgba(37,99,235,0.05); }
.hover\:bg-amber-50:hover { background: #fffbeb; }
.hover\:bg-rose-50:hover { background: #fff5f5; }

/* ── Responsive helpers ── */
@media (max-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .flex-col.md\:flex-row { flex-direction: column; }
}