/* =========================================================
FUTURISZTIKUS SÖTÉT MÓD - PRO DESIGN SPECIFIKÁCIÓ
========================================================= */
:root {
    /* Háttér és Alapok */
    --bg-app: #0f172a; /* Nagyon sötét kékes-szürke */
    --bg-card: rgba(30, 41, 59, 0.6); /* Félig átlátszó sötét */
    --bg-sidebar: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(0, 0, 0, 0.95) 100%);
    --bg-input: rgba(30, 41, 59, 0.5);
    
    /* Neon Akcentusok */
    --primary-indigo: #6366f1;
    --primary-indigo-hover: #818cf8;
    --primary-indigo-light: rgba(99, 102, 241, 0.15);
    --accent-cyan: #06b6d4; /* Futurisztikus cián */
    
    /* Státusz Színek (Neon verziók) */
    --status-green: #10b981;
    --status-green-light: rgba(16, 185, 129, 0.1);
    --status-amber: #f59e0b;
    --status-red: #ef4444;
    --status-red-light: rgba(239, 68, 68, 0.1);
    --status-red-border: rgba(239, 68, 68, 0.3);
    
    /* Szöveg Színek */
    --text-main: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    /* Keretek és Árnyékok */
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-modal: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
    --shadow-neon: 0 0 15px rgba(99, 102, 241, 0.3); /* Neon glow */
    --shadow-button: 0 4px 15px rgba(99, 102, 241, 0.4);
    
    /* Betűtípus és Kerekítés */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius-card: 9px;
    --border-radius-stat: 8px;
    --border-radius-input: 6px;
    --border-radius-pill: 9999px;
    --border-radius-modal: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    /* Finom háttér gradiens effektus */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 25%), 
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
}

/* Fő Alkalmazás Elrendezés */
#app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Oldalsó Navigáció - Glassmorphism */
#sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 20;
}

.brand-section {
    padding: 19px 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 4px solid rgb(0 0 0);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--status-green), #059669);
    color: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.brand-icon::before {
    content: "";
    width: 24px;
    height: 24px;
    /* Az SVG kód beágyazva a CSS-be, fehér színnel (%23ffffff) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2'/%3E%3Cpath d='M12 2v4'/%3E%3Cpath d='M12 5H7a2 2 0 0 0-2 2v4'/%3E%3Cpath d='M12 5h5a2 2 0 0 1 2 2v4'/%3E%3Ccircle cx='9' cy='15' r='1'/%3E%3Ccircle cx='15' cy='15' r='1'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}


.brand-text h1 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.brand-text p {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    padding: 16px 12px;
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

.nav-group-title {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    font-weight: 700;
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-indigo);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item .nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item .nav-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-weight: 600;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Workspace Állapot Sáv */
.workspace-status-box {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.5);
}

.workspace-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-body);
    margin-bottom: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-green);
    box-shadow: 0 0 8px var(--status-green);
}

.status-dot.inactive {
    background: var(--status-amber);
    box-shadow: 0 0 8px var(--status-amber);
}

.btn-workspace-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-body);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-workspace-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
    color: var(--text-main);
}

/* Fő Tartalom Terület */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
}

.top-bar-hub {
    padding: 18px 36px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.hub-title-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-title-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--status-green), #059669);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

.hub-title-text h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff; /* Fehér kezdőszín */
    letter-spacing: -0.01em;
    
    /* Animáció hozzáadása: 3 másodperces időtartam, végtelenített ismétlés, oda-vissza lejátszás */
    animation: neonPulse 3s ease-in-out infinite alternate;
}

/* Az animáció lépései */
@keyframes neonPulse {
    0% {
        color: #ffffff;
        text-shadow: none;
    }
    100% {
        color: #00f3ff; /* Neon kék alapszín */
        /* Rétegzett árnyékok a neon ragyogás eléréséhez */
        text-shadow: 
            0 0 5px #00f3ff,
            0 0 10px #00f3ff,
            0 0 20px #00f3ff,
            0 0 40px #00a2ff;
    }
}


.hub-title-text p {
    font-size: 12.5px;
    color: var(--status-amber);
    font-weight: 500;
}

.hub-actions-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Kereső */
.search-container {
    position: relative;
    width: 320px;
}

.search-input {
    width: 100%;
    padding: 10px 18px;
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    font-size: 13.5px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-input:focus {
    border-color: var(--primary-indigo);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.btn-icon-square {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.15s ease;
}

.btn-icon-square:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.btn-primary-action {
    padding: 10px 18px;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--primary-indigo), #4f46e5);
    color: #ffffff;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-button);
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-action::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary-action:hover::after {
    left: 100%;
}

.btn-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Modul Tartalom Konténer */
.module-view {
    padding: 24px 36px 40px;
}

/* Animáció betöltéskor */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-view > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.stats-grid { animation-delay: 0.1s; }
.filter-tabs-row { animation-delay: 0.2s; }
.items-grid-3 { animation-delay: 0.3s; }

/* Statisztikai Kártyák */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius-stat);
    padding: 18px 22px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-neon);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4.5px;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
    box-shadow: 0 0 8px currentColor;
}

.stat-card.stat-neutral::before { background: #94a3b8; color: #94a3b8; }
.stat-card.stat-green::before { background: var(--status-green); color: var(--status-green); }
.stat-card.stat-amber::before { background: var(--status-amber); color: var(--status-amber); }
.stat-card.stat-red::before { background: var(--status-red); color: var(--status-red); }
.stat-card.stat-indigo::before { background: var(--primary-indigo); color: var(--primary-indigo); }

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.stat-card.stat-green .stat-value { color: var(--status-green); }
.stat-card.stat-amber .stat-value { color: var(--status-amber); }
.stat-card.stat-red .stat-value { color: var(--status-red); }
.stat-card.stat-indigo .stat-value { color: var(--primary-indigo); }

/* Szűrők / Tabs */
.filter-tabs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.pill-tab {
    padding: 7px 16px;
    border-radius: var(--border-radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-body);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
    user-select: none;
}

.pill-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
}

.pill-tab.active {
    background: var(--primary-indigo);
    color: #ffffff;
    border-color: var(--primary-indigo);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* Kártya Rács */
.items-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.hub-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    padding: 22px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-neon);
    border-color: rgba(99, 102, 241, 0.3);
}

.hub-card.card-danger {
    border: 1.5px solid var(--status-red-border);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-meta-code {
    font-size: 11.5px;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 3px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

/* Badgek */
.badge-pill {
    padding: 4px 10px;
    border-radius: var(--border-radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-paid { background: var(--status-green-light); color: var(--status-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-overdue { background: var(--status-red-light); color: var(--status-red); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-pending { background: rgba(245, 158, 11, 0.1); color: var(--status-amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-neutral { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.badge-indigo { background: var(--primary-indigo-light); color: var(--primary-indigo); }

/* Kártya Információs Sorok */
.card-details-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label { color: var(--text-light); }
.detail-value { color: var(--text-body); font-weight: 500; }
.detail-warning { color: var(--status-red); font-weight: 600; display: flex; align-items: center; gap: 4px; }

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

.card-highlight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-top: 10px;
}

.card-highlight-label { font-size: 13px; color: var(--text-light); }
.card-highlight-value { font-size: 18px; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; }

/* Kártya Gombok */
.card-actions-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-card-success-filled {
    flex: 1;
    background: var(--status-green);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease;
}

.btn-card-success-filled:hover { background: #059669; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }

.btn-card-settled {
    width: 100%;
    background: var(--status-green-light);
    color: var(--status-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 5px;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-card-settled:hover { background: rgba(16, 185, 129, 0.2); }

.btn-card-warning-outline {
    background: var(--status-red-light);
    color: var(--status-red);
    border: 1px solid var(--status-red-border);
    border-radius: 5px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-card-warning-outline:hover { background: rgba(239, 68, 68, 0.2); }

.btn-card-secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-body);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.btn-card-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
    color: var(--text-main);
}

/* Modal Rendszer */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 20px;
}

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

.modal-card {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-modal);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 580px;
    padding: 34px 38px 28px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.btn-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.modal-header-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--primary-indigo-light);
    color: var(--primary-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.modal-header-text {
    text-align: center;
    margin-bottom: 26px;
}

.modal-header-text h3 {
    font-size: 23px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.modal-header-text p {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.5;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group-full {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 7px;
}

.form-label span.req {
    color: var(--status-red);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 11px 15px;
    border-radius: var(--border-radius-input);
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.6);
    font-size: 14px;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.15s ease;
    appearance: none;
}

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

.form-control:focus {
    outline: none;
    border-color: var(--primary-indigo);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 38px;
    cursor: pointer;
}

textarea.form-control {
    min-height: 95px;
    resize: vertical;
}

.btn-modal-submit {
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--border-radius-input);
    background: linear-gradient(135deg, var(--primary-indigo), #4f46e5);
    color: #ffffff;
    border: none;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-button);
    transition: all 0.15s ease;
    margin-top: 20px;
}

.btn-modal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.modal-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 18px;
    text-align: center;
}

/* Toast Értesítések */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    border: 1px solid var(--border-color);
    animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { background: #064e3b; border-color: #059669; }
.toast.toast-error { background: #7f1d1d; border-color: #ef4444; }
.toast.toast-warning { background: #78350f; border-color: #f59e0b; }

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

/* Üres állapot kártya */
.empty-state-card {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-radius: var(--border-radius-card);
    border: 1px dashed var(--border-color);
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 36px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto 16px;
}

.customer-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-body);
}

/* =========================================================
   DASHBOARD SPECIFIKUS MODERN SÖTÉT STÍLUSOK (PRO DARK MODE)
   ========================================================= */

/* Fő szekció dobozok a Dashboardon */
#module-container > div[style*="margin-bottom: 30px"],
#module-container > div[style*="margin-bottom: 16px"] {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 24px 26px 22px;
    margin-bottom: 26px !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#module-container > div[style*="margin-bottom: 30px"]:hover,
#module-container > div[style*="margin-bottom: 16px"]:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.45);
}

/* Szekció címek (H3) a Dashboardon - felülírva az inline #0f172a sötét színt */
#module-container h3,
.module-view h3 {
    color: #f8fafc !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#module-container h3 span:first-child,
.module-view h3 span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 4.5px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 16px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Szekció navigációs gyorslinkek (pl. "CRM megnyitása →", "Feladatkezelő megnyitása →") */
#module-container span[onclick*="switchModule"],
.module-view span[onclick*="switchModule"] {
    color: #a5b4fc !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    padding: 6px 14px;
    border-radius: var(--border-radius-pill);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

#module-container span[onclick*="switchModule"]:hover,
.module-view span[onclick*="switchModule"]:hover {
    background: rgba(99, 102, 241, 0.28);
    border-color: var(--primary-indigo);
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
    transform: translateX(3px);
}

/* Dashboard Statisztikai Kártyák (Glassmorphism + Neon Akcentusok) */
#module-container .stats-grid .stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    border-radius: var(--border-radius-stat) !important;
    box-shadow: 0 6px 20px -3px rgba(0, 0, 0, 0.4) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#module-container .stats-grid .stat-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 0 20px rgba(99, 102, 241, 0.25) !important;
}

#module-container .stat-card.stat-neutral:hover {
    border-color: rgba(148, 163, 184, 0.4) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 0 15px rgba(148, 163, 184, 0.2) !important;
}

#module-container .stat-card.stat-green:hover {
    border-color: rgba(16, 185, 129, 0.45) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 0 20px rgba(16, 185, 129, 0.3) !important;
}

#module-container .stat-card.stat-indigo:hover {
    border-color: rgba(99, 102, 241, 0.55) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 0 22px rgba(99, 102, 241, 0.35) !important;
}

#module-container .stat-card.stat-amber:hover {
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.28) !important;
}

#module-container .stat-card.stat-red:hover {
    border-color: rgba(239, 68, 68, 0.55) !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 0 22px rgba(239, 68, 68, 0.35) !important;
}

/* Stat címkék és kiemelt értékek */
#module-container .stat-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 8px !important;
}

#module-container .stat-value {
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: #f8fafc !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

#module-container .stat-card.stat-green .stat-value {
    color: #34d399 !important;
    text-shadow: 0 0 14px rgba(52, 211, 153, 0.35);
}

#module-container .stat-card.stat-indigo .stat-value {
    color: #818cf8 !important;
    text-shadow: 0 0 14px rgba(129, 140, 248, 0.35);
}

#module-container .stat-card.stat-amber .stat-value {
    color: #fbbf24 !important;
    text-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

#module-container .stat-card.stat-red .stat-value {
    color: #f87171 !important;
    text-shadow: 0 0 14px rgba(248, 113, 113, 0.35);
}

/* 5 oszlopos grid a Feladatokhoz - Reszponzív viselkedés */
#module-container .stats-grid[style*="repeat(5"] {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 16px !important;
}

@media (max-width: 1350px) {
    #module-container .stats-grid[style*="repeat(5"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 850px) {
    #module-container .stats-grid[style*="repeat(5"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 550px) {
    #module-container .stats-grid[style*="repeat(5"] {
        grid-template-columns: 1fr !important;
    }
}

/* Dashboard Kiemelt Gyors-Akció Kártyák (3 oszlopos alsó szekció) */
#module-container .items-grid-3 .hub-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    border-radius: var(--border-radius-card) !important;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4) !important;
    padding: 22px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#module-container .items-grid-3 .hub-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.6), 0 0 22px rgba(99, 102, 241, 0.28) !important;
}

/* Kiemelt Lejárt/Kintlévőség Vészjelző Kártya */
#module-container .items-grid-3 .hub-card.card-danger {
    border: 1.5px solid rgba(68, 121, 239, 0.82) !important; 
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(8, 9, 16, 0.8) 100%) !important;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4), 0 0 16px rgba(59, 130, 246, 0.4) !important;
}

#module-container .items-grid-3 .hub-card.card-danger:hover {
    border-color: rgba(239, 68, 68, 0.8) !important;
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.6), 0 0 26px rgba(239, 68, 68, 0.4) !important;
}

/* Kártya Meta Code és Cím */
#module-container .items-grid-3 .card-meta-code {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: var(--accent-cyan) !important;
    margin-bottom: 4px !important;
}

#module-container .items-grid-3 .hub-card.card-danger .card-meta-code {
    color: #f87171 !important;
}

#module-container .items-grid-3 .card-title {
    font-size: 16.5px !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    line-height: 1.3 !important;
}

/* Kártya Részletek Táblázat */
#module-container .items-grid-3 .detail-row {
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

#module-container .items-grid-3 .detail-row:last-child {
    border-bottom: none;
}

#module-container .items-grid-3 .detail-label {
    color: #94a3b8 !important;
    font-size: 12.5px !important;
}

#module-container .items-grid-3 .detail-value {
    color: #e2e8f0 !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
}

#module-container .items-grid-3 .detail-warning {
    color: #f87171 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
}

/* Dashboard Akciógombok */
#module-container .items-grid-3 .btn-card-warning-outline {
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    border-radius: 5px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#module-container .items-grid-3 .btn-card-warning-outline:hover {
    background: rgba(239, 68, 68, 0.28) !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.5) !important;
    transform: translateY(-2px);
}

#module-container .items-grid-3 .btn-card-secondary {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    color: #cbd5e1 !important;
    border-radius: 5px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#module-container .items-grid-3 .btn-card-secondary:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: var(--primary-indigo) !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-2px);
}

/* Dashboard Topbar "+ Gyors Feladat" Akciógomb */
#btn-dash-new-task {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.45) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#btn-dash-new-task:hover {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.65), 0 0 15px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-2px);
}


/* =========================================================
   PROGRESSZÍV KÁRTYA BETÖLTÉS ÉS GÖRGETÉS (INFINITE SCROLL)
   ========================================================= */
@keyframes cardFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-enter {
    animation: cardFadeSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-sentinel {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0 16px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    width: 100%;
}

.scroll-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary-indigo);
    border-radius: 50%;
    animation: spinnerRotate 0.6s linear infinite;
    margin-right: 10px;
    display: inline-block;
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

.scroll-end-label {
    grid-column: 1 / -1;
    text-align: center;
    padding: 22px 0 14px;
    color: var(--text-light);
    font-size: 12.5px;
    letter-spacing: 0.02em;
    font-weight: 500;
}

/* Globális hibakezelő sáv (window.onerror / unhandledrejection) */
.hub-global-error-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #dc2626;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Prompt Gyorsindító AI Chat Gombok */
.prompt-ai-launch-box {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(148, 163, 184, 0.15);
}

.prompt-ai-launch-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prompt-ai-launch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.btn-ai-launch {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    padding: 6px 2px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.btn-ai-launch:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-ai-launch .ai-icon {
    font-size: 13px;
    line-height: 1;
}

.btn-ai-launch .ai-name {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* =======================================================
 * MODÁL MÉRET ÉS PROMPT BŐVÍTETT SZERKESZTŐ STÍLUSOK
 * ======================================================= */
.modal-card.modal-card-lg {
    max-width: 880px;
    width: 95%;
}

.modal-card.modal-card-xl {
    max-width: 1100px;
    width: 96%;
}

.modal-card.modal-card-zen {
    max-width: 96vw !important;
    width: 96vw !important;
    max-height: 94vh !important;
    height: 94vh !important;
    display: flex;
    flex-direction: column;
}

.modal-card.modal-card-zen #hub-dynamic-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-card.modal-card-zen #modal-form-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-card.modal-card-zen .prompt-editor-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-card.modal-card-zen textarea.prompt-editor-textarea {
    flex: 1;
    min-height: 440px !important;
}

/* Prompt szerkesztő keret és vezérlősáv */
.prompt-editor-wrapper {
    margin-bottom: 16px;
}

.prompt-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.prompt-editor-tools-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-stats-badge {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
}

.btn-prompt-ctrl {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.btn-prompt-ctrl:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #ffffff;
}

.btn-prompt-ctrl.active {
    background: rgba(99, 102, 241, 0.35);
    border-color: var(--primary-indigo);
    color: #a5b4fc;
}

/* Változók gyorsbeszúró sávja */
.prompt-vars-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 5px;
}

.prompt-vars-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    margin-right: 4px;
}

.chip-var-insert {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 11.5px;
    font-family: monospace;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chip-var-insert:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: #818cf8;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Maga a megnövelt, kényelmes prompt textarea */
textarea.prompt-editor-textarea {
    width: 100%;
    min-height: 280px;
    padding: 14px 16px;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Monaco, "Courier New", monospace;
    font-size: 13.5px;
    line-height: 1.65;
    background: rgba(10, 15, 30, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--border-radius-input);
    color: #f1f5f9;
    resize: vertical;
    transition: min-height 0.2s ease, border-color 0.15s ease, background 0.15s ease;
}

textarea.prompt-editor-textarea:focus {
    outline: none;
    border-color: var(--primary-indigo);
    background: rgba(10, 15, 30, 0.9);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
