/* ==========================================================================
   ERP KS - High-End SaaS Dark & Light Design System
   Inspired by FCL Dashboard: Midnight Slate, Precision Cards & Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables & Theme Definitions
   -------------------------------------------------------------------------- */

:root,
html.dark-theme {
  /* Dark Theme (Default - Matching User Reference Screenshot) */
  --bg: #090e17;
  --bg-topbar: #090e17;
  --bg-sidebar: #070c15;
  --panel: #11192e;
  --panel-alt: #0d1527;
  --panel-hover: #16223c;
  --line: #1c2b48;
  --line-strong: #24375b;

  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --muted: #7f93b0;
  --subtle: #576d8c;

  /* Accents */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.15);
  --accent-border: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.3);

  /* Status Colors */
  --badge-blue-bg: rgba(59, 130, 246, 0.15);
  --badge-blue-text: #60a5fa;
  --badge-green-bg: rgba(16, 185, 129, 0.15);
  --badge-green-text: #34d399;
  --badge-cyan-bg: rgba(6, 182, 212, 0.15);
  --badge-cyan-text: #22d3ee;
  --badge-amber-bg: rgba(245, 158, 11, 0.15);
  --badge-amber-text: #fbbf24;
  --badge-rose-bg: rgba(239, 68, 68, 0.15);
  --badge-rose-text: #f87171;
  --badge-teal-bg: rgba(20, 184, 166, 0.15);
  --badge-teal-text: #2dd4bf;
  --badge-purple-bg: rgba(168, 85, 247, 0.15);
  --badge-purple-text: #c084fc;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);

  /* Radii */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Theme Icons */
  --sun-display: block;
  --moon-display: none;
}

html.light-theme {
  /* Light Theme (Toggleable) */
  --bg: #f8fafc;
  --bg-topbar: #ffffff;
  --bg-sidebar: #ffffff;
  --panel: #ffffff;
  --panel-alt: #f8fafc;
  --panel-hover: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --subtle: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-border: #93c5fd;
  --accent-glow: rgba(37, 99, 235, 0.2);

  --badge-blue-bg: #eff6ff;
  --badge-blue-text: #2563eb;
  --badge-green-bg: #ecfdf5;
  --badge-green-text: #059669;
  --badge-cyan-bg: #ecfeff;
  --badge-cyan-text: #0891b2;
  --badge-amber-bg: #fffbeb;
  --badge-amber-text: #d97706;
  --badge-rose-bg: #fef2f2;
  --badge-rose-text: #dc2626;
  --badge-teal-bg: #f0fdfa;
  --badge-teal-text: #0d9488;
  --badge-purple-bg: #faf5ff;
  --badge-purple-text: #9333ea;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1);

  --sun-display: none;
  --moon-display: block;
}

/* --------------------------------------------------------------------------
   Reset & Global Typography
   -------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Environment Banner for Homolog */
.environment-banner {
  background: #f59e0b;
  color: #78350f;
  text-align: center;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-bottom: 1px solid #d97706;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Top Navigation Bar (FCL Style)
   -------------------------------------------------------------------------- */

.top-nav-bar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--line);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.has-env-banner .top-nav-bar {
  top: 29px;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-badge-header {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
  flex-shrink: 0;
}

.brand-texts {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Top Global Search (with / shortcut) */
.top-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 320px;
}

.top-search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

#nav-search {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

#nav-search::placeholder {
  color: var(--subtle);
}

#nav-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-shortcut {
  position: absolute;
  right: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--panel-hover);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  pointer-events: none;
}

/* Top Nav Right Controls */
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  transform: scale(1.05);
}

.theme-toggle-btn .sun-icon {
  display: var(--sun-display);
}

.theme-toggle-btn .moon-icon {
  display: var(--moon-display);
}

/* User Badge Pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 6px;
  border-radius: var(--radius-full);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.user-greeting {
  font-size: 13px;
  color: var(--ink);
}

.admin-link-badge {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
}

.admin-link-badge:hover {
  text-decoration: underline;
}

.logout-form {
  margin: 0;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  background: var(--panel-hover);
  border-color: #ef4444;
  color: #ef4444;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   App Layout (Sidebar + Main)
   -------------------------------------------------------------------------- */

.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

/* Sidebar Navigation */
aside {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.has-env-banner aside {
  top: 93px;
  height: calc(100vh - 93px);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 10px 10px;
}

nav {
  display: grid;
  gap: 4px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

nav a:hover {
  background: var(--panel-hover);
  color: var(--ink);
}

nav a.active {
  background: var(--panel-hover);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}

html.light-theme nav a.active {
  background: #eff6ff;
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  display: inline-block;
  text-align: center;
}

.nav-group {
  padding-bottom: 4px;
}

.nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background-color 0.15s;
}

.nav-heading:hover {
  color: var(--ink);
  background: var(--panel-hover);
}

.heading-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-heading::marker {
  content: "";
}

.nav-heading::-webkit-details-marker {
  display: none;
}

.nav-heading::after {
  content: "›";
  font-size: 15px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.nav-group[open] > .nav-heading::after {
  transform: rotate(90deg);
}

.nav-links {
  display: grid;
  gap: 2px;
  padding: 2px 0 4px 28px;
}

.nav-links a {
  font-size: 13px;
  padding: 7px 10px;
}

/* --------------------------------------------------------------------------
   Main Workspace Content
   -------------------------------------------------------------------------- */

main {
  padding: 28px 36px;
  max-width: 1440px;
  width: 100%;
  min-width: 0;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.panel-subtitle {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   KPI & Stat Cards (Matching User Reference Image)
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Icon Badges (Blue, Green, Cyan, Amber, Rose, Teal) */
.stat-icon-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  margin-bottom: 14px;
}

.badge-blue { background: var(--badge-blue-bg); color: var(--badge-blue-text); }
.badge-green { background: var(--badge-green-bg); color: var(--badge-green-text); }
.badge-cyan { background: var(--badge-cyan-bg); color: var(--badge-cyan-text); }
.badge-amber { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
.badge-rose { background: var(--badge-rose-bg); color: var(--badge-rose-text); }
.badge-teal { background: var(--badge-teal-bg); color: var(--badge-teal-text); }
.badge-purple { background: var(--badge-purple-bg); color: var(--badge-purple-text); }

.stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.stat-sub {
  font-size: 12px;
  color: var(--subtle);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Panels & Cards
   -------------------------------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.warning {
  background: var(--badge-amber-bg);
  border: 1px solid var(--badge-amber-text);
  color: var(--badge-amber-text);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
}

.success {
  background: var(--badge-green-bg);
  border: 1px solid var(--badge-green-text);
  color: var(--badge-green-text);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
}

.messages {
  background: var(--badge-green-bg);
  border: 1px solid var(--badge-green-text);
  color: var(--badge-green-text);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 600;
}

.messages p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Forms & Inputs
   -------------------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 22px;
  align-items: end;
}

.form-grid.plain-form {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--panel);
  transition: all 0.15s ease;
  min-height: 40px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
  white-space: nowrap;
}

button:hover,
.button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

button:active,
.button:active {
  transform: translateY(0);
}

button.secondary,
.button.secondary {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

button.secondary:hover,
.button.secondary:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  color: var(--ink);
}

button.small,
.button.small {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   Tables (Modern Dark / Light Layout with Sticky Headers)
   -------------------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--panel-alt);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background-color: var(--panel-alt);
}

tbody tr:hover {
  background-color: var(--panel-hover);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.highlight-available {
  color: var(--badge-green-text);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--panel-hover);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pill-brand {
  background: var(--badge-blue-bg);
  border-color: var(--badge-blue-text);
  color: var(--badge-blue-text);
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Login Screen (Modern SaaS Auth Card)
   -------------------------------------------------------------------------- */

body.login-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  place-items: center;
  background: var(--bg);
  padding: 24px 16px;
}

.login-main {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-xl);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.login-brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.login-brand p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  gap: 6px;
}

.login-form input {
  height: 44px;
}

.login-form button {
  width: 100%;
  height: 44px;
  font-size: 14.5px;
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Mobile Drawer & Responsiveness
   -------------------------------------------------------------------------- */

.sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .top-nav-bar {
    padding: 0 16px;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .top-search-wrapper {
    display: none;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  aside {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 100;
    background: var(--bg-sidebar);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
  }

  body.has-env-banner aside {
    top: 93px;
  }

  aside.mobile-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: 64px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  main {
    padding: 20px 16px;
  }

  .page-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .user-greeting {
    display: none;
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
  }
}
