/* ============================================================
   MÉRŐMESTER – Design System
   Villanyszerelési ügyviteli rendszer
   Ipari / műszaki esztétika – precíz, megbízható, funkcionális
   ============================================================ */

/* Google Fonts */
/* fonts: system-ui */

/* ============================================================
   1. CSS VÁLTOZÓK – Design Tokens
   ============================================================ */
:root {
  /* Fő színpaletta – elektromos / ipari */
  --color-primary:       #1a6b3c;   /* Mély zöld – megbízhatóság */
  --color-primary-light: #2d9657;
  --color-primary-dark:  #0f4526;
  --color-primary-muted: rgba(26, 107, 60, 0.12);

  --color-accent:        #f5a623;   /* Elektromos sárga – figyelem, akció */
  --color-accent-light:  #ffd166;
  --color-accent-dark:   #c47d0e;

  --color-danger:        #e03e3e;   /* Piros – hiba, sürgős */
  --color-danger-light:  #fee2e2;
  --color-warning:       #f59e0b;   /* Narancs – figyelmeztetés */
  --color-warning-light: #fef3c7;
  --color-success:       #10b981;   /* Zöld – sikeres, kész */
  --color-success-light: #d1fae5;
  --color-info:          #3b82f6;   /* Kék – információ */
  --color-info-light:    #dbeafe;

  /* Szürke skála */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Háttér rendszer */
  --bg-app:       #f0f4f8;
  --bg-surface:   #ffffff;
  --bg-elevated:  #ffffff;
  --bg-sidebar:   #0f2027;   /* Sötét ipari sidebar */
  --bg-navbar:    #0f2027;

  /* Szöveg */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;
  --text-on-primary: #ffffff;

  /* Betűtípusok */
  --font-ui:      system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Segoe UI', system-ui, Arial, sans-serif;
  --font-mono:    'Consolas', 'Cascadia Code', 'Courier New', monospace;

  /* Betűméretek */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */

  /* Keretek és árnyékok */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.06);

  /* Border */
  --border-color: #e2e8f0;
  --border-focus: #1a6b3c;

  /* Layout */
  --sidebar-width:         240px;
  --sidebar-collapsed:     64px;
  --navbar-height:         56px;
  --content-max-width:     1400px;

  /* Animációk */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;

  /* Z-index rendszer */
  --z-dropdown:   100;
  --z-sticky:     200;
  --z-overlay:    300;
  --z-modal:      400;
  --z-toast:      500;
}

/* Sötét téma */
[data-theme="dark"] {
  --bg-app:       #0a0f1a;
  --bg-surface:   #111827;
  --bg-elevated:  #1e293b;
  --bg-sidebar:   #070c14;
  --bg-navbar:    #070c14;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border-color: #1e293b;
  --gray-50:  #1e293b;
  --gray-100: #243042;
}

/* ============================================================
   2. CSS RESET és ALAP
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-app);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-primary-light); }

img, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style: none; }

/* ============================================================
   3. LAYOUT – App shell
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-rows: var(--navbar-height) 1fr;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-areas:
    "navbar navbar"
    "sidebar main";
  min-height: 100vh;
  transition: grid-template-columns var(--transition-base);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}

/* ============================================================
   4. NAVBAR – Felső navigáció
   ============================================================ */
.navbar {
  grid-area: navbar;
  background: var(--bg-navbar);
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 1rem 0 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-brand {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 1.25rem;
  transition: width var(--transition-base), min-width var(--transition-base);
  overflow: hidden;
}

.sidebar-collapsed .navbar-brand {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
  padding: 0;
  justify-content: center;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  transition: opacity var(--transition-base);
}

.sidebar-collapsed .brand-text {
  opacity: 0;
  pointer-events: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 9px;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.navbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  max-width: 600px;
}

/* Globális keresőmező */
.global-search {
  position: relative;
  width: 100%;
}

.global-search-input {
  width: 100%;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  padding: 0 1rem 0 2.5rem;
  color: #ffffff;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  outline: none;
}

.global-search-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.global-search-input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(26,107,60,0.3);
}

.global-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  pointer-events: none;
}

.global-search-shortcut {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  padding: 1px 5px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Navbar gomb */
.nav-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-action-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

/* Értesítési badge */
.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--color-danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-navbar);
}

/* Felhasználói avatar */
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
  margin-left: 0.25rem;
}

.user-menu-trigger:hover {
  background: rgba(255,255,255,0.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #ffffff;
}

.user-role {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   5. SIDEBAR – Bal oldali navigáció
   ============================================================ */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  width: var(--sidebar-width);
  min-height: calc(100vh - var(--navbar-height));
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-base);
  border-right: 1px solid rgba(255,255,255,0.04);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Sidebar toggle gomb */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 0.75rem 0.5rem;
}

.sidebar-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}

/* Sidebar szekció */
.sidebar-section {
  padding: 0.5rem 0;
}

.sidebar-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.25);
  padding: 0.75rem 1.25rem 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition-base);
}

.sidebar-collapsed .sidebar-section-label {
  opacity: 0;
  height: 0;
  padding: 0;
}

/* Sidebar navigációs elem */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  color: rgba(255,255,255,0.55);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  border-left: 3px solid transparent;
  text-decoration: none;
  user-select: none;
}

.sidebar-collapsed .nav-item {
  padding: 0.625rem;
  justify-content: center;
}

.nav-item:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
  border-left-color: rgba(255,255,255,0.2);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(26,107,60,0.25);
  border-left-color: var(--color-primary-light);
}

.nav-item.active .nav-icon {
  color: var(--color-primary-light);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: color var(--transition-fast);
}

.nav-label {
  transition: opacity var(--transition-base), width var(--transition-base);
  flex: 1;
}

.sidebar-collapsed .nav-label {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.nav-badge {
  background: var(--color-accent);
  color: var(--gray-900);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  transition: opacity var(--transition-base);
}

.sidebar-collapsed .nav-badge {
  opacity: 0;
}

/* Tooltip collapsed sidebar-hoz */
.nav-item[data-tooltip] {
  position: relative;
}

.sidebar-collapsed .nav-item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sidebar-collapsed) + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-800);
  color: white;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.sidebar-collapsed .nav-item[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  left: calc(var(--sidebar-collapsed) + 2px);
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--gray-800);
  z-index: var(--z-dropdown);
}

/* Sidebar alap */
.sidebar-footer {
  margin-top: auto;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================
   6. MAIN CONTENT – Fő tartalom terület
   ============================================================ */
.main-content {
  grid-area: main;
  min-height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-app);
}

/* Oldal fejléc */
.page-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-header-left {
  flex: 1;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tartalom konténer */
.page-content {
  padding: 1.5rem 1.75rem;
  max-width: var(--content-max-width);
}

/* ============================================================
   7. KÁRTYÁK
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title-icon {
  width: 28px;
  height: 28px;
  background: var(--color-primary-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-primary);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Stat kártya – Dashboard számokhoz */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-color, var(--color-primary));
}

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

.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-muted);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--stat-bg, var(--color-primary-muted));
  color: var(--stat-color, var(--color-primary));
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-card-meta {
  margin-top: 0.5rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-card-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.trend-up   { color: var(--color-success); background: var(--color-success-light); }
.trend-down { color: var(--color-danger);  background: var(--color-danger-light); }

/* ============================================================
   8. GOMBOK
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Gomb méretei */
.btn-xs  { padding: 0.25rem 0.625rem; font-size: var(--text-xs); }
.btn-sm  { padding: 0.375rem 0.75rem; font-size: var(--text-sm); }
.btn-md  { padding: 0.5rem 1rem; }
.btn-lg  { padding: 0.75rem 1.5rem; font-size: var(--text-base); }
.btn-xl  { padding: 1rem 2rem; font-size: var(--text-lg); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-icon.btn-lg { width: 44px; height: 44px; }

/* Gomb variánsok */
.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,107,60,0.35);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--gray-900);
  border-color: var(--color-accent);
  font-weight: 700;
}
.btn-accent:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,166,35,0.35);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}
.btn-danger:hover {
  background: #c03030;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.btn-surface {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-surface:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   9. FORM ELEMEK
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}

.form-label.required::after {
  content: ' *';
  color: var(--color-danger);
}

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 0.875rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:hover {
  border-color: var(--gray-400);
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,107,60,0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control.error {
  border-color: var(--color-danger);
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(224,62,62,0.15);
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea.form-control {
  height: auto;
  min-height: 90px;
  padding: 0.625rem 0.875rem;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Input csoport */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-radius: 0;
}

.input-group .form-control:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--gray-100);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.input-group-addon:first-child {
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-addon:last-child {
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Checkbox és Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check-input {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  background: white;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='3' fill='white'/%3E%3C/svg%3E");
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ============================================================
   10. TÁBLÁZATOK
   ============================================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr.selected {
  background: var(--color-primary-muted);
}

/* Sortálható fejléc */
.table th.sortable {
  cursor: pointer;
  user-select: none;
}

.table th.sortable:hover {
  color: var(--text-primary);
  background: var(--gray-100);
}

/* ============================================================
   11. STÁTUSZ BADGE-EK
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Státuszok */
.status-new       { background: var(--color-info-light);    color: var(--color-info); }
.status-survey    { background: #ede9fe;                     color: #7c3aed; }
.status-planning  { background: #fce7f3;                     color: #be185d; }
.status-offer     { background: var(--color-warning-light);  color: #b45309; }
.status-contract  { background: #d1fae5;                     color: #065f46; }
.status-materials { background: #ffedd5;                     color: #c2410c; }
.status-work      { background: var(--color-primary-muted);  color: var(--color-primary-dark); }
.status-docs      { background: #e0e7ff;                     color: #3730a3; }
.status-invoice   { background: var(--color-warning-light);  color: #92400e; }
.status-done      { background: var(--color-success-light);  color: #065f46; }
.status-urgent    { background: var(--color-danger-light);   color: #991b1b; }
.status-paused    { background: var(--gray-100);             color: var(--gray-500); }

/* Pulzáló animáció aktív munkánál */
.status-work::before {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* ============================================================
   12. PRIORITÁS JELZŐK
   ============================================================ */
.priority-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-xs);
  font-weight: 600;
}

.priority-urgent  { color: var(--color-danger); }
.priority-high    { color: var(--color-warning); }
.priority-normal  { color: var(--color-info); }
.priority-low     { color: var(--text-muted); }

/* ============================================================
   13. MODAL / DIALOG
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-lg  { max-width: 760px; }
.modal-xl  { max-width: 1000px; }
.modal-sm  { max-width: 400px; }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  letter-spacing: -0.2px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  background: var(--gray-50);
}

/* ============================================================
   14. TOAST ÉRTESÍTÉSEK
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  width: 100%;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: toastIn 0.3s ease forwards;
  border-left: 4px solid var(--toast-color, var(--color-primary));
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.exiting {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  color: var(--toast-color, var(--color-primary));
  margin-top: 1px;
}

.toast-content { flex: 1; }

.toast-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.toast-message {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 0.125rem;
  line-height: 1.4;
}

.toast-close {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 2px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toast-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Toast típusok */
.toast-success { --toast-color: var(--color-success); }
.toast-error   { --toast-color: var(--color-danger); }
.toast-warning { --toast-color: var(--color-warning); }
.toast-info    { --toast-color: var(--color-info); }

/* ============================================================
   15. DROPDOWN
   ============================================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding: 0.375rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all var(--transition-fast);
}

.dropdown-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--gray-100);
}

.dropdown-item.danger {
  color: var(--color-danger);
}

.dropdown-item.danger:hover {
  background: var(--color-danger-light);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.375rem 0;
}

.dropdown-header {
  padding: 0.375rem 0.75rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ============================================================
   16. TABS
   ============================================================ */
.tabs {
  display: flex;
  flex-direction: column;
}

.tab-list {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content { padding-top: 1.25rem; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   17. BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.breadcrumb-item a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--color-primary);
}

.breadcrumb-item:last-child a,
.breadcrumb-item:last-child span {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--gray-300);
  font-size: 12px;
}

/* ============================================================
   18. KERES̉ۡSI EREDM̉ۡNY PANEL
   ============================================================ */
.search-results-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
  overflow: hidden;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.search-results-header {
  padding: 0.625rem 0.875rem;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: var(--gray-50);
}

.search-results-list {
  overflow-y: auto;
  max-height: 400px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--gray-50); }
.search-result-item.keyboard-selected { background: var(--color-primary-muted); }

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--text-muted);
  flex-shrink: 0;
}

mark.search-highlight {
  background: var(--color-accent-light);
  color: var(--gray-900);
  border-radius: 2px;
  padding: 0 1px;
}

/* ============================================================
   19. PROGRESS / FOLYAMAT JELZŐ
   ============================================================ */
.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* Projekt fázis tracker */
.phase-tracker {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.phase-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  position: relative;
}

.phase-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}

.phase-step:first-child::before { display: none; }

.phase-step.completed::before {
  background: var(--color-primary);
}

.phase-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--transition-fast);
}

.phase-step.completed .phase-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.phase-step.active .phase-dot {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(26,107,60,0.15);
}

.phase-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.phase-step.active .phase-label { color: var(--color-primary); }
.phase-step.completed .phase-label { color: var(--text-secondary); }

/* ============================================================
   20. ÜRES ÁLLAPOT
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--gray-100);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 1.25rem;
  color: var(--gray-400);
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ============================================================
   21. LAYOUT SEGÉDOSZTÁLYOK
   ============================================================ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }

.grid         { display: grid; }
.grid-cols-2  { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3  { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4  { grid-template-columns: repeat(4, 1fr); }

.p-0    { padding: 0; }
.p-1    { padding: 0.25rem; }
.p-2    { padding: 0.5rem; }
.p-3    { padding: 0.75rem; }
.p-4    { padding: 1rem; }
.p-5    { padding: 1.25rem; }
.p-6    { padding: 1.5rem; }

.px-4   { padding-left: 1rem;  padding-right: 1rem; }
.py-4   { padding-top: 1rem;   padding-bottom: 1rem; }
.mb-2   { margin-bottom: 0.5rem; }
.mb-4   { margin-bottom: 1rem; }
.mb-6   { margin-bottom: 1.5rem; }
.mt-2   { margin-top: 0.5rem; }
.mt-4   { margin-top: 1rem; }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }
.mr-2   { margin-right: 0.5rem; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-w-0 { min-width: 0; }

.text-xs     { font-size: var(--text-xs); }
.text-sm     { font-size: var(--text-sm); }
.text-base   { font-size: var(--text-base); }
.text-lg     { font-size: var(--text-lg); }
.text-xl     { font-size: var(--text-xl); }
.text-2xl    { font-size: var(--text-2xl); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary-color { color: var(--color-primary); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono   { font-family: var(--font-mono); }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rounded     { border-radius: var(--radius-md); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.border      { border: 1px solid var(--border-color); }
.border-t    { border-top: 1px solid var(--border-color); }
.border-b    { border-bottom: 1px solid var(--border-color); }

.shadow-sm   { box-shadow: var(--shadow-sm); }
.shadow-md   { box-shadow: var(--shadow-md); }

.bg-surface  { background: var(--bg-surface); }
.bg-muted    { background: var(--gray-50); }

.hidden      { display: none !important; }
.invisible   { visibility: hidden; }

.relative    { position: relative; }
.absolute    { position: absolute; }
.sticky      { position: sticky; }

.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

.cursor-pointer  { cursor: pointer; }
.select-none     { user-select: none; }

.transition      { transition: all var(--transition-fast); }

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 1rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   22. RESZPONZÍV MEDIA QUERIES
   ============================================================ */
@media (max-width: 1280px) {
  .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
    --sidebar-collapsed: 0px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "navbar"
      "main";
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: var(--navbar-height);
    width: 280px !important;
    height: calc(100vh - var(--navbar-height));
    z-index: var(--z-overlay);
    transition: left var(--transition-base);
    box-shadow: var(--shadow-xl);
  }

  .sidebar.mobile-open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--navbar-height);
    background: rgba(0,0,0,0.5);
    z-index: calc(var(--z-overlay) - 1);
  }

  .sidebar-overlay.active { display: block; }

  .navbar-brand {
    width: auto;
    min-width: auto;
    padding: 0 1rem;
  }

  .navbar-center {
    display: none;
  }

  .global-search-shortcut { display: none; }

  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 { grid-template-columns: 1fr; }

  .page-content { padding: 1rem; }

  .modal { max-width: 100%; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  .user-info { display: none; }

  .toast-container {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  :root { --navbar-height: 52px; }
  .page-header { padding: 1rem; }
  .page-title { font-size: var(--text-xl); }
  .stat-card-value { font-size: var(--text-2xl); }
}

/* ============================================================
   23. ANIMÁCIÓK
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.animate-fade-in   { animation: fadeIn 0.3s ease forwards; }
.animate-slide-down { animation: slideDown 0.3s ease forwards; }
.animate-slide-up  { animation: slideUp 0.3s ease forwards; }
.animate-scale-in  { animation: scaleIn 0.25s ease forwards; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   24. SCROLLBAR STÍLUS
   ============================================================ */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================================
   25. PRINT STÍLUS
   ============================================================ */
@media print {
  .navbar, .sidebar, .page-header-actions, .btn, .toast-container {
    display: none !important;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
  }

  .main-content {
    overflow: visible;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}