/* ===== DESIGN TOKENS ===== */
:root {
  --bg-primary: #060b18;
  --bg-secondary: #0d1425;
  --bg-card: rgba(15, 23, 42, 0.9);
  --bg-glass: rgba(30, 41, 59, 0.6);
  --bg-hover: rgba(56, 189, 248, 0.08);
  --border: rgba(148, 163, 184, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #7c8ba5;
  --accent-blue: #38bdf8;
  --accent-green: #34d399;
  --accent-red: #fb7185;
  --accent-purple: #a78bfa;
  --accent-amber: #fbbf24;
  --accent-cyan: #22d3ee;
  --gradient-main: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);
  --gradient-red: linear-gradient(135deg, #fb7185 0%, #fb923c 100%);
  --gradient-purple: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
  --gradient-amber: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
  --shadow-glow-blue: 0 0 24px rgba(56,189,248,0.18);
  --shadow-glow-green: 0 0 24px rgba(52,211,153,0.18);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --sidebar-width: 260px;
  --topbar-height: 72px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15.5px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(56,189,248,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(110,231,183,0.03) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width); height: 100vh; position: fixed; left: 0; top: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; transition: var(--transition);
  backdrop-filter: blur(20px);
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: rgba(110,231,183,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.logo:hover .logo-icon { transform: rotate(5deg) scale(1.05); background: rgba(110,231,183,0.15); }
.logo-text h1 { font-size: 1.05rem; font-weight: 700; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-text span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; font-weight: 500; }

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--radius-sm); color: var(--text-secondary);
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: var(--transition); position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: rgba(56,189,248,0.1); color: var(--accent-blue);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 24px; background: var(--accent-blue); border-radius: 0 4px 4px 0;
}

.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.system-status { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.active { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width); flex: 1;
  min-height: 100vh; position: relative; z-index: 1;
}

/* ===== TOP BAR ===== */
.top-bar {
  height: var(--topbar-height); padding: 0 32px;
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,14,26,0.8); backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 50;
}
.menu-toggle { display: none; background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; border-radius: var(--radius-sm); }
.menu-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.search-box {
  flex: 1; max-width: 480px; display: flex; align-items: center; gap: 10px;
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0 16px; transition: var(--transition);
}
.search-box:focus-within { border-color: var(--border-glow); box-shadow: var(--shadow-glow-blue); }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; background: none; color: var(--text-primary);
  font-size: 0.9rem; padding: 12px 0; outline: none; font-family: inherit;
}
.search-box input::placeholder { color: var(--text-muted); }
.top-bar-actions { display: flex; gap: 10px; margin-left: auto; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-main); color: #0a0e1a;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow-green); }
.btn-outline {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-glow); color: var(--text-primary); background: var(--bg-hover); }
.btn-danger { background: var(--gradient-red); color: #fff; }
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(248,113,113,0.2); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); background: none; border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { border-color: var(--border-glow); color: var(--accent-blue); }
.btn-icon.danger:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* ===== VIEWS ===== */
.view { display: none; padding: 32px; animation: fadeIn 0.3s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== KPI CARDS ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 28px; }
.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; align-items: center; gap: 16px;
  backdrop-filter: blur(10px); transition: var(--transition);
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-main); opacity: 0; transition: var(--transition);
}
.kpi-card:hover { transform: translateY(-3px); border-color: var(--border-glow); box-shadow: var(--shadow-md); }
.kpi-card:hover::before { opacity: 1; }
.kpi-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-icon.blue { background: rgba(56,189,248,0.12); color: var(--accent-blue); }
.kpi-icon.green { background: rgba(110,231,183,0.12); color: var(--accent-green); }
.kpi-icon.red { background: rgba(248,113,113,0.12); color: var(--accent-red); }
.kpi-icon.purple { background: rgba(167,139,250,0.12); color: var(--accent-purple); }
.kpi-icon.amber { background: rgba(251,191,36,0.12); color: var(--accent-amber); }
.kpi-value { font-size: 1.8rem; font-weight: 800; display: block; line-height: 1; }
.kpi-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; display: block; }

/* ===== CHARTS ===== */
.charts-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 20px; margin-bottom: 28px; }
.chart-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); backdrop-filter: blur(10px);
  transition: var(--transition); overflow: hidden;
}
.chart-card:hover { border-color: var(--border-glow); }
.chart-header { padding: 20px 24px 0; }
.chart-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.chart-body { padding: 20px; display: flex; align-items: center; justify-content: center; }
.chart-body canvas { max-width: 100%; height: auto; }

/* ===== ACTIVITY CARD ===== */
.activity-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); backdrop-filter: blur(10px);
}
.activity-list { padding: 8px 24px 20px; max-height: 320px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
}
.activity-dot.created { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.activity-dot.updated { background: var(--accent-blue); box-shadow: 0 0 6px var(--accent-blue); }
.activity-dot.deleted { background: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }
.activity-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ===== ACTIVITY TIMELINE ===== */
.activity-timeline { max-width: 700px; }
.timeline-item {
  display: flex; gap: 16px; padding: 16px 0; position: relative;
}
.timeline-item::before {
  content: ''; position: absolute; left: 19px; top: 36px; bottom: -16px;
  width: 2px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; z-index: 1;
}
.timeline-dot.created { background: rgba(110,231,183,0.15); color: var(--accent-green); border: 2px solid var(--accent-green); }
.timeline-dot.updated { background: rgba(56,189,248,0.15); color: var(--accent-blue); border: 2px solid var(--accent-blue); }
.timeline-dot.deleted { background: rgba(248,113,113,0.15); color: var(--accent-red); border: 2px solid var(--accent-red); }
.timeline-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px; flex: 1;
}
.timeline-content h4 { font-size: 0.9rem; margin-bottom: 4px; }
.timeline-content p { font-size: 0.85rem; color: var(--text-secondary); }
.timeline-content .time { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* ===== VIEW HEADER & FILTERS ===== */
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
.view-header h2 { font-size: 1.4rem; font-weight: 700; }
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-select {
  background: var(--bg-glass); border: 1px solid var(--border);
  color: var(--text-primary); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-family: inherit; cursor: pointer; transition: var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--border-glow); }
.filter-select option { background: var(--bg-secondary); }

/* ===== TILE GRID ===== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  align-items: stretch;
}
.tile {
  background: linear-gradient(160deg, rgba(15,23,42,0.95), rgba(10,16,32,0.98));
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: var(--radius-lg);
  padding: 0;
  backdrop-filter: blur(12px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0.6;
  transition: var(--transition);
}
.tile:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--shadow-glow-blue);
}
.tile:hover::before { opacity: 1; height: 3px; }
.tile.non-op { border-color: rgba(251,113,133,0.15); }
.tile.non-op::before { background: var(--gradient-red); opacity: 0.7; }
.tile.non-op:hover { border-color: rgba(251,113,133,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 24px rgba(251,113,133,0.12); }

/* Tile Header */
.tile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 14px;
  gap: 8px;
}
.tile-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tile-chip-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tile-chip-icon.active {
  background: rgba(52,211,153,0.12);
  color: var(--accent-green);
  box-shadow: inset 0 0 12px rgba(52,211,153,0.08);
}
.tile-chip-icon.non-op {
  background: rgba(251,113,133,0.12);
  color: var(--accent-red);
  box-shadow: inset 0 0 12px rgba(251,113,133,0.08);
}
.tile-name {
  font-size: 1.02rem; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.tile-serial {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.tile-badge-area {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}

/* Tile Body — detail info */
.tile-body {
  padding: 0 20px 18px;
  flex: 1;
}
.tile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.tile-info-item {
  display: flex;
  flex-direction: column;
}
.tile-info-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.tile-info-value {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Tile Footer */
.tile-footer {
  padding: 14px 20px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: rgba(0,0,0,0.15);
}
.tile-remarks {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ===== DETAIL VIEW MODAL ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 20px;
}
.detail-item {
  display: flex;
  flex-direction: column;
}
.detail-item.full-width {
  grid-column: 1 / -1;
}
.detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.detail-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ===== EMPLOYEE TILES ===== */
.emp-tile {
  background: linear-gradient(160deg, rgba(15,23,42,0.95), rgba(10,16,32,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.emp-tile:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--shadow-glow-blue);
}
.emp-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #060b18;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(52,211,153,0.2);
}
.emp-info { flex: 1; }
.emp-name { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.emp-email { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }
.emp-dept { font-size: 0.82rem; color: var(--accent-blue); margin-top: 4px; font-weight: 500; }
.emp-actions { display: flex; gap: 6px; }

/* Status & OS Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 0.74rem; font-weight: 700; white-space: nowrap;
  letter-spacing: 0.3px;
}
.badge-active { background: rgba(52,211,153,0.15); color: var(--accent-green); border: 1px solid rgba(52,211,153,0.2); }
.badge-active::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.badge-non-op { background: rgba(251,113,133,0.15); color: var(--accent-red); border: 1px solid rgba(251,113,133,0.2); }
.badge-non-op::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-red); animation: pulse 2s ease-in-out infinite; }
.badge-os-yes { background: rgba(56,189,248,0.12); color: var(--accent-blue); border: 1px solid rgba(56,189,248,0.15); }
.badge-os-no { background: rgba(251,191,36,0.12); color: var(--accent-amber); border: 1px solid rgba(251,191,36,0.15); }
.badge-awaiting { background: rgba(251,191,36,0.12); color: var(--accent-amber); border: 1px solid rgba(251,191,36,0.2); }
.badge-awaiting::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-amber); box-shadow: 0 0 8px var(--accent-amber); animation: pulse 2s ease-in-out infinite; }
.country-flag { font-size: 1.1rem; margin-right: 4px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px); z-index: 1000;
  display: none; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 90%; max-width: 560px;
  box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-muted); font-size: 1.5rem;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm);
  transition: var(--transition); line-height: 1;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.modal-body { padding: 24px; }
.confirm-modal { max-width: 420px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* Form Styles */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--bg-glass); border: 1px solid var(--border);
  color: var(--text-primary); padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit; transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--border-glow); box-shadow: var(--shadow-glow-blue);
}
.form-group select option { background: var(--bg-secondary); }
.form-group textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-submit { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: var(--radius-md);
  background: var(--bg-secondary); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); min-width: 300px;
  animation: slideIn 0.3s ease; font-size: 0.88rem;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }
.toast-icon { font-size: 1.2rem; }
.toast.fade-out { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateX(40px); } }

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

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1600px) {
  .tile-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1280px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr 1fr; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .top-bar { padding: 0 16px; }
  .view { padding: 20px 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: 1fr; }
  .top-bar-actions span { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .filter-group { flex-direction: column; width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
}
