/* ============================================================
   IT Admin Dashboard — Premium Dark Design System
   Company: Happy Trails! Asia
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --bg-base:       #060D1A;
  --bg-surface:    #0D1626;
  --bg-card:       rgba(255,255,255,0.038);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-input:      rgba(255,255,255,0.06);
  --bg-sidebar:    #08111F;

  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.15);
  --border-active: rgba(59,130,246,0.5);

  --primary:       #3B82F6;
  --primary-dark:  #2563EB;
  --primary-glow:  rgba(59,130,246,0.25);
  --secondary:     #8B5CF6;
  --cyan:          #06B6D4;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --orange:        #F97316;

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;
  --text-accent:    #60A5FA;

  --sidebar-w:      240px;
  --sidebar-w-col:  70px;
  --topbar-h:       64px;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:    0 0 30px rgba(59,130,246,0.15);

  --transition:     all 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ---- LIGHT THEME ---- */
body.light-theme {
  --bg-base: #F4F7FB;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255,255,255,0.82);
  --bg-card-hover: #F8FAFC;
  --bg-input: #F1F5F9;
  --bg-sidebar: #FFFFFF;
  --border: rgba(15,23,42,0.12);
  --border-hover: rgba(15,23,42,0.22);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-accent: #2563EB;
  --shadow: 0 4px 24px rgba(15,23,42,0.10);
}
body.light-theme .topbar { background: rgba(255,255,255,0.84); }
body.light-theme thead, body.light-theme .kanban-col { background: rgba(15,23,42,0.025); }
body.light-theme .btn-secondary:hover, body.light-theme .nav-item:hover { background: rgba(15,23,42,0.06); }
body.light-theme ::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.20); }

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; border: none; }
ul, ol { list-style: none; }
img { max-width: 100%; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
  position: relative;
  z-index: 100;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-w-col); min-width: var(--sidebar-w-col); }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
  overflow: hidden;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--primary-glow);
}
.logo-icon svg { width: 20px; height: 20px; color: white; }
.logo-text { overflow: hidden; white-space: nowrap; }
.logo-title { display: block; font-weight: 700; font-size: 15px; color: var(--text-primary); letter-spacing: -0.3px; }
.logo-sub { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  padding: 16px 18px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}
.sidebar.collapsed .nav-section-label { opacity: 0; height: 0; padding: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.1));
  color: var(--text-accent);
  border: 1px solid rgba(59,130,246,0.2);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar.collapsed .nav-item span:not(.nav-icon) { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .nav-item:hover::after {
  content: attr(data-label);
  position: fixed;
  left: calc(var(--sidebar-w-col) + 8px);
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  overflow: hidden;
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: white;
  flex-shrink: 0;
}
.user-details { overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); }
.sidebar.collapsed .user-details { display: none; }

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-slow);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: rgba(6,13,26,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 90;
  flex-shrink: 0;
}
.menu-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}
.menu-toggle:hover { background: var(--bg-input); color: var(--text-primary); }
.menu-toggle svg { width: 18px; height: 18px; }
.icon-btn svg { width: 18px; height: 18px; }

.topbar-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 38px;
  position: relative;
  transition: var(--transition);
}
.topbar-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.topbar-search svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.topbar-search input {
  flex: 1; background: none; color: var(--text-primary); font-size: 13.5px;
}
.topbar-search input::placeholder { color: var(--text-muted); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  z-index: 200;
  max-height: 300px;
  overflow-y: auto;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-tag { font-size: 10px; padding: 2px 8px; border-radius: 99px; font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.icon-btn svg { width: 18px; height: 18px; }

.notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
}

.notif-wrapper { position: relative; }
.notif-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  z-index: 200;
  overflow: hidden;
}
.notif-panel.show { display: block; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 13px;
}
.btn-link { color: var(--text-accent); font-size: 12px; font-weight: 500; cursor: pointer; }
.btn-link:hover { color: var(--primary); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
  transition: var(--transition);
}
.notif-item:hover { background: var(--bg-card); }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.notif-icon.warning { background: rgba(245,158,11,0.15); }
.notif-icon.danger  { background: rgba(239,68,68,0.15); }
.notif-icon.info    { background: rgba(59,130,246,0.15); }
.notif-text { flex: 1; }
.notif-title { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.notif-desc  { color: var(--text-secondary); font-size: 11.5px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

.topbar-datetime { text-align: right; font-size: 13px; font-weight: 600; color: var(--text-secondary); line-height: 1.3; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: var(--bg-base);
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-hover); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card:hover::before { opacity: 1; }
.stat-card.blue::before   { background: var(--primary); }
.stat-card.purple::before { background: var(--secondary); }
.stat-card.green::before  { background: var(--success); }
.stat-card.amber::before  { background: var(--warning); }
.stat-card.red::before    { background: var(--danger); }
.stat-card.cyan::before   { background: var(--cyan); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.stat-icon.blue   { background: rgba(59,130,246,0.15); color: var(--primary); }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: var(--secondary); }
.stat-icon.green  { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.amber  { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.red    { background: rgba(239,68,68,0.15); color: var(--danger); }
.stat-icon.cyan   { background: rgba(6,182,212,0.15); color: var(--cyan); }
.stat-icon svg    { width: 22px; height: 22px; }

.stat-data { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.stat-change { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 20px var(--primary-glow);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 0 30px var(--primary-glow); }
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); border-color: var(--border-hover); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  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: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}
.btn-success:hover { background: rgba(16,185,129,0.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; }

/* ---- Filter chips (e.g. Quick Links categories) ---- */
.chip-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.chip-filter {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12.5px; font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}
.chip-filter .chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-filter:hover { border-color: var(--border-hover); color: var(--text-primary); }
.chip-filter .chip-count {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
}
.chip-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.chip-filter.active .chip-count { background: rgba(255,255,255,0.25); color: white; }
.chip-delete {
  flex-shrink: 0;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 11px; line-height: 1;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}
.chip-delete:hover { background: var(--danger); color: white; }
.chip-filter.active .chip-delete { color: rgba(255,255,255,0.7); }
.chip-filter.active .chip-delete:hover { background: rgba(0,0,0,0.25); color: white; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 36px;
  flex: 1; min-width: 200px; max-width: 320px;
  transition: var(--transition);
}
.search-box:focus-within { border-color: var(--primary); }
.search-box svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.search-box input { flex: 1; background: none; color: var(--text-primary); font-size: 13px; }
.search-box input::placeholder { color: var(--text-muted); }

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0 12px;
  height: 36px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--primary); }
.filter-select option { background: var(--bg-surface); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(255,255,255,0.025); }
.col-actions { width: 120px; text-align: right; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-actions .btn { padding: 5px 10px; font-size: 12px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}
.page-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.page-btn.active { background: var(--primary); color: white; }

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge-active, .badge-resolved, .badge-done { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-active::before, .badge-resolved::before, .badge-done::before { background: var(--success); }
.badge-maintenance, .badge-in-progress { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-maintenance::before, .badge-in-progress::before { background: var(--warning); }
.badge-retired, .badge-closed, .badge-cancelled { background: rgba(148,163,184,0.15); color: var(--text-secondary); }
.badge-retired::before, .badge-closed::before, .badge-cancelled::before { background: var(--text-secondary); }
.badge-critical, .badge-expired { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-critical::before, .badge-expired::before { background: var(--danger); }
.badge-high { background: rgba(249,115,22,0.15); color: var(--orange); }
.badge-high::before { background: var(--orange); }
.badge-medium, .badge-waiting { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-medium::before, .badge-waiting::before { background: var(--warning); }
.badge-low, .badge-open, .badge-scheduled { background: rgba(59,130,246,0.15); color: var(--primary); }
.badge-low::before, .badge-open::before, .badge-scheduled::before { background: var(--primary); }
.badge-expiring { background: rgba(249,115,22,0.15); color: var(--orange); }
.badge-expiring::before { background: var(--orange); }
.badge-storage { background: rgba(139,92,246,0.15); color: var(--secondary); }
.badge-storage::before { background: var(--secondary); }

/* Priority dots */
.priority-critical { color: var(--danger); font-weight: 700; }
.priority-high     { color: var(--orange); }
.priority-medium   { color: var(--warning); }
.priority-low      { color: var(--success); }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 13.5px;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-surface); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  animation: modalIn 0.25s cubic-bezier(0.4,0,0.2,1);
}
.modal.wide { max-width: 800px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 20px;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-footer:empty { display: none; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 1000;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 280px; max-width: 380px;
  font-size: 13.5px;
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.toast.success::before { background: var(--success); }
.toast.error::before   { background: var(--danger); }
.toast.warning::before { background: var(--warning); }
.toast.info::before    { background: var(--primary); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg { flex: 1; font-weight: 500; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   CHARTS
   ============================================================ */
.chart-container {
  position: relative;
  height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.chart-container.sm { height: 200px; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  gap: 16px;
  color: var(--text-muted);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(59,130,246,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeInUp 0.3s cubic-bezier(0.4,0,0.2,1); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.primary  { background: var(--primary); }
.progress-fill.success  { background: var(--success); }
.progress-fill.warning  { background: var(--warning); }
.progress-fill.danger   { background: var(--danger); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 18px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   KANBAN (Helpdesk)
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}
.kanban-col {
  flex: 0 0 280px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kanban-col-header {
  padding: 12px 16px;
  font-size: 13px; font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-count {
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
}
.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 100px; }
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.kanban-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.kanban-card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--text-accent); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }
.text-right     { text-align: right; }
.text-center    { text-align: center; }
.font-bold      { font-weight: 700; }
.font-mono      { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12px; color: var(--cyan); }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-4  { margin-top: 16px; }
.mb-4  { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Info row for detail views */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-row { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

/* Timeline for helpdesk notes */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 12px;
  padding-bottom: 16px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px; top: 30px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.timeline-author { font-size: 13px; font-weight: 600; }
.timeline-time { font-size: 11.5px; color: var(--text-muted); }
.timeline-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Maintenance calendar card */
.maint-card {
  display: flex; gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
}
.maint-card:hover { border-color: var(--border-hover); }
.maint-date-box {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.maint-date-box .day { font-size: 22px; font-weight: 800; line-height: 1; }
.maint-date-box .month { font-size: 10px; font-weight: 600; text-transform: uppercase; opacity: 0.8; }

/* Color theme cards */
.maint-card.preventive .maint-date-box { background: rgba(59,130,246,0.15); color: var(--primary); }
.maint-card.corrective .maint-date-box { background: rgba(245,158,11,0.15); color: var(--warning); }
.maint-card.emergency  .maint-date-box { background: rgba(239,68,68,0.15);  color: var(--danger); }

/* Reports */
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: var(--transition);
  cursor: pointer;
}
.report-card:hover { border-color: var(--primary); background: var(--bg-card-hover); }
.report-icon { font-size: 28px; }
.report-title { font-size: 15px; font-weight: 700; }
.report-desc { font-size: 12.5px; color: var(--text-secondary); }

/* Settings */
.settings-section { margin-bottom: 32px; }
.settings-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 13.5px; font-weight: 600; }
.setting-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px; height: 24px;
  cursor: pointer;
}
.toggle input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Network device cards */
.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
}
.device-card:hover { border-color: var(--border-hover); }
.device-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.device-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.device-name { font-weight: 600; font-size: 14px; }
.device-type { font-size: 11.5px; color: var(--text-muted); }
.device-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.device-detail-item { display: flex; flex-direction: column; gap: 2px; }
.device-detail-label { color: var(--text-muted); font-size: 10.5px; text-transform: uppercase; }
.device-detail-value { color: var(--text-primary); font-weight: 500; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -240px; z-index: 300; transition: left 0.3s ease; }
  .sidebar.mobile-open { left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .main-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ============================================================
   AUTH / LOCK SCREEN — 3D embossed scene
   ============================================================ */
.sidebar, .main-wrapper { display: none; }
body.app-unlocked .sidebar { display: flex; }
body.app-unlocked .main-wrapper { display: flex; flex-direction: column; flex: 1; }

.auth-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  padding: 20px;
  overflow: hidden;
  perspective: 1600px;
}
body.app-unlocked .auth-overlay { display: none; }

/* ---- Tron-style perspective floor ---- */
.auth-floor {
  position: absolute; left: 50%; bottom: 0;
  width: 220vw; height: 65vh;
  transform-origin: bottom center;
  transform: translateX(-50%) rotateX(78deg);
  background-image:
    linear-gradient(rgba(6,182,212,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,0.55) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to top, black, transparent 80%);
  mask-image: linear-gradient(to top, black, transparent 80%);
  opacity: 0.16;
  pointer-events: none;
  animation: authFloorScroll 5s linear infinite;
}
@keyframes authFloorScroll { from { background-position: 0 0, 0 0; } to { background-position: 0 46px, 0 0; } }

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  will-change: transform;
}
.auth-orb-1 {
  width: 480px; height: 480px; top: -160px; left: -140px;
  background: radial-gradient(circle, rgba(59,130,246,0.5), transparent 70%);
  animation: authOrb1 24s ease-in-out infinite;
}
.auth-orb-2 {
  width: 440px; height: 440px; bottom: -170px; right: -120px;
  background: radial-gradient(circle, rgba(6,182,212,0.4), transparent 70%);
  animation: authOrb2 28s ease-in-out infinite;
}
@keyframes authOrb1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.06); } }
@keyframes authOrb2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-35px,-25px) scale(1.05); } }

.auth-bg-grid {
  position: absolute; inset: -50px;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, black 0%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
  animation: authGridDrift 34s linear infinite;
}
@keyframes authGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 44px 44px, 44px 44px; } }

/* ---- Floating 3D emboss shapes (cubes + rings) ---- */
.auth-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.auth-cube-wrap {
  position: absolute;
  width: var(--size, 48px); height: var(--size, 48px);
  animation: authCubeFloat 7s ease-in-out infinite;
}
.auth-cube {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: authCubeSpin 18s linear infinite;
  opacity: 0.55;
}
.auth-cube .face {
  position: absolute; inset: 0;
  border: 1px solid rgba(255,255,255,0.22);
  background: linear-gradient(135deg, rgba(59,130,246,0.28), rgba(6,182,212,0.06));
  box-shadow: inset 0 0 10px rgba(255,255,255,0.12), inset 0 0 3px rgba(0,0,0,0.5);
}
.auth-cube .front  { transform: translateZ(calc(var(--size, 48px) / 2)); }
.auth-cube .back   { transform: translateZ(calc(var(--size, 48px) / -2)) rotateY(180deg); }
.auth-cube .right  { transform: rotateY(90deg)  translateZ(calc(var(--size, 48px) / 2)); }
.auth-cube .left   { transform: rotateY(-90deg) translateZ(calc(var(--size, 48px) / 2)); }
.auth-cube .top    { transform: rotateX(90deg)  translateZ(calc(var(--size, 48px) / 2)); }
.auth-cube .bottom { transform: rotateX(-90deg) translateZ(calc(var(--size, 48px) / 2)); }
@keyframes authCubeSpin  { from { transform: rotateX(0) rotateY(0); } to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes authCubeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }

.auth-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(6,182,212,0.35);
  box-shadow: 0 0 20px rgba(6,182,212,0.15) inset;
  transform-style: preserve-3d;
}
.auth-ring.ring-1 { width: 180px; height: 180px; top: 8%; right: 8%; animation: authRingSpin 16s linear infinite; }
.auth-ring.ring-2 { width: 120px; height: 120px; bottom: 10%; left: 6%; border-color: rgba(59,130,246,0.35); animation: authRingSpin 12s linear infinite reverse; }
@keyframes authRingSpin { from { transform: rotateX(72deg) rotateZ(0deg); } to { transform: rotateX(72deg) rotateZ(360deg); } }

.auth-glints { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.auth-glint {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px 2px rgba(6,182,212,0.8);
  animation: authGlint 4.2s ease-in-out infinite;
}
.auth-glint:nth-child(even) { background: var(--primary); box-shadow: 0 0 8px 2px rgba(59,130,246,0.8); }
@keyframes authGlint { 0%,100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 0.9; transform: scale(1.3); } }

@media (prefers-reduced-motion: reduce) {
  .auth-orb, .auth-box, .auth-bg-grid, .auth-glint, .auth-box::before, .auth-box::after,
  .auth-floor, .auth-cube-wrap, .auth-cube, .auth-ring, .auth-logo-mark { animation: none !important; transition: none !important; }
  .auth-box { transform: none !important; }
}

/* ---- The embossed 3D card itself ---- */
.auth-box {
  position: relative;
  width: 100%; max-width: 400px;
  background: linear-gradient(155deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015) 55%, rgba(0,0,0,0.08));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  box-shadow:
    0 40px 70px -20px rgba(0,0,0,0.7),
    0 14px 28px -10px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.45),
    inset 0 0 40px rgba(6,182,212,0.05),
    0 0 70px rgba(6,182,212,0.10);
  padding: 40px 34px;
  backdrop-filter: blur(20px);
  animation: authIn 0.6s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.15s ease-out;
  will-change: transform;
}
.auth-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--cyan), transparent);
  background-size: 200% 100%;
  animation: authShimmer 5s linear infinite;
}
/* cursor-tracking spotlight sheen, driven by --mx/--my from auth-fx.js */
.auth-box::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,0.14), transparent 45%);
  opacity: 0; transition: opacity 0.35s;
  pointer-events: none;
}
.auth-box:hover::after { opacity: 1; }
@keyframes authShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes authIn { from { opacity: 0; transform: translateY(30px) rotateX(-8deg) scale(0.96); } to { opacity: 1; transform: rotateX(0deg) scale(1); } }

.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; transform: translateZ(38px); }
.auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-logo-mark {
  height: 38px; width: auto; flex-shrink: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5));
  animation: authLogoFloat 6s ease-in-out infinite;
}
@keyframes authLogoFloat {
  0%,100% { transform: perspective(300px) rotateY(-16deg) rotateX(4deg) translateZ(0); }
  50%     { transform: perspective(300px) rotateY(16deg) rotateX(-4deg) translateZ(16px); }
}
.auth-logo-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.auth-logo-title {
  font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--text-primary);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3), 0 2px 3px rgba(0,0,0,0.6);
}
.auth-logo-sub { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; }

.auth-box h2 {
  font-size: 21px; font-weight: 800; margin-bottom: 6px; text-align: center;
  transform: translateZ(34px);
  color: var(--text-primary);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35), 0 2px 4px rgba(0,0,0,0.6), 0 0 22px rgba(59,130,246,0.3);
}
.auth-subtitle { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 22px; text-align: center; transform: translateZ(28px); }
.auth-form { display: flex; flex-direction: column; gap: 15px; transform-style: preserve-3d; transform: translateZ(22px); }

.auth-form .form-label {
  text-shadow: 0 1px 0 rgba(0,0,0,0.6), 0 -1px 0 rgba(255,255,255,0.04);
}
.auth-input-wrap { position: relative; }
.auth-input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.auth-input-wrap .form-input { padding-left: 38px; }

/* pressed-in / engraved well for auth inputs only */
.auth-form .form-input {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.55), inset 0 -1px 0 rgba(255,255,255,0.05), 0 1px 0 rgba(255,255,255,0.05);
  transition: var(--transition), box-shadow 0.2s;
}
.auth-form .form-input:focus {
  border-color: var(--border-active);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.6), 0 0 0 3px rgba(59,130,246,0.18), 0 0 16px rgba(6,182,212,0.2);
}

.auth-error {
  font-size: 12.5px; color: var(--danger);
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm); padding: 8px 10px;
}

/* raised, physically-pressable 3D emboss button */
.auth-form #authSubmit {
  position: relative;
  transform: translateZ(30px);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow:
    0 6px 0 rgba(10,30,70,0.55),
    0 10px 20px -4px rgba(59,130,246,0.45),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.auth-form #authSubmit:hover { filter: brightness(1.06); }
.auth-form #authSubmit:active {
  transform: translateZ(30px) translateY(5px);
  box-shadow:
    0 1px 0 rgba(10,30,70,0.55),
    0 3px 8px -2px rgba(59,130,246,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 2px rgba(0,0,0,0.25);
}

.auth-reset-link { display: block; width: 100%; text-align: center; margin-top: 16px; font-size: 12px; transform: translateZ(18px); }
.auth-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
  transform: translateZ(14px);
}
.auth-footer svg { width: 13px; height: 13px; opacity: 0.8; }

@media (max-width: 480px) {
  .auth-floor, .auth-ring, .auth-cube-wrap { display: none; }
}

/* ============================================================
   IT CALENDAR
   ============================================================ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid-header { margin-bottom: 6px; }
.cal-cell-label { text-align: center; font-size: 11px; color: var(--text-muted); font-weight: 600; padding: 4px 0; }
.cal-cell {
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.cal-cell:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.cal-cell-empty { border: none; cursor: default; }
.cal-cell-empty:hover { background: none; }
.cal-cell.today { border-color: var(--primary); background: var(--primary-glow); }
.cal-daynum { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cal-dots { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.cal-more { font-size: 9.5px; color: var(--text-muted); }
@media (max-width: 768px) {
  .cal-cell { min-height: 44px; }
}

/* ============================================================
   PAGES — card/list view toggle + thumbnails
   ============================================================ */
.pg-view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.pg-view-toggle button {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); background: transparent; border: none; cursor: pointer;
  transition: var(--transition);
}
.pg-view-toggle button + button { border-left: 1px solid var(--border); }
.pg-view-toggle button:hover { background: var(--bg-input); color: var(--text-primary); }
.pg-view-toggle button.active { background: var(--primary); color: white; }
.pg-view-toggle svg { width: 16px; height: 16px; }

.pg-card { padding: 0; overflow: hidden; }
.pg-thumb {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex; align-items: center; justify-content: center;
}
.pg-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-thumb-icon { font-size: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25)); }
.pg-card-body { padding: 16px; }

.pg-list-thumb {
  width: 40px; height: 40px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.pg-list-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-list-thumb span { font-size: 16px; }
