/* ============================================
   SÁRSZENTMIKLÓSI ÁLTALÁNOS ISKOLA - ADMIN
   Teljes admin dizájn rendszer
   ============================================ */

/* ---------- CSS VÁLTOZÓK ---------- */
:root {
    /* Szín paletta - ugyanaz mint a publikus oldal */
    --primary-50:  #EEF4FB;
    --primary-100: #D6E4F5;
    --primary-200: #AEC9EB;
    --primary-300: #7FA8DD;
    --primary-400: #4F82C8;
    --primary-500: #2E63AE;
    --primary-600: #1E4E9C;
    --primary-700: #173D7A;
    --primary-800: #112D5A;
    --primary-900: #0B1E3D;

    --accent-50:  #FFF5EB;
    --accent-100: #FFE6CC;
    --accent-200: #FECB99;
    --accent-300: #FDB066;
    --accent-400: #FB9533;
    --accent-500: #F97316;
    --accent-600: #E05E00;
    --accent-700: #B84A00;

    --purple-500: #7C3AED;
    --purple-600: #6D28D9;

    /* Semleges színek */
    --gray-50:  #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Státusz színek */
    --success-50:  #ECFDF5;
    --success-500: #10B981;
    --success-600: #059669;
    --warning-50:  #FFFBEB;
    --warning-500: #F59E0B;
    --warning-600: #D97706;
    --danger-50:   #FEF2F2;
    --danger-500:  #EF4444;
    --danger-600:  #DC2626;
    --info-50:     #EFF6FF;
    --info-500:    #3B82F6;

    /* Felület */
    --bg-body:     #F3F5F9;
    --bg-card:     #FFFFFF;
    --bg-sidebar:  #112D5A;
    --bg-sidebar-hover: #173D7A;
    --bg-header:   #FFFFFF;

    /* Szöveg */
    --text-primary:   #111827;
    --text-secondary: #4B5563;
    --text-muted:     #6B7280;
    --text-sidebar:   #CBD5E1;
    --text-sidebar-active: #FFFFFF;

    /* Border */
    --border-color: #E5E7EB;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;

    /* Árnyékok */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow:    0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Layout méretek */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;

    /* Animáció */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Font */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- SÖTÉT MÓD ---------- */
[data-theme="dark"] {
    --bg-body:     #0F172A;
    --bg-card:     #1E293B;
    --bg-sidebar:  #0B1220;
    --bg-sidebar-hover: #1E293B;
    --bg-header:   #1E293B;

    --text-primary:   #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted:     #94A3B8;
    --text-sidebar:   #94A3B8;

    --border-color: #334155;

    /* ⚠️ ÚJ: Primary világosítások sötét módban
       (a --primary-50-t és társait felülírjuk,
       hogy a kiválasztott elemek háttere sötét maradjon) */
    --primary-50:  #1E3A5F;   /* sötétkék háttér */
    --primary-100: #234873;   /* hover/focus ring */
    --primary-200: #2E5A8A;
    --primary-300: #4A7BB0;
    --primary-400: #6B9BD1;
    --primary-500: #8BB4E3;   /* kiemelés világos szöveggel */
    --primary-600: #A8C8E8;
    --primary-700: #C5DAF0;

    /* ⚠️ ÚJ: Accent világosítások sötét módban */
    --accent-50:  #4A2A10;
    --accent-100: #5C3515;
    --accent-200: #7A4A20;
    --accent-300: #9E6028;
    --accent-400: #C77D30;
    --accent-500: #F97316;    /* marad élénk narancs */
    --accent-600: #FB9533;
    --accent-700: #FDB066;

    /* ⚠️ ÚJ: Purple világosítások sötét módban */
    --purple-500: #A78BFA;
    --purple-600: #C4B5FD;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow:    0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

    --success-50:  #064E3B;
    --warning-50:  #78350F;
    --danger-50:   #7F1D1D;
    --info-50:     #1E3A8A;

    --gray-50:  #1E293B;
    --gray-100: #334155;
    --gray-200: #475569;
}

/* ---------- RESET ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ---------- LAYOUT ---------- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow), width var(--transition-slow);
    overflow: hidden;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

.admin-content {
    flex: 1;
    padding: 24px;
    max-width: 100%;
}

/* Oldalsáv összecsukva */
.admin-wrapper.sidebar-collapsed .admin-sidebar {
    width: var(--sidebar-collapsed);
}

.admin-wrapper.sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-collapsed);
}

.admin-wrapper.sidebar-collapsed .sidebar-label,
.admin-wrapper.sidebar-collapsed .sidebar-section-title,
.admin-wrapper.sidebar-collapsed .sidebar-brand-text {
    opacity: 0;
    pointer-events: none;
}

/* ---------- SIDEBAR ---------- */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: var(--header-height);
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.sidebar-brand-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        #EF4444 0%, #EF4444 16%,
        #F97316 16%, #F97316 33%,
        #FACC15 33%, #FACC15 50%,
        #10B981 50%, #10B981 66%,
        #3B82F6 66%, #3B82F6 83%,
        #8B5CF6 83%, #8B5CF6 100%);
    opacity: 0.25;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    transition: opacity var(--transition);
}

.sidebar-brand-title {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
}

.sidebar-brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-sidebar);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.sidebar-section {
    margin-bottom: 12px;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    padding: 8px 16px 4px;
    transition: opacity var(--transition);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-sidebar);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    margin-bottom: 2px;
}

.sidebar-link svg,
.sidebar-link .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 78, 156, 0.4);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent-500);
    border-radius: 0 4px 4px 0;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--accent-500);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--border-radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-label {
    transition: opacity var(--transition);
    flex: 1;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
    transition: opacity var(--transition);
}

.sidebar-user-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--text-sidebar);
}

/* ---------- HEADER ---------- */
.admin-header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background-color var(--transition), border-color var(--transition);
}

.header-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.header-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
}

.header-breadcrumb a {
    color: var(--text-muted);
}

.header-breadcrumb a:hover {
    color: var(--primary-600);
}

.header-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search {
    position: relative;
    max-width: 320px;
    flex: 1;
}

.header-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border-radius: var(--border-radius-full);
    border: 1px solid var(--border-color);
    background: var(--gray-50);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-100);
}

[data-theme="dark"] .header-search input:focus {
    box-shadow: 0 0 0 3px rgba(30, 78, 156, 0.3);
}

.header-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
}

.header-btn:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

[data-theme="dark"] .header-btn:hover {
    background: var(--gray-100);
}

.header-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger-500);
    border-radius: 50%;
    border: 2px solid var(--bg-header);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--border-radius-full);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.header-user:hover {
    background: var(--gray-100);
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.header-user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition-fast);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.dropdown-item.danger:hover {
    background: var(--danger-50);
    color: var(--danger-600);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* ---------- KÁRTYÁK ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--gray-50);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ---------- STATISZTIKA KÁRTYÁK ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-600), var(--purple-600));
}

.stat-card.accent::before {
    background: linear-gradient(90deg, var(--accent-500), var(--accent-600));
}

.stat-card.success::before {
    background: linear-gradient(90deg, var(--success-500), var(--success-600));
}

.stat-card.warning::before {
    background: linear-gradient(90deg, var(--warning-500), var(--warning-600));
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--primary-50);
    color: var(--primary-600);
}

.stat-card.accent .stat-icon {
    background: var(--accent-50);
    color: var(--accent-600);
}

.stat-card.success .stat-icon {
    background: var(--success-50);
    color: var(--success-600);
}

.stat-card.warning .stat-icon {
    background: var(--warning-50);
    color: var(--warning-600);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.stat-change.up { color: var(--success-600); }
.stat-change.down { color: var(--danger-600); }

/* ---------- TÁBLÁZATOK ---------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead {
    background: var(--gray-50);
}

.table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    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-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.table-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--gray-100);
}

/* ---------- GOMBOK ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 78, 156, 0.3);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 78, 156, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: #fff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger-500);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-600);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- FORMOK ---------- */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger-500);
    margin-left: 2px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(30, 78, 156, 0.3);
}

.form-control::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-600);
    cursor: pointer;
}

/* Fájl feltöltés */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: var(--gray-50);
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.file-upload-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-600);
    margin: 0 auto 8px;
}

.file-upload-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- BADGE-EK ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--border-radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-50); color: var(--primary-700); }
.badge-success { background: var(--success-50); color: var(--success-600); }
.badge-warning { background: var(--warning-50); color: var(--warning-600); }
.badge-danger  { background: var(--danger-50);  color: var(--danger-600); }
.badge-info    { background: var(--info-50);    color: var(--info-500); }
.badge-gray    { background: var(--gray-100);   color: var(--gray-600); }

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---------- ALERT-EK ---------- */
.alert {
    padding: 14px 16px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-success {
    background: var(--success-50);
    color: var(--success-600);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: var(--warning-50);
    color: var(--warning-600);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-danger {
    background: var(--danger-50);
    color: var(--danger-600);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: var(--info-50);
    color: var(--info-500);
    border-color: rgba(59, 130, 246, 0.2);
}

/* ---------- OLDAL FEJLÉC ---------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- ÜRES ÁLLAPOT ---------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--gray-300);
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 0.875rem;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* ---------- TOAST ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 40px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--primary-600);
}

.toast.success { border-left-color: var(--success-500); }
.toast.warning { border-left-color: var(--warning-500); }
.toast.error   { border-left-color: var(--danger-500); }

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success-500); }
.toast.warning .toast-icon { color: var(--warning-500); }
.toast.error   .toast-icon { color: var(--danger-500); }
.toast.info    .toast-icon { color: var(--primary-600); }

.toast-content {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.toast-close {
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.toast.hide {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 440px;
    width: 100%;
    transform: scale(0.95);
    transition: transform var(--transition);
    overflow: hidden;
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--danger-50);
    color: var(--danger-500);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modal-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-footer {
    padding: 20px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ---------- LOGIN OLDAL ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 50%, var(--purple-600) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3), transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(30px, -30px); }
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: loginCardIn 0.5s ease;
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-weight: 800;
    font-size: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 78, 156, 0.4);
}

.login-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        #EF4444 0%, #EF4444 16%,
        #F97316 16%, #F97316 33%,
        #FACC15 33%, #FACC15 50%,
        #10B981 50%, #10B981 66%,
        #3B82F6 66%, #3B82F6 83%,
        #8B5CF6 83%, #8B5CF6 100%);
    opacity: 0.3;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .form-control {
    padding: 12px 14px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary-600);
    font-weight: 600;
}

.password-toggle {
    position: relative;
}

.password-toggle .toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color var(--transition-fast);
}

.password-toggle .toggle-btn:hover {
    color: var(--primary-600);
}

.password-toggle .form-control {
    padding-right: 44px;
}

/* ---------- SEGÉD OSZTÁLYOK ---------- */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-none { display: none; }

/* ---------- RESZPONZÍV ---------- */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-wrapper.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-wrapper.sidebar-collapsed .admin-main {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .admin-wrapper.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 16px;
    }

    .header-search {
        display: none;
    }

    .header-user-name {
        display: none;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 28px 20px;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table th,
    .table td {
        padding: 10px 12px;
    }
}

/* ---------- NYOMTATÁS ---------- */
@media print {
    .admin-sidebar,
    .admin-header,
    .page-actions,
    .table-actions {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* ============================================
   BIZTONSÁGI MENTÉS
   ============================================ */
.backup-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.backup-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.backup-info-card:hover {
    transform: none;
}

.backup-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.backup-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.backup-info-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.backup-file-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-theme="dark"] .backup-file-icon {
    background: var(--gray-100);
}

@media (max-width: 640px) {
    .backup-info-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   ADMIN SIDEBAR – BEM KOMPATIBILITÁS
   (a admin-sidebar.php által használt osztályok)
   ============================================ */

/* Fő sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow);
    overflow: hidden;
}

/* Brand (logó + cím) */
.admin-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: var(--header-height);
    gap: 10px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    min-width: 0;
    flex: 1;
}

.admin-brand:hover {
    color: #fff;
}

.admin-brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.admin-brand__logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        #EF4444 0%, #EF4444 16%,
        #F97316 16%, #F97316 33%,
        #FACC15 33%, #FACC15 50%,
        #10B981 50%, #10B981 66%,
        #3B82F6 66%, #3B82F6 83%,
        #8B5CF6 83%, #8B5CF6 100%);
    opacity: 0.3;
}

.admin-brand__logo svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

.admin-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.admin-brand__text strong {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
}

.admin-brand__text small {
    font-size: 0.7rem;
    color: var(--text-sidebar);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar__close {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.admin-sidebar__close svg {
    width: 18px;
    height: 18px;
}

.admin-sidebar__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Navigáció */
.admin-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.admin-nav::-webkit-scrollbar {
    width: 6px;
}

.admin-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.admin-nav__group {
    margin-bottom: 12px;
}

.admin-nav__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    padding: 8px 16px 4px;
}

.admin-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-sidebar);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    margin-bottom: 2px;
}

.admin-nav__link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.admin-nav__link.is-active {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 78, 156, 0.4);
}

.admin-nav__link.is-active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent-500);
    border-radius: 0 4px 4px 0;
}

.admin-nav__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-nav__badge {
    margin-left: auto;
    background: var(--accent-500);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar footer (user) */
.admin-sidebar__footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.admin-user__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.admin-user__info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.admin-user__info strong {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user__info small {
    font-size: 0.7rem;
    color: var(--text-sidebar);
}

.admin-sidebar__actions {
    display: flex;
    gap: 4px;
}

.admin-sidebar__action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sidebar);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.admin-sidebar__action svg {
    width: 16px;
    height: 16px;
}

.admin-sidebar__action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar__action--danger:hover {
    background: var(--danger-500);
    color: #fff;
}

/* Sidebar overlay mobilon */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    cursor: pointer;
}

/* Mobil */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.is-open {
        transform: translateX(0);
    }
    .admin-sidebar__close {
        display: flex;
    }
    .sidebar-overlay.is-open {
        opacity: 1;
        visibility: visible;
        display: block;
    }
    .admin-main {
        margin-left: 0;
    }
}
/* ============================================================
   ADMIN MODAL (törlés megerősítő) – TELJES
   ============================================================ */

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.admin-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.admin-modal {
    background: var(--bg-card, #fff);
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--border-color, #e2e8f0);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-modal-overlay.is-open .admin-modal {
    transform: scale(1) translateY(0);
}

.admin-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100, #f3f4f6);
    color: var(--text-muted, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.admin-modal__close:hover {
    background: var(--gray-200, #e5e7eb);
    color: var(--text-primary, #111827);
    transform: rotate(90deg);
}

.admin-modal__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.admin-modal__icon--danger {
    background: var(--danger-50, #fef2f2);
    color: var(--danger-500, #ef4444);
}

.admin-modal__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary, #111827);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.admin-modal__text {
    font-size: 0.9rem;
    color: var(--text-secondary, #4b5563);
    margin: 0 0 14px;
    line-height: 1.5;
}

.admin-modal__target {
    display: inline-block;
    background: var(--gray-50, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 10px 16px;
    margin: 0 0 18px;
    max-width: 100%;
    word-break: break-word;
}

.admin-modal__target span {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary, #111827);
}

.admin-modal__warning {
    background: var(--warning-50, #fffbeb);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.83rem;
    color: var(--warning-600, #d97706);
    text-align: left;
    margin: 0 0 22px;
    line-height: 1.5;
}

.admin-modal__warning strong {
    font-weight: 700;
}

.admin-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-modal__actions .btn {
    min-width: 120px;
}

@media (max-width: 480px) {
    .admin-modal {
        padding: 26px 20px 20px;
        border-radius: 16px;
    }
    .admin-modal__icon {
        width: 56px;
        height: 56px;
    }
    .admin-modal__icon svg {
        width: 26px;
        height: 26px;
    }
    .admin-modal__title {
        font-size: 1.1rem;
    }
    .admin-modal__actions {
        flex-direction: column-reverse;
    }
    .admin-modal__actions .btn {
        width: 100%;
    }
}

[data-theme="dark"] .admin-modal__close {
    background: var(--gray-100, #334155);
    color: var(--text-muted, #94a3b8);
}

[data-theme="dark"] .admin-modal__close:hover {
    background: var(--gray-200, #475569);
    color: #fff;
}

[data-theme="dark"] .admin-modal__target {
    background: var(--gray-50, #1e293b);
}

[data-theme="dark"] .admin-modal__warning {
    background: rgba(120, 53, 15, 0.4);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}
/* ============================================================
   ██  ADMIN TOGGLE SWITCH (logósáv be/ki)  ██
   ============================================================ */

.admin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition);
    position: relative;
}

.admin-toggle:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
}

.admin-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.admin-toggle__slider {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    background: var(--gray-300);
    border-radius: 999px;
    transition: background var(--transition);
}

.admin-toggle__slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition);
}

.admin-toggle input[type="checkbox"]:checked + .admin-toggle__slider {
    background: var(--success-500);
}

.admin-toggle input[type="checkbox"]:checked + .admin-toggle__slider::after {
    transform: translateX(20px);
}

.admin-toggle input[type="checkbox"]:focus-visible + .admin-toggle__slider {
    box-shadow: 0 0 0 3px var(--primary-100);
}

.admin-toggle__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.admin-toggle__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-toggle__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Állapotjelző pötty */
.admin-toggle__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    transition: color var(--transition);
}

.admin-toggle__status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    transition: background var(--transition);
}

.admin-toggle.is-on .admin-toggle__status {
    color: var(--success-600);
}
.admin-toggle.is-on .admin-toggle__status::before {
    background: var(--success-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

/* Mentés közben */
.admin-toggle.is-saving {
    opacity: 0.7;
    pointer-events: none;
}

/* Visszajelzés */
.admin-toggle__feedback {
    position: absolute;
    top: 50%;
    right: -36px;
    transform: translateY(-50%) scale(0.6);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
}

.admin-toggle__feedback svg {
    width: 14px;
    height: 14px;
}

.admin-toggle.feedback-ok .admin-toggle__feedback {
    background: var(--success-500);
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.admin-toggle.feedback-err .admin-toggle__feedback {
    background: var(--danger-500);
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

@media (max-width: 640px) {
    .admin-toggle__feedback {
        right: 8px;
        top: -8px;
        transform: translateY(0) scale(0.6);
    }
    .admin-toggle.feedback-ok .admin-toggle__feedback,
    .admin-toggle.feedback-err .admin-toggle__feedback {
        transform: translateY(0) scale(1);
    }
    .admin-toggle__status {
        display: none;
    }
}
/* ============================================================
   CONFIRM MODAL
   Sárszentmiklósi Általános Iskola
   ============================================================ */

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.confirm-modal.is-open {
    opacity: 1;
    visibility: visible;
}

/* Háttér */
.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

:root[data-theme="dark"] .confirm-modal__backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* Dialógus */
.confirm-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    padding: 32px 28px 24px;
    box-shadow:
        0 20px 50px -12px rgba(15, 23, 42, 0.35),
        0 8px 20px -8px rgba(15, 23, 42, 0.15);
    border: 1px solid var(--border-color, #e2e8f0);
    text-align: center;
    transform: scale(0.92) translateY(12px);
    transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal.is-open .confirm-modal__dialog {
    transform: scale(1) translateY(0);
}

:root[data-theme="dark"] .confirm-modal__dialog {
    background: #1e293b;
    border-color: #334155;
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.6),
        0 8px 20px -8px rgba(0, 0, 0, 0.4);
}

/* Ikon */
.confirm-modal__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #EEF4FF;
    color: #1E4E9C;
    transition: all 220ms ease;
}

.confirm-modal__icon-svg {
    width: 32px;
    height: 32px;
}

/* Variánsok */
.confirm-modal__icon--danger {
    background: #FEE2E2;
    color: #DC2626;
}

.confirm-modal__icon--warning {
    background: #FEF3C7;
    color: #D97706;
}

.confirm-modal__icon--primary {
    background: #DBEAFE;
    color: #2563EB;
}

:root[data-theme="dark"] .confirm-modal__icon {
    background: rgba(30, 78, 156, 0.25);
    color: #93C5FD;
}

:root[data-theme="dark"] .confirm-modal__icon--danger {
    background: rgba(220, 38, 38, 0.2);
    color: #FCA5A5;
}

:root[data-theme="dark"] .confirm-modal__icon--warning {
    background: rgba(217, 119, 6, 0.2);
    color: #FCD34D;
}

:root[data-theme="dark"] .confirm-modal__icon--primary {
    background: rgba(37, 99, 235, 0.2);
    color: #93C5FD;
}

/* Cím */
.confirm-modal__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

/* Üzenet */
.confirm-modal__message {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary, #475569);
    margin: 0 0 28px;
}

/* Gombok */
.confirm-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-modal__btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 10px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 160ms ease;
    white-space: nowrap;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.confirm-modal__btn:focus-visible {
    outline: 2px solid var(--primary-500, #2a6bd1);
    outline-offset: 2px;
}

/* Mégse gomb */
.confirm-modal__btn--cancel {
    background: transparent;
    color: var(--text-secondary, #64748b);
    border-color: var(--border-color, #e2e8f0);
}

.confirm-modal__btn--cancel:hover {
    background: var(--bg-subtle, #f8fafc);
    color: var(--text-primary, #0f172a);
    border-color: var(--border-strong, #cbd5e1);
}

:root[data-theme="dark"] .confirm-modal__btn--cancel {
    color: #cbd5e1;
    border-color: #334155;
}

:root[data-theme="dark"] .confirm-modal__btn--cancel:hover {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #475569;
}

/* Megerősítő gomb - variánsok */
.confirm-modal__btn--danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.confirm-modal__btn--danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

.confirm-modal__btn--warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.confirm-modal__btn--warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.confirm-modal__btn--primary {
    background: linear-gradient(135deg, #1E4E9C 0%, #173d7a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 78, 156, 0.3);
}

.confirm-modal__btn--primary:hover {
    background: linear-gradient(135deg, #173d7a 0%, #122d5c 100%);
    box-shadow: 0 6px 20px rgba(30, 78, 156, 0.4);
    transform: translateY(-1px);
}

/* Body scroll letiltás */
body.confirm-modal-open {
    overflow: hidden;
}

/* Mobilon */
@media (max-width: 480px) {
    .confirm-modal__dialog {
        padding: 24px 20px 20px;
        border-radius: 14px;
    }

    .confirm-modal__icon {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .confirm-modal__icon-svg {
        width: 28px;
        height: 28px;
    }

    .confirm-modal__title {
        font-size: 18px;
    }

    .confirm-modal__message {
        font-size: 13.5px;
        margin-bottom: 22px;
    }

    .confirm-modal__btn {
        padding: 11px 16px;
        font-size: 13.5px;
    }
}

/* Csökkentett mozgás */
@media (prefers-reduced-motion: reduce) {
    .confirm-modal,
    .confirm-modal__dialog {
        transition: none;
    }
}
/* ============================================================
   ██  ISKOLAKERT – admin kiegészítés  ██
   Az admin/iskolakert.php oldalhoz.
   A többi admin stílust az admin.css alapból adja.
   ============================================================ */

/* Kategória-badge az iskolakert listákban */
.admin-iskolakert-kat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Kis kategória ikon-kör a listákban */
.admin-iskolakert-kat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Zöld kiemelés a statisztikáknál – az iskolakert sajátja */
.stat-card--iskolakert::before {
    background: linear-gradient(90deg, #10B981, #047857);
}

.stat-card--iskolakert .stat-icon {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: #047857;
}

[data-theme="dark"] .stat-card--iskolakert .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
}

/* Info kártya zöld kiemelése */
.admin-info-green {
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
    border-left: 4px solid #10B981;
}

[data-theme="dark"] .admin-info-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.admin-info-green .icon-wrap {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

[data-theme="dark"] .admin-info-green .icon-wrap {
    color: #6EE7B7;
}

/* Az iskolakert menüpont ikonja (sidebar) */
.admin-nav__link.is-iskolakert.is-active {
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.admin-nav__link.is-iskolakert.is-active::before {
    background: #FDE047;
}