/* ==========================================================================
   ATLAS CRM MODERN THEME - 2026
   Based on the Kele AI Atlas design mockup
   ========================================================================== */

:root {
  /* Primary Colors */
  --atlas-primary: #1a9cb8;
  --atlas-primary-dark: #0d7a94;
  --atlas-primary-light: #4fc3dc;
  --atlas-accent: #38b6d2;
  
  /* Sidebar Gradient */
  --sidebar-gradient-start: #0a2a3d;
  --sidebar-gradient-end: #1a4a5e;
  --sidebar-text: rgba(255, 255, 255, 0.9);
  --sidebar-text-muted: rgba(255, 255, 255, 0.6);
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --sidebar-active: rgba(56, 182, 210, 0.3);
  
  /* Background */
  --bg-main: #f0f4f8;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  /* Text */
  --text-primary: #1a2b3c;
  --text-secondary: #5a6b7c;
  --text-muted: #8a9bac;
  
  /* Status Colors */
  --status-new: #38b6d2;
  --status-progress: #f59e0b;
  --status-critical: #ef4444;
  --status-closed: #10b981;
  
  /* Priority Colors */
  --priority-high: #ef4444;
  --priority-medium: #f59e0b;
  --priority-low: #10b981;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.15);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Background Image */
  --bg-image: url("../img/sky_city.webp");
  --bg-opacity: 0.15;
  --bg-blur: 0px;
}

/* ==========================================================================
   SÖTÉT MÓD
   ========================================================================== */
:root[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.85);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --sidebar-gradient-start: #020617;
  --sidebar-gradient-end: #0f172a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   SZÍNSÉMÁK
   ========================================================================== */
:root[data-color-scheme="green"] {
  --atlas-primary: #10b981;
  --atlas-primary-dark: #059669;
  --atlas-primary-light: #34d399;
  --atlas-accent: #34d399;
  --sidebar-active: rgba(16, 185, 129, 0.3);
}
:root[data-color-scheme="purple"] {
  --atlas-primary: #8b5cf6;
  --atlas-primary-dark: #7c3aed;
  --atlas-primary-light: #a78bfa;
  --atlas-accent: #a78bfa;
  --sidebar-active: rgba(139, 92, 246, 0.3);
}
:root[data-color-scheme="orange"] {
  --atlas-primary: #f59e0b;
  --atlas-primary-dark: #d97706;
  --atlas-primary-light: #fbbf24;
  --atlas-accent: #fbbf24;
  --sidebar-active: rgba(245, 158, 11, 0.3);
}
:root[data-color-scheme="red"] {
  --atlas-primary: #ef4444;
  --atlas-primary-dark: #dc2626;
  --atlas-primary-light: #f87171;
  --atlas-accent: #f87171;
  --sidebar-active: rgba(239, 68, 68, 0.3);
}
:root[data-color-scheme="teal"] {
  --atlas-primary: #14b8a6;
  --atlas-primary-dark: #0d9488;
  --atlas-primary-light: #5eead4;
  --atlas-accent: #5eead4;
  --sidebar-active: rgba(20, 184, 166, 0.3);
}

/* Sötét mód + színséma kombinációk */
:root[data-theme="dark"][data-color-scheme="green"] {
  --atlas-primary: #34d399;
  --atlas-primary-dark: #10b981;
}
:root[data-theme="dark"][data-color-scheme="purple"] {
  --atlas-primary: #a78bfa;
  --atlas-primary-dark: #8b5cf6;
}
:root[data-theme="dark"][data-color-scheme="orange"] {
  --atlas-primary: #fbbf24;
  --atlas-primary-dark: #f59e0b;
}
:root[data-theme="dark"][data-color-scheme="red"] {
  --atlas-primary: #f87171;
  --atlas-primary-dark: #ef4444;
}
:root[data-theme="dark"][data-color-scheme="teal"] {
  --atlas-primary: #5eead4;
  --atlas-primary-dark: #14b8a6;
}

/* ==========================================================================
   HÁTTÉRKÉPEK
   ========================================================================== */
:root[data-background="sky-city"] {
  --bg-image: url("../img/sky_city.webp");
}
:root[data-background="minimal"] {
  --bg-image: none;
  --bg-opacity: 0;
}
:root[data-background="dark-abstract"] {
  --bg-image: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
  --bg-opacity: 0.3;
}
:root[data-background="light-gradient"] {
  --bg-image: linear-gradient(135deg, rgba(240, 244, 248, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
  --bg-opacity: 0.2;
}
:root[data-background="none"] {
  --bg-image: none;
  --bg-opacity: 0;
}

/* ==========================================================================
   LOGIN PAGE STYLES
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    linear-gradient(180deg, rgba(20, 40, 70, 0.3) 0%, rgba(30, 50, 80, 0.5) 100%),
    url("../img/sky_city.webp") center/cover no-repeat fixed;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(10, 42, 61, 0.7) 0%, transparent 100%);
  pointer-events: none;
}

.login-header {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 8px;
  margin-bottom: 0;
}

.login-header h1 span {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 16px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Login Card */
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 20;
  margin-top: 80px;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(26, 156, 184, 0.4);
}

.login-logo-icon i {
  font-size: 24px;
  color: white;
}

.login-logo-text {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
}

.login-logo-text span {
  color: var(--atlas-primary);
}

.login-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Login Form */
.login-form .form-group {
  margin-bottom: 20px;
  position: relative;
}

.login-form .form-control {
  height: 52px;
  padding: 14px 16px 14px 48px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.login-form .form-control:focus {
  border-color: var(--atlas-primary);
  box-shadow: 0 0 0 3px rgba(26, 156, 184, 0.15);
  background: white;
}

.login-form .form-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}

.login-form .form-control:focus + .form-icon,
.login-form .form-control:not(:placeholder-shown) + .form-icon {
  color: var(--atlas-primary);
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--atlas-primary);
}

/* Remember & Login Link Row */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.form-check-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.forgot-password-link {
  color: var(--atlas-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.forgot-password-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.login-link {
  color: var(--atlas-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.login-link:hover {
  color: var(--atlas-primary-dark);
}

/* Login Button */
.btn-login {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(26, 156, 184, 0.4);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 156, 184, 0.5);
}

.btn-login:active {
  transform: translateY(0);
}

/* Login Footer Links */
.login-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.login-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: var(--atlas-primary);
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */

.atlas-app {
  display: flex;
  min-height: 100vh;
  background: var(--bg-main);
}

/* Sidebar */
.atlas-sidebar-modern {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar-gradient-start) 0%, var(--sidebar-gradient-end) 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  overflow: hidden;
  transition: width 0.2s ease;
}

/* Összecsukó gomb a menü tetején */
.sidebar-collapse-toggle-wrap {
  flex-shrink: 0;
  padding: 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-collapse-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.sidebar-collapse-toggle i {
  font-size: 1rem;
}

/* Összecsukott állapot: ikon csík + scrollbar szélesség, nincs vízszintes görgetés, fa jelzés bal vonallal */
html.atlas-sidebar-collapsed .atlas-sidebar-modern {
  width: 68px; /* ~52px ikon sáv + ~16px scrollbar */
  overflow-x: hidden;
  min-width: 68px;
}
html.atlas-sidebar-collapsed .atlas-main-modern {
  margin-left: 68px;
}
html.atlas-sidebar-collapsed .sidebar-content {
  min-width: 0;
  overflow-x: hidden;
}
html.atlas-sidebar-collapsed .sidebar-nav {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
html.atlas-sidebar-collapsed .sidebar-collapse-toggle-wrap {
  justify-content: center;
  padding: 8px 6px;
  flex-shrink: 0;
}
html.atlas-sidebar-collapsed .sidebar-chevron-expanded {
  display: none !important;
}
html.atlas-sidebar-collapsed .sidebar-chevron-collapsed {
  display: inline-block !important;
}
html.atlas-sidebar-collapsed .sidebar-brand-text,
html.atlas-sidebar-collapsed .sidebar-version,
html.atlas-sidebar-collapsed .sidebar-menu-search,
html.atlas-sidebar-collapsed .nav-link span,
html.atlas-sidebar-collapsed .nav-group-header span,
html.atlas-sidebar-collapsed .nav-group-arrow,
html.atlas-sidebar-collapsed .sidebar-user-info,
html.atlas-sidebar-collapsed .sidebar-user-chevron {
  display: none !important;
}
html.atlas-sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 8px;
  flex-shrink: 0;
}
html.atlas-sidebar-collapsed .sidebar-brand-icon {
  width: 32px;
  height: 32px;
}
html.atlas-sidebar-collapsed .nav-item,
html.atlas-sidebar-collapsed .nav-group {
  min-width: 0;
  width: 100%;
}
html.atlas-sidebar-collapsed .nav-link {
  justify-content: center;
  padding: 12px;
  min-width: 0;
  box-sizing: border-box;
}
html.atlas-sidebar-collapsed .nav-group-header {
  justify-content: center;
  padding: 12px;
  min-width: 0;
  box-sizing: border-box;
}
html.atlas-sidebar-collapsed .nav-group-header i:first-child {
  margin: 0;
}
/* Almenü: nincs behúzás, ugyanabban a vonalban az ikon; a csoportot halvány háttér jelzi */
html.atlas-sidebar-collapsed .nav-group-items .nav-link {
  justify-content: center;
  padding: 10px 12px;
  margin-left: 0;
  border-left: none;
}
/* Menücsoport összecsukott állapotban: halvány áttetsző háttér, nincs behúzás */
html.atlas-sidebar-collapsed .nav-group {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 6px;
  padding: 4px 0;
}
html.atlas-sidebar-collapsed .nav-group-items {
  padding-left: 0;
  padding-right: 0;
}
/* Könyvelés (és egyéb) belső almenü dobozok: ne lógjanak ki, nincs behúzás/border */
html.atlas-sidebar-collapsed .nav-group-items > div {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-left: none !important;
  min-width: 0;
  max-width: 100%;
}
html.atlas-sidebar-collapsed .nav-group-items > div > div:first-child {
  display: none;
}
html.atlas-sidebar-collapsed .nav-group .nav-group-header {
  padding: 10px 12px;
}
html.atlas-sidebar-collapsed .nav-group-items .nav-link:hover,
html.atlas-sidebar-collapsed .nav-group-items .nav-link.active {
  background: rgba(255, 255, 255, 0.08);
}
html.atlas-sidebar-collapsed .sidebar-user {
  justify-content: center;
  padding: 12px 8px;
  margin: 12px 6px;
  flex-shrink: 0;
}
html.atlas-sidebar-collapsed .sidebar-user-avatar {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.atlas-sidebar-modern::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: url("../img/sky_city.webp") center center/cover no-repeat;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.sidebar-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* Sidebar Header / Brand */
.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand-icon i {
  font-size: 18px;
  color: white;
}

.sidebar-brand-icon img.sidebar-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.sidebar-brand-text {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.sidebar-brand-text span {
  color: var(--atlas-accent);
}

.sidebar-version {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

/* Sidebar Navigation */
/* Menü kereső a sidebar tetején */
.sidebar-menu-search {
  padding: 0 12px 12px;
  flex-shrink: 0;
}
.menu-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.menu-search-wrap:focus-within {
  border-color: var(--atlas-primary-light, #4fc3dc);
  box-shadow: 0 0 0 2px rgba(77, 208, 225, 0.2);
}
.menu-search-icon {
  position: absolute;
  left: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  pointer-events: none;
}
.menu-search-input {
  width: 100%;
  padding: 8px 62px 8px 34px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}
.menu-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.menu-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-search-clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}
.menu-search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.menu-search-kbd kbd {
  font-size: 0.6rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  line-height: 1.5;
  white-space: nowrap;
}
/* Fókuszban elrejti a badge-et; input jobb padding visszaáll a clear-gombhoz */
.menu-search-wrap:focus-within .menu-search-input {
  padding-right: 32px;
}
/* Fókuszban elrejti a badge-et */
.menu-search-wrap:focus-within .menu-search-kbd {
  opacity: 0;
}
.menu-search-hint {
  padding: 4px 0 0;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.7rem;
}
/* Menü elemek elrejtése keresésnél – minél több a szöveg, annál szűkebb a találat */
.sidebar-nav a.nav-link.menu-hidden,
.sidebar-nav .nav-item.menu-hidden,
.sidebar-nav .nav-group.menu-hidden {
  display: none !important;
}
.sidebar-nav .nav-group.menu-hidden .nav-group-items {
  display: none !important;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: white;
}

.nav-link.active {
  background: var(--sidebar-active);
  color: white;
}

.nav-link i {
  font-size: 18px;
  width: 24px;
  text-align: center;
  opacity: 0.85;
}

.nav-link.active i,
.nav-link:hover i {
  opacity: 1;
}

.nav-section-title {
  padding: 20px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Sidebar User Card */
.sidebar-user {
  padding: 16px;
  margin: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 600;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 12px;
  color: var(--sidebar-text-muted);
}

.sidebar-user-chevron {
  color: var(--sidebar-text-muted);
  font-size: 14px;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */

.atlas-main-modern {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-main);
  position: relative;
  transition: background 0.3s ease;
}

/* Háttérkép a main content area-ra */
.atlas-main-modern::before {
  content: "";
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  bottom: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: var(--bg-opacity, 0.15);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
html.atlas-sidebar-collapsed .atlas-main-modern::before {
  left: 68px;
}
.atlas-content-modern {
  position: relative;
  /* z-index: auto – NEM hoz létre stacking context-et,
     így a Bootstrap modal-backdrop (z-index:1040) és modal (z-index:1050)
     a globális stacking context-ben helyezkednek el helyesen.
     Korábban z-index:1 itt bezárta a modálokat a saját context-jébe,
     emiatt a backdrop felülírta a dialog-ot. */
  z-index: auto;
}

/* Top Header */
.atlas-header-modern {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}
:root[data-theme="dark"] .atlas-header-modern {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-search {
  position: relative;
  width: 320px;
}

.header-search input {
  width: 100%;
  height: 40px;
  padding: 8px 16px 8px 44px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  background: var(--bg-main);
  font-size: 14px;
  transition: all 0.2s;
}

.header-search input:focus {
  border-color: var(--atlas-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(26, 156, 184, 0.1);
}
:root[data-theme="dark"] .header-search input:focus {
  box-shadow: 0 0 0 3px rgba(26, 156, 184, 0.2);
}

.header-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

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

.header-action-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.header-action-btn:hover {
  background: var(--bg-main);
  color: var(--atlas-primary);
}

.header-action-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--status-critical);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 8px;
  transition: background 0.3s ease;
}
:root[data-theme="dark"] .header-divider {
  background: rgba(255, 255, 255, 0.1);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s;
}

.header-user:hover {
  background: var(--bg-main);
}

.header-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.header-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Content Area */
.atlas-content-modern {
  flex: 1;
  padding: 24px;
}

/* ==========================================================================
   PAGE COMPONENTS
   ========================================================================== */

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.btn-primary-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(26, 156, 184, 0.3);
}

.btn-primary-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 156, 184, 0.4);
  color: white;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-tabs {
  display: flex;
  gap: 4px;
}

.filter-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.filter-tab:hover {
  background: var(--bg-main);
}

.filter-tab.active {
  background: var(--atlas-primary);
  color: white;
}

.filter-select {
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

.filter-search {
  flex: 1;
  max-width: 280px;
  position: relative;
}

.filter-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

/* Data Table */
.data-table-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-main);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table th.sortable {
  cursor: pointer;
}

.data-table th.sortable:hover {
  color: var(--atlas-primary);
}

.data-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}

.data-table tr:hover {
  background: rgba(26, 156, 184, 0.03);
}

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

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-new {
  background: rgba(56, 182, 210, 0.15);
  color: var(--status-new);
}

.badge-progress {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-progress);
}

.badge-critical {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-critical);
}

.badge-closed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-closed);
}

/* Priority Badges */
.badge-priority {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--priority-high);
}

.badge-medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--priority-medium);
}

.badge-low {
  background: rgba(16, 185, 129, 0.15);
  color: var(--priority-low);
}

/* Row Actions */
.row-actions {
  display: flex;
  gap: 4px;
}

.row-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.row-action-btn:hover {
  background: var(--bg-main);
  color: var(--atlas-primary);
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */

.card-modern {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header-modern {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title-modern {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body-modern {
  padding: 20px;
}

/* Activity List */
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.activity-item:last-child {
  border-bottom: none;
}

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

.activity-icon.email {
  background: rgba(56, 182, 210, 0.15);
  color: var(--atlas-primary);
}

.activity-icon.task {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-progress);
}

.activity-icon.incident {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-critical);
}

.activity-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Critical Items List */
.critical-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.critical-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.critical-item:last-child {
  border-bottom: none;
}

.critical-title {
  font-size: 14px;
  color: var(--text-primary);
  flex: 1;
}

.critical-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 16px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .atlas-sidebar-modern {
    width: 72px;
  }
  html.atlas-sidebar-collapsed .atlas-sidebar-modern {
    width: 68px;
  }
  
  .sidebar-brand-text,
  .nav-link span,
  .nav-section-title,
  .sidebar-user-info,
  .sidebar-user-chevron {
    display: none;
  }
  
  .sidebar-brand {
    justify-content: center;
    padding: 20px 12px;
  }
  
  .nav-link {
    justify-content: center;
    padding: 14px;
  }
  
  .nav-link i {
    font-size: 20px;
  }
  
  .sidebar-user {
    justify-content: center;
    padding: 12px;
    margin: 12px 8px;
  }
  
  .atlas-main-modern {
    margin-left: 72px;
  }
  html.atlas-sidebar-collapsed .atlas-main-modern {
    margin-left: 68px;
  }
}

@media (max-width: 768px) {
  .atlas-sidebar-modern {
    transform: translateX(-100%);
    width: 260px;
  }
  
  .atlas-sidebar-modern.open {
    transform: translateX(0);
  }
  
  .sidebar-brand-text,
  .nav-link span,
  .nav-section-title,
  .sidebar-user-info,
  .sidebar-user-chevron {
    display: block;
  }
  
  .atlas-main-modern {
    margin-left: 0;
  }
  
  .header-search {
    display: none;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .filter-bar {
    flex-wrap: wrap;
  }
}

/* ============================================
   DASHBOARD COMPONENTS
   ============================================ */

/* Urgent Actions Banner */
.urgent-actions-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 4px solid var(--status-critical);
  border-radius: var(--radius-md);
}

.urgent-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: pulse-urgent 2s infinite;
}

.urgent-icon i {
  font-size: 24px;
  color: white;
}

@keyframes pulse-urgent {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.urgent-content {
  flex: 1;
}

.urgent-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.urgent-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.urgent-stat {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.urgent-stat-danger {
  color: var(--status-critical);
}

.urgent-stat-warning {
  color: var(--status-progress);
}

.urgent-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.urgent-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  color: white;
}

/* Stat Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

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

.stat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon i {
  font-size: 28px;
  color: white;
}

.stat-card-primary .stat-card-icon {
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
}

.stat-card-success .stat-card-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card-warning .stat-card-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card-danger .stat-card-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card-content {
  flex: 1;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}

.stat-card-link:hover {
  background: var(--atlas-primary);
  color: white;
}

/* Incident List */
.incident-list {
  display: flex;
  flex-direction: column;
}

.incident-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.15s;
}

.incident-item:hover {
  background: rgba(26, 156, 184, 0.05);
}

.incident-item:last-child {
  border-bottom: none;
}

.incident-priority-indicator {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
}

.incident-priority-indicator.priority-critical {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.incident-priority-indicator.priority-high {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
}

.incident-priority-indicator.priority-medium {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.incident-priority-indicator.priority-low {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.incident-content {
  flex: 1;
  min-width: 0;
}

.incident-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.incident-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.incident-meta i {
  margin-right: 4px;
}

.incident-badges {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.incident-arrow {
  color: var(--text-muted);
  font-size: 16px;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.15s;
}

.task-item:hover {
  background: rgba(26, 156, 184, 0.05);
}

.task-item:last-child {
  border-bottom: none;
}

.task-checkbox {
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.task-meta i {
  margin-right: 4px;
}

.task-status {
  flex-shrink: 0;
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.quick-action-card:hover {
  transform: translateY(-3px);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-icon i {
  font-size: 22px;
  color: white;
}

.quick-action-text {
  font-size: 12px;
  font-weight: 500;
}

.quick-action-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
.quick-action-danger .quick-action-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.quick-action-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.quick-action-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
.quick-action-success .quick-action-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.quick-action-success:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.quick-action-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}
.quick-action-purple .quick-action-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.quick-action-purple:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.quick-action-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
.quick-action-warning .quick-action-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.quick-action-warning:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.quick-action-info {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}
.quick-action-info .quick-action-icon {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}
.quick-action-info:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #0891b2;
}

.quick-action-primary {
  background: rgba(26, 156, 184, 0.1);
  color: var(--atlas-primary-dark);
}
.quick-action-primary .quick-action-icon {
  background: linear-gradient(135deg, var(--atlas-primary) 0%, var(--atlas-accent) 100%);
}
.quick-action-primary:hover {
  background: rgba(26, 156, 184, 0.15);
  color: var(--atlas-primary-dark);
}

/* Badge Critical */
.badge-priority.badge-critical {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Responsive Quick Actions */
@media (max-width: 576px) {
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .urgent-actions-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .urgent-action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ATLAS TILES - Grid csempe elrendezés (Irattár, Dashboard, stb.)
   ========================================================================== */

.atlas-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.atlas-tile {
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(26, 156, 184, 0.15);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Hover és fókusz állapotok */
.atlas-tile:hover,
.atlas-tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.atlas-tile:focus-visible {
  outline: 2px solid var(--atlas-primary, #1a9cb8);
  outline-offset: 2px;
}

/* Interaktív csempék */
.atlas-tile[onclick],
.atlas-tile[role="button"],
.atlas-tile[tabindex]:not([tabindex="-1"]),
.atlas-tile.is-interactive,
a.atlas-tile,
button.atlas-tile {
  cursor: pointer;
}

/* Mozgáscsökkentés preferencia */
@media (prefers-reduced-motion: reduce) {
  .atlas-tile {
    transition: none;
  }
  .atlas-tile:hover,
  .atlas-tile:focus-visible {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
}

.atlas-tile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.atlas-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md, 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.atlas-tile-icon.primary {
  background: linear-gradient(135deg, rgba(26, 156, 184, 0.2), rgba(56, 182, 210, 0.15));
  color: var(--atlas-primary, #1a9cb8);
}

.atlas-tile-icon.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
  color: #b91c1c;
}

.atlas-tile-icon.info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  color: #1d4ed8;
}

.atlas-tile-icon.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
  color: #047857;
}

.atlas-tile-icon.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
  color: #b45309;
}

.atlas-tile-icon.secondary {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.18), rgba(71, 85, 105, 0.12));
  color: #334155;
}

.atlas-tile-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary, #1a2b3c);
  line-height: 1.3;
  word-break: break-word;
}

.atlas-tile-body {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-secondary, #5a6b7c);
  margin-bottom: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.atlas-tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(26, 156, 184, 0.1);
}

.atlas-tile-stat {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--atlas-primary, #1a9cb8);
}

.atlas-tile-label {
  font-size: 0.75rem;
  color: var(--text-muted, #8a9bac);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive - táblagép */
@media (max-width: 768px) {
  .atlas-tiles {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
}

/* Responsive - mobil */
@media (max-width: 480px) {
  .atlas-tiles {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SIDEBAR - Összecsukható menü csoportok
   ========================================================================== */

/* Nav Group - összecsukható csoport */
.nav-group {
  margin-bottom: 0.25rem;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

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

.nav-group-header i:first-child {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.nav-group-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: rgba(255, 255, 255, 0.5);
}

/* Csukott állapot - almenü rejtve */
.nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  padding-left: 1rem;
}

/* Nyitott állapot */
.nav-group.open .nav-group-items {
  max-height: none;
  overflow: visible;
  transition: max-height 0.3s ease-in;
}

.nav-group.open .nav-group-arrow {
  transform: rotate(180deg);
}

.nav-group.open .nav-group-header {
  color: #4dd0e1;
}

/* Almenü linkek */
.nav-group-items .nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8125rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-group-items .nav-link i {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.nav-group-items .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-group-items .nav-link:hover i {
  color: rgba(255, 255, 255, 0.9);
}

.nav-group-items .nav-link.active {
  background: rgba(77, 208, 225, 0.2);
  color: #4dd0e1;
  font-weight: 500;
}

.nav-group-items .nav-link.active i {
  color: #4dd0e1;
}

/* Kiemelt navigációs link (Mit csináljak ma?) */
.nav-link-highlight {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%) !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}

.nav-link-highlight i {
  color: #a78bfa !important;
}

.nav-link-highlight:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.35) 0%, rgba(118, 75, 162, 0.35) 100%) !important;
}

/* Bootstrap nav-tabs fix: ne legyen fehér színű a tab linkek szövege */
.nav-tabs .nav-link {
  color: #495057 !important;
}

.nav-tabs .nav-link:hover {
  color: #495057 !important;
  border-color: #dee2e6 #dee2e6 #fff;
}

.nav-tabs .nav-link.active {
  color: #495057 !important;
  background-color: #fff !important;
  border-color: #dee2e6 #dee2e6 #fff;
}

/* Jogcím typeahead: gépelésre szűkített legördülő */
.fee-code-typeahead-wrap .fee-code-typeahead-dropdown {
  border-radius: 0.25rem;
  border: 1px solid rgba(0,0,0,.1);
}
.fee-code-typeahead-wrap .fee-code-typeahead-dropdown .list-group-item {
  white-space: nowrap;
  cursor: pointer;
}
.fee-code-typeahead-wrap .fee-code-typeahead-dropdown .list-group-item.active {
  background-color: var(--atlas-primary-light, #4fc3dc);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   SÖTÉT MÓD STÍLUSOK - Kártyák, táblázatok, gombok, formok
   ========================================================================== */
:root[data-theme="dark"] .atlas-card,
:root[data-theme="dark"] .card {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

:root[data-theme="dark"] .table {
  color: var(--text-primary);
}
:root[data-theme="dark"] .table-dark {
  background: #1e293b;
  color: #f1f5f9;
}
:root[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}
:root[data-theme="dark"] .table-hover > tbody > tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .btn-primary {
  background: var(--atlas-primary);
  border-color: var(--atlas-primary);
}
:root[data-theme="dark"] .btn-primary:hover {
  background: var(--atlas-primary-dark);
  border-color: var(--atlas-primary-dark);
}

:root[data-theme="dark"] .alert {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
:root[data-theme="dark"] .form-control:focus,
:root[data-theme="dark"] .form-select:focus {
  background: var(--bg-card);
  border-color: var(--atlas-primary);
  color: var(--text-primary);
}

:root[data-theme="dark"] .dropdown-menu {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.1);
}
:root[data-theme="dark"] .dropdown-item {
  color: var(--text-primary);
}
:root[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

:root[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

/* bg-light / bg-white sötét témában – olvasható sötét szöveg */
:root[data-theme="dark"] .bg-light,
:root[data-theme="dark"] .bg-white {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-primary) !important;
}
:root[data-theme="dark"] .bg-light .form-label,
:root[data-theme="dark"] .bg-light label,
:root[data-theme="dark"] .bg-light .form-text,
:root[data-theme="dark"] .bg-light h5,
:root[data-theme="dark"] .bg-light h6,
:root[data-theme="dark"] .bg-light p,
:root[data-theme="dark"] .bg-light span,
:root[data-theme="dark"] .bg-light .form-check-label {
  color: var(--text-primary) !important;
}

/* form-label / form-text globális láthatóság – minden témában */
.form-label {
  color: var(--text-primary, #212529);
}
.form-text {
  color: var(--text-muted, #6c757d);
}
.form-check-label {
  color: var(--text-primary, #212529);
}

/* ==========================================================================
   EGYEDI SCROLLBAR STÍLUS
   ========================================================================== */

/* ── Sidebar scrollbar (sötét háttéren) ─────────────────────────────────── */
.sidebar-content::-webkit-scrollbar {
  width: 5px;
}
.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(56, 182, 210, 0.35);
  border-radius: 10px;
}
.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 182, 210, 0.65);
}
/* Firefox */
.sidebar-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 182, 210, 0.35) transparent;
}

/* ── Főoldal scrollbar (light / dark) ───────────────────────────────────── */
html,
body,
.atlas-main-modern,
.atlas-content-modern {
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 156, 184, 0.35) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.atlas-main-modern::-webkit-scrollbar,
.atlas-content-modern::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.atlas-main-modern::-webkit-scrollbar-track,
.atlas-content-modern::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.atlas-main-modern::-webkit-scrollbar-thumb,
.atlas-content-modern::-webkit-scrollbar-thumb {
  background: rgba(26, 156, 184, 0.35);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.atlas-main-modern::-webkit-scrollbar-thumb:hover,
.atlas-content-modern::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 156, 184, 0.65);
  background-clip: padding-box;
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner {
  background: transparent;
}

/* Dark mode */
:root[data-theme="dark"] html,
:root[data-theme="dark"] body,
:root[data-theme="dark"] .atlas-main-modern,
:root[data-theme="dark"] .atlas-content-modern {
  scrollbar-color: rgba(56, 182, 210, 0.3) transparent;
}
:root[data-theme="dark"] html::-webkit-scrollbar-thumb,
:root[data-theme="dark"] body::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .atlas-main-modern::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .atlas-content-modern::-webkit-scrollbar-thumb {
  background: rgba(56, 182, 210, 0.3);
  background-clip: padding-box;
}
:root[data-theme="dark"] html::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] body::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .atlas-main-modern::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .atlas-content-modern::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 182, 210, 0.6);
  background-clip: padding-box;
}

/* ── Táblázatok és modal-ok belső scrollja ──────────────────────────────── */
.table-responsive::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.card-body::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.table-responsive::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.card-body::-webkit-scrollbar-track {
  background: transparent;
}
.table-responsive::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.card-body::-webkit-scrollbar-thumb {
  background: rgba(26, 156, 184, 0.25);
  border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.card-body::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 156, 184, 0.5);
}
.table-responsive,
.modal-body,
.card-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 156, 184, 0.25) transparent;
}
