/* DESIGN SYSTEM & GLOBAL STYLES */
:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --border-color: #334155;
    --border-glow: #38bdf8;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #0284c7;
    --accent-blue-hover: #0369a1;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-amber: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 90px;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* APP CONTAINER */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-glow);
}

.header-brand h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.inspector-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(51, 65, 85, 0.5);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.08);
}

.badge-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.badge-info {
    display: flex;
    flex-direction: column;
}

.inspector-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.inspector-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* NAVIGATION TABS */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.nav-tab {
    flex: 1;
    min-width: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.tab-num {
    background: rgba(255, 255, 255, 0.2);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* TAB CONTENT */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* CARDS & FORMS */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

input[readonly] {
    background-color: rgba(15, 23, 42, 0.5);
    color: var(--text-muted);
    cursor: not-allowed;
}

.select-lg {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 14px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.825rem;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}
.btn-primary:hover { background-color: var(--accent-blue-hover); }

.btn-secondary {
    background-color: #334155;
    color: var(--text-primary);
}
.btn-secondary:hover { background-color: #475569; }

.btn-success {
    background-color: var(--accent-green);
    color: white;
}
.btn-success:hover { background-color: var(--accent-green-hover); }

.btn-danger {
    background-color: var(--accent-red);
    color: white;
}
.btn-danger:hover { opacity: 0.9; }

.btn-accent {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* TOGGLE SWITCH */
.toggle-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.toggle-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.toggle-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent-green); }
input:checked + .slider:before { transform: translateX(28px); }

.evrele-details-box {
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
    transition: opacity 0.3s ease;
}

/* SUMMARY POINTS ITEM LIST */
.summary-points-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-point-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.summary-point-card:hover {
    border-color: #475569;
}

.point-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.point-title-box {
    display: flex;
    gap: 12px;
}

.point-number {
    background: var(--accent-blue);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.point-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.point-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* STATUS BADGE SELECTOR */
.status-selector {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.status-btn {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background-color: #1e293b;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.status-btn[data-status="MF"].active {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.status-btn[data-status="NEM"].active {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.status-btn[data-status="NA"].active {
    background-color: rgba(100, 116, 139, 0.2);
    border-color: var(--text-muted);
    color: var(--text-muted);
}

/* 1. MELLÉKLET ROOMS & MEASUREMENTS */
.melleklet-header-info {
    display: flex;
    gap: 24px;
    padding: 12px 18px;
    background: #0f172a;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.rooms-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.room-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #0f172a;
    overflow: hidden;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #1e293b;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    flex-wrap: wrap;
}

.room-title-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 1rem;
}

.room-select-preset {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent-cyan);
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-md);
}

.room-custom-input {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    background-color: #0f172a;
    border: 1px solid var(--accent-cyan);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    width: 200px;
}

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

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

.items-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border-color);
}

.items-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    vertical-align: middle;
}

.quick-item-buttons {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.btn-chip {
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    background: #1e293b;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
}
.btn-chip:hover {
    background: var(--accent-blue);
    color: white;
}

.minosites-select {
    font-weight: 700;
    width: 130px;
    padding: 8px;
    border-radius: var(--radius-md);
}
.minosites-select.pass-select {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-green);
    color: var(--accent-green);
}
.minosites-select.fail-select {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* STICKY FOOTER ACTION BAR */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 14px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.action-bar-shortcuts {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-bar-shortcuts .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.action-bar-shortcuts .btn:hover,
.action-bar-shortcuts .btn:active {
    background: var(--accent-blue);
    border-color: var(--accent-cyan);
    color: #fff;
}

.action-bar-buttons {
    display: flex;
    gap: 12px;
}

/* -------------------------------------------------------------------------- */
/* PRINTABLE PDF STRICT A4 STYLING - EXACT VBF MINTA LAYOUT NO OVERFLOW      */
/* -------------------------------------------------------------------------- */
.pdf-document {
    background: white;
    color: black;
    font-family: 'Times New Roman', serif;
    width: 210mm;
    margin: 0 auto;
}

.pdf-page {
    width: 210mm !important;
    height: 296mm !important;
    max-height: 296mm !important;
    padding: 8mm 10mm !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    page-break-inside: avoid !important;
    overflow: hidden !important;
    position: relative !important;
    background: white !important;
}

.pdf-frame {
    border: 3px double #000 !important;
    padding: 8mm 10mm !important;
    height: 278mm !important;
    max-height: 278mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
}

/* -------------------------------------------------------------------------- */
/* FULL MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION                             */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        padding-bottom: 150px; /* Extra room for mobile sticky action bar */
    }

    .app-container {
        padding: 10px 8px;
    }

    /* HEADER ON MOBILE */
    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }

    .header-brand {
        gap: 12px;
    }

    .header-brand h1 {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .inspector-badge {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
        background: rgba(15, 23, 42, 0.6);
    }

    /* MOBILE NAVIGATION TABS (TOUCH SLIDER) */
    .nav-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }

    .nav-tab {
        flex: 0 0 auto;
        min-width: 140px;
        padding: 12px 14px;
        font-size: 0.85rem;
        scroll-snap-align: start;
        border-radius: var(--radius-md);
    }

    /* CARDS & FORMS ON MOBILE */
    .card {
        margin-bottom: 16px;
        border-radius: var(--radius-md);
    }

    .card-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-header h2 {
        font-size: 1.05rem;
    }

    .card-body {
        padding: 16px 14px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* INPUT TOUCH OPTIMIZATION (Prevent iOS zoom on focus with 16px font-size) */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
        padding: 12px 12px;
        min-height: 46px;
        width: 100%;
    }

    textarea {
        min-height: 100px;
    }

    .btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.95rem;
        width: 100%;
    }

    /* 20 SUMMARY POINTS ON MOBILE */
    .summary-point-card {
        padding: 12px;
    }

    .point-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .status-selector {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        gap: 6px;
    }

    .status-btn {
        width: 100%;
        padding: 10px 4px;
        font-size: 0.8rem;
        min-height: 42px;
        justify-content: center;
    }

    /* ROOMS & MEASUREMENTS TABLE ON MOBILE */
    .room-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .room-title-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .room-select-preset,
    .room-custom-input {
        width: 100% !important;
        min-height: 44px;
    }

    .room-header-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 6px;
    }

    .room-header-actions .btn {
        width: 100%;
        font-size: 0.825rem;
        padding: 8px 6px;
        min-height: 40px;
    }

    .room-header-actions .btn-danger {
        grid-column: 1 / -1;
    }

    /* TABLE RESPONSIVENESS */
    .table-responsive-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .items-table {
        min-width: 480px;
    }

    .items-table th, 
    .items-table td {
        padding: 8px 10px;
    }

    .quick-item-buttons {
        flex-wrap: wrap;
        gap: 4px;
    }

    .btn-chip {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: 32px;
    }

    .minosites-select {
        width: 100%;
        min-height: 42px;
    }

    /* STICKY FOOTER ACTION BAR ON MOBILE */
    .action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        background: rgba(15, 23, 42, 0.98);
        border-top: 1px solid var(--border-glow);
    }

    .action-bar-shortcuts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        gap: 6px;
    }

    .action-bar-shortcuts .btn {
        width: 100%;
        padding: 8px 4px;
        font-size: 0.75rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .action-bar-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 8px;
    }

    .action-bar-buttons .btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 10px 8px;
        min-height: 44px;
    }

    .action-bar-buttons .btn-primary {
        grid-column: 1 / -1; /* PDF Download button takes full width */
    }
}

/* -------------------------------------------------------------------------- */
/* 🔒 PIN CODE LOGIN MODAL                                                    */
/* -------------------------------------------------------------------------- */
.login-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.login-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 380px;
    padding: 28px 24px;
    text-align: center;
}

.logo-icon-lg {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-glow);
}

.login-header h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.login-body input {
    width: 100% !important;
    display: block;
    box-sizing: border-box;
}

.pin-display-box {
    margin-bottom: 20px;
}

.pin-display-box input {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem !important;
    letter-spacing: 0.4em;
    text-align: center;
    padding: 10px;
    background: #0f172a;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--accent-cyan);
    width: 100%;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pin-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    height: 56px;
    border-radius: var(--radius-md);
    background: #0f172a;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-btn:active, .pin-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-cyan);
}

.pin-btn-action {
    background: #334155;
    color: var(--accent-amber);
}

.login-error-msg {
    color: var(--accent-red);
    font-size: 0.85rem;
    min-height: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.login-submit-btn {
    width: 100%;
    height: 50px;
    font-size: 1.05rem;
}

.login-hint {
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/* 📁 CRM SAVED REPORTS LIST & SEARCH BAR                                      */
/* -------------------------------------------------------------------------- */
.crm-filter-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.crm-filter-bar input {
    flex: 2;
    min-width: 260px;
}

.crm-filter-bar select {
    flex: 1;
    min-width: 180px;
}

.crm-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.crm-report-card {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.2s ease;
}

.crm-report-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.crm-report-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.crm-report-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.crm-report-meta div {
    margin-bottom: 3px;
}

.crm-report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.crm-report-actions .btn {
    flex: 1;
    min-width: 90px;
    font-size: 0.8rem;
    padding: 8px 6px;
}

/* -------------------------------------------------------------------------- */
/* 👁️ LIVE FULLSCREEN REPORT PREVIEW MODAL                                    */
/* -------------------------------------------------------------------------- */
.preview-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    z-index: 10005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 960px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #0f172a;
    border-bottom: 1px solid var(--border-color);
}

.preview-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-filename-badge {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    border: 1px solid var(--accent-blue);
}

.preview-modal-actions {
    display: flex;
    gap: 10px;
}

.preview-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #334155;
    display: flex;
    justify-content: center;
}

#preview-modal-content-stage {
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 210mm;
    margin: 0 auto;
}

/* -------------------------------------------------------------------------- */
/* 👤 USER EDITOR MODAL                                                       */
/* -------------------------------------------------------------------------- */
.user-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.user-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.user-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.user-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.user-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

