/* ============================================================
   SALTOK EDU SYSTEM - THEME CSS v6.0.0
   ============================================================ */

:root,
[data-theme="light"] {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --success: #059669;
    --success-dark: #047857;
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --warning: #d97706;
    --warning-dark: #b45309;
    --info: #0284c7;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    --sidebar-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --overlay-bg: rgba(0, 0, 0, 0.5);
    
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(30, 64, 175, 0.15);
    --card-shadow: 0 4px 20px rgba(30, 64, 175, 0.08);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --text-white: #ffffff;
    
    --input-bg: rgba(30, 64, 175, 0.04);
    --input-border: rgba(30, 64, 175, 0.2);
    --input-focus: rgba(30, 64, 175, 0.4);
    --btn-text: #ffffff;
    
    --hover-bg: rgba(30, 64, 175, 0.06);
    --active-bg: rgba(30, 64, 175, 0.12);
    --icon-bg: rgba(30, 64, 175, 0.08);
    --border-color: rgba(30, 64, 175, 0.12);
    --glass-blur: 16px;
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #0ea5e9;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e1b4b;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --sidebar-bg: #0f172a;
    --header-bg: rgba(15, 23, 42, 0.95);
    --overlay-bg: rgba(0, 0, 0, 0.7);
    
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    --text-white: #ffffff;
    
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-focus: rgba(99, 102, 241, 0.4);
    --btn-text: #ffffff;
    
    --hover-bg: rgba(99, 102, 241, 0.1);
    --active-bg: rgba(99, 102, 241, 0.2);
    --icon-bg: rgba(99, 102, 241, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
}

html {
    transition: background-color 0.3s ease, color 0.3s ease;
    color-scheme: light dark;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

header {
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle-btn {
    background: var(--icon-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.menu-toggle-btn:hover {
    background: var(--hover-bg);
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-text h1 {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    transition: color 0.3s ease;
}

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

.header-semester-selector select {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-semester-selector select:focus {
    border-color: var(--input-focus);
}

.theme-toggle-btn {
    background: var(--icon-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.theme-toggle-btn:hover {
    background: var(--hover-bg);
    transform: scale(1.05);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--card-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    color: var(--text-main) !important;
}

.sidebar-menu {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin: 12px 10px 6px 10px;
}

.nav-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
}

.nav-item:hover {
    background: var(--hover-bg);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--card-border);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.container {
    padding: 16px;
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.collapsible-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 20px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.collapsible-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    background: var(--hover-bg);
    transition: background 0.2s ease;
}

.collapsible-header:hover {
    background: var(--active-bg);
}

.collapsible-header h3 {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.collapsible-icon {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.collapsible-card.active .collapsible-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.collapsible-card.active .collapsible-content {
    max-height: 5000px;
    padding: 15px 20px 20px 20px;
    border-top: 1px solid var(--border-color);
    transition: max-height 0.5s ease-in-out, padding 0.3s ease;
}

.financial-card {
    background: linear-gradient(135deg,
        rgba(5, 150, 105, 0.08),
        rgba(2, 132, 199, 0.08));
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 16px;
    padding: 15px;
    margin: 15px 0;
    text-align: right;
    transition: all 0.3s ease;
}

.fin-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.fin-row:last-child {
    margin-bottom: 0;
}

.fin-row span {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.fin-row strong {
    color: var(--text-main);
    font-weight: 700;
    transition: color 0.3s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.stat-box {
    background: var(--hover-bg);
    border: 1px solid var(--card-border);
    padding: 12px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    transition: color 0.3s ease;
}

.stat-box p {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.semester-tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    background: var(--hover-bg);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.semester-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.semester-tab-btn.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

#reader {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 2px dashed var(--input-border);
    background: #000;
    min-height: 250px;
    position: relative;
}

#reader video {
    object-fit: cover !important;
    border-radius: 16px;
    width: 100% !important;
}

#qrcodeCanvas {
    background: white;
    padding: 15px;
    border-radius: 16px;
    display: inline-block;
    margin: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.input-box {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.input-box::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-box:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px var(--input-focus);
}

select.input-box {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 40px;
}

textarea.input-box {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-excel {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    margin-bottom: 10px;
}

.btn-all {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    margin-bottom: 10px;
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    font-size: 0.75rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-white);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-toggle { background: var(--warning); }
.btn-unbind { background: var(--info); }
.btn-delete { background: var(--danger); }
.btn-pay { background: var(--success); }
.btn-edit { background: var(--primary); }

.action-btns-group {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    z-index: 1000;
    padding: 20px;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.2s ease;
}

.modal-overlay[style*="display: flex"] {
    display: flex !important;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-body {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s ease;
}

.modal-body textarea {
    width: 100%;
    height: 220px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--success);
    padding: 10px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    margin: 10px 0;
    outline: none;
    white-space: pre;
    overflow-x: auto;
}

.result-card {
    display: none;
    text-align: center;
    padding: 25px 20px;
    border-radius: 20px;
    margin-top: 15px;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-card.success {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.35);
}

.result-card.danger {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.35);
}

.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-dialog-overlay[style*="display: flex"] {
    display: flex !important;
}

.custom-dialog-box {
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.25s ease;
}

.custom-dialog-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.custom-dialog-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.custom-dialog-msg {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    white-space: pre-line;
}

.custom-dialog-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.due-warning-banner {
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid var(--warning);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--warning-dark);
}

.due-danger-banner {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid var(--danger);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--danger-dark);
}

.student-item,
.log-item,
.bus-item,
.room-item,
.notification-card,
.broadcast-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--hover-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    /* ✅ منع تحديد النصوص في البطاقات */
    user-select: none;
    -webkit-user-select: none;
}

.student-info h4,
.log-info h4,
.bus-info h4,
.room-info h4,
.notification-info h4,
.broadcast-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.student-info p,
.log-info p,
.bus-info p,
.room-info p,
.notification-info p,
.broadcast-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.broadcast-card {
    background: linear-gradient(135deg,
        rgba(30, 64, 175, 0.08),
        rgba(217, 119, 6, 0.08));
    border: 1px solid rgba(217, 119, 6, 0.3);
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.broadcast-info { width: 100%; }
.broadcast-info h4 { color: var(--warning); }

.pulse-live {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
    animation: pulse-ring 1.5s infinite;
    margin-left: 5px;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

#installApp {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

@media (min-width: 768px) {
    .container {
        max-width: 900px;
        padding: 24px;
    }
    .glass-card {
        padding: 28px;
        border-radius: 24px;
    }
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    header {
        padding: 16px 32px;
    }
    .brand-text h1 {
        font-size: 1.2rem;
    }
    .brand-logo-img {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 10px;
    }
    .collapsible-header {
        padding: 14px;
    }
    .collapsible-header h3 {
        font-size: 0.9rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ✅ إصلاح المودالات */
[data-theme="light"] .modal-body {
    background: #ffffff !important;
}

[data-theme="light"] .modal-body h3,
[data-theme="light"] .modal-body h4,
[data-theme="light"] .modal-body label {
    color: var(--text-main) !important;
}

[data-theme="light"] .modal-body p {
    color: var(--text-muted) !important;
}

/* ✅ تحسين حقول لوحة الأدمن */
#adminContent .input-box {
    padding: 14px 18px !important;
    font-size: 0.95rem !important;
    min-height: 48px !important;
    border-radius: 10px !important;
}

#adminContent .form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
}

#adminContent .form-group {
    margin-bottom: 16px !important;
}

/* ✅ تقارير احترافية */
.report-container {
    background: #ffffff;
    color: #0f172a;
    padding: 40px;
    font-family: 'Cairo', Arial, sans-serif;
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
}

.report-header-centered {
    text-align: center;
    border-bottom: 4px solid #1e40af;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.report-header-centered .report-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
}

.report-header-centered .report-app-name {
    font-size: 24px;
    font-weight: 800;
    color: #1e40af;
    margin: 0;
}

.report-header-centered .report-app-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 6px 0 0 0;
}

.report-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e40af;
    text-align: center;
    margin: 20px 0;
}

.report-meta {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.report-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.report-stat h3 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 5px 0;
}

.report-stat p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.report-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.report-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 15px 0;
}

.report-fin-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
}

.report-fin-row span { color: #64748b; }
.report-fin-row strong { color: #0f172a; font-weight: 700; }

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

.report-table th {
    background: #1e40af;
    color: #ffffff;
    padding: 12px;
    text-align: right;
    font-weight: 700;
    border: 1px solid #1e40af;
}

.report-table td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.report-table tr:nth-child(even) { background: #f8fafc; }

.report-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

/* ✅ الطباعة */
@media print {
    body * {
        visibility: hidden !important;
    }
    .report-container,
    .report-container * {
        visibility: visible !important;
    }
    .report-container {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 15mm !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    header, .sidebar, .sidebar-overlay, .modal-overlay, .custom-dialog-overlay,
    #installApp, .btn-submit, .btn-sm, .action-btns-group,
    .semester-tab-container, .theme-toggle-btn, .menu-toggle-btn,
    .header-semester-selector {
        display: none !important;
        visibility: hidden !important;
    }
    .report-header-centered,
    .report-section {
        page-break-inside: avoid !important;
    }
    .report-table {
        page-break-inside: auto !important;
    }
    .report-table tr {
        page-break-inside: avoid !important;
    }
    .report-table thead {
        display: table-header-group !important;
    }
    @page {
        size: A4;
        margin: 12mm;
    }
    .report-container,
    .report-container * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* ✅ اللوجو */
.brand-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(30, 64, 175, 0.3));
    flex-shrink: 0;
}

.hero-logo-img {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.4));
    animation: logoBob 3s ease-in-out infinite;
}

@media (max-width: 600px) {
    .brand-logo-img {
        width: 34px;
        height: 34px;
    }
    .hero-logo-img {
        width: 64px;
        height: 64px;
    }
}
/* ============================================================
   ✅ إصلاح أزرار btn-sm (بدون background)
   ============================================================ */
.btn-sm:not([style*="background"]):not(.btn-toggle):not(.btn-unbind):not(.btn-delete):not(.btn-pay):not(.btn-edit):not(.btn-excel):not(.btn-month):not(.btn-all) {
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
}

/* ✅ الأزرار اللي ليها background في HTML — نضمن النص أبيض */
.btn-sm[style*="background"] {
  color: #fff;
}

/* ============================================================
   ✅ تحسين شريط البحث وإدارة الطلاب
   ============================================================ */
#studentSearchInput {
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-light);
}

#studentSearchInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--input-focus);
}

/* ✅ تحسين زر نسخ الكارت */
.btn-copy-card {
    background: #0ea5e9;
    transition: background 0.2s;
}

.btn-copy-card:hover {
    background: #0284c7;
}

/* ✅ تحسين عرض المسار (البكالوريا) في كارت الطالب */
.bac-track-info {
    color: #8b5cf6;
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
/* ============================================================
   ✅ تنسيقات لوحة الإدارة الجديدة (Admin Grid)
   ============================================================ */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    color: var(--text-main);
    transition: all 0.25s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.admin-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.admin-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg);
    font-size: 1.3rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.admin-card:hover .admin-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.admin-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
}

.admin-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

/* ============================================================
   ✅ شريط البحث الموحد
   ============================================================ */
.unified-search-wrapper {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: var(--card-shadow);
}

.unified-search-wrapper input {
    flex: 1;
    min-width: 150px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    padding: 8px;
}

.unified-search-wrapper input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.unified-search-wrapper select {
    background: var(--hover-bg);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    outline: none;
}

.unified-search-wrapper select:focus {
    border-color: var(--primary);
}

/* ============================================================
   ✅ الوضع الداكن للبطاقات
   ============================================================ */
[data-theme="dark"] .admin-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .unified-search-wrapper {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .admin-card-icon {
    background: rgba(99, 102, 241, 0.15);
}

/* ============================================================
   ✅ تنسيقات الموظفين والمرتبات
   ============================================================ */
.staff-item {
    border-top: 1px solid var(--card-border);
    padding: 10px 0;
    transition: background 0.2s ease;
}

.staff-item:hover {
    background: var(--hover-bg);
}

.staff-item:first-child {
    border-top: none;
}

/* ============================================================
   ✅ تنسيقات المكتبة
   ============================================================ */
.library-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--card-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.library-file:hover {
    background: var(--hover-bg);
}

.library-file:first-child {
    border-top: none;
}

/* ============================================================
   ✅ تنسيقات الشكاوى
   ============================================================ */
.suggestion-item {
    border-top: 1px solid var(--card-border);
    padding: 10px 0;
}

.suggestion-item:first-child {
    border-top: none;
}

.suggestion-complaint {
    border-right: 4px solid var(--danger);
    padding-right: 12px;
}

.suggestion-suggestion {
    border-right: 4px solid var(--success);
    padding-right: 12px;
}

/* ============================================================
   ✅ تنسيقات المتفوقين
   ============================================================ */
.honor-card {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border: 1.5px solid rgba(251, 191, 36, 0.3);
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 12px;
    text-align: center;
}

.honor-card h4 {
    color: #f59e0b;
    margin-bottom: 8px;
}

/* ============================================================
   ✅ responsive للجداول
   ============================================================ */
@media (max-width: 600px) {
    .unified-search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .unified-search-wrapper input {
        width: 100%;
    }
    
    .unified-search-wrapper select {
        width: 100%;
    }
    
    .admin-card {
        padding: 14px 10px;
    }
    
    .admin-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .admin-card-title {
        font-size: 0.82rem;
    }
    
    .admin-card-desc {
        font-size: 0.65rem;
    }
}

/* ============================================================
   ✅ إخفاء شاشة التحميل عند الاختفاء
   ============================================================ */
#splashScreen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
   ✅ تحسينات الطباعة (عشان التقارير تطلع احترافية)
   ============================================================ */
@media print {
    .report-container {
        page-break-after: always;
    }
    .report-container:last-child {
        page-break-after: auto;
    }
    .admin-card, .modern-portal-card, .unified-search-wrapper {
        display: none !important;
    }
}
/* ============================================================
   ✅ v6.1.0 — تنسيقات المرتبات وتقرير المرتبات
   ============================================================ */

/* --- مودال صرف المرتب --- */
#payrollModal .modal-body {
    max-width: 500px;
}

#payrollModal #payrollStaffName {
    color: var(--warning);
    font-weight: 800;
    font-size: 1rem;
    margin: 6px 0 2px;
}

#payrollModal #payrollStaffSalary {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

#payrollModal #payrollNet {
    transition: color 0.2s ease;
    font-variant-numeric: tabular-nums;
}

#payrollModal input[type="month"],
#payrollModal input[type="date"] {
    font-family: 'Cairo', sans-serif;
    color-scheme: light dark;
}

/* --- مودال تقرير المرتبات --- */
#payrollReportModal .modal-body {
    max-width: 900px;
    max-height: 92vh;
    overflow-y: auto;
}

#payrollReportStats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    #payrollReportStats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- جدول تقرير المرتبات --- */
#payrollReportBox table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    border-radius: 10px;
    overflow: hidden;
}

#payrollReportBox thead th {
    background: var(--hover-bg);
    color: var(--text-muted);
    font-weight: 700;
    padding: 10px 8px;
    text-align: right;
    font-size: 0.78rem;
    white-space: nowrap;
}

#payrollReportBox tbody td {
    padding: 10px 8px;
    border-top: 1px solid var(--card-border);
    color: var(--text-main);
    vertical-align: middle;
    white-space: nowrap;
}

#payrollReportBox tbody tr:hover {
    background: var(--hover-bg);
}

#payrollReportBox tbody tr:last-child {
    background: var(--hover-bg);
    border-top: 2px solid var(--card-border);
    font-weight: 800;
}

#payrollReportBox tbody tr:last-child td {
    color: var(--text-main);
    padding-top: 12px;
    padding-bottom: 12px;
}

/* --- responsive --- */
@media (max-width: 600px) {
    #payrollReportBox {
        font-size: 0.75rem;
    }
    #payrollReportBox table {
        min-width: 620px;
    }
    #payrollReportBox thead th,
    #payrollReportBox tbody td {
        padding: 8px 6px;
    }
}

/* --- الوضع الداكن --- */
[data-theme="dark"] #payrollModal .modal-body,
[data-theme="dark"] #payrollReportModal .modal-body {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] #payrollReportBox thead th {
    background: rgba(99, 102, 241, 0.1);
}

/* --- الطباعة --- */
@media print {
    #payrollModal,
    #payrollReportModal {
        display: none !important;
    }
}/* ============================================================
   ✅ v6.0.0 — جداول Responsive (بند 13)
   ============================================================ */

/* --- تحسين عرض الجداول على الجوال --- */
@media (max-width: 640px) {
  /* تحويل جدول تقرير المرتبات إلى cards */
  #payrollReportBox table,
  #finReportBox table,
  #attendanceReportBox table {
    min-width: 0 !important;
    width: 100% !important;
  }

  #payrollReportBox table thead,
  #finReportBox table thead,
  #attendanceReportBox table thead {
    display: none;
  }

  #payrollReportBox table tbody tr,
  #finReportBox table tbody tr,
  #attendanceReportBox table tbody tr {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
  }

  #payrollReportBox table tbody tr:last-child,
  #finReportBox table tbody tr:last-child,
  #attendanceReportBox table tbody tr:last-child {
    background: var(--hover-bg);
    border-top: 2px solid var(--card-border);
    font-weight: 800;
  }

  #payrollReportBox table tbody td,
  #finReportBox table tbody td,
  #attendanceReportBox table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 !important;
    border: none !important;
    font-size: 0.82rem;
    white-space: normal !important;
  }

  #payrollReportBox table tbody td::before,
  #finReportBox table tbody td::before,
  #attendanceReportBox table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-left: 8px;
  }

  /* الحفاظ على الخلايا اللي فيها colspan */
  #payrollReportBox table tbody td[colspan],
  #finReportBox table tbody td[colspan] {
    display: block;
    text-align: center;
    padding: 8px 0 !important;
  }

  #payrollReportBox table tbody td[colspan]::before,
  #finReportBox table tbody td[colspan]::before {
    content: none;
  }
}

/* --- تحسين جداول أخرى (طلاب، موظفين) --- */
@media (max-width: 480px) {
  .student-item,
  .log-item,
  .bus-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .action-btns-group {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
/* ============================================================
   ✅ v6.0.0 — جداول Responsive (Cards على الجوال) — بند 14
   ============================================================ */

@media (max-width: 640px) {
  /* --- تحويل الجداول إلى Cards --- */
  #payrollReportBox table,
  #finReportBox table,
  #attendanceReportBox table,
  #studentReportBox table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  #payrollReportBox table thead,
  #finReportBox table thead,
  #attendanceReportBox table thead,
  #studentReportBox table thead {
    display: none;
  }

  #payrollReportBox table tbody tr,
  #finReportBox table tbody tr,
  #attendanceReportBox table tbody tr,
  #studentReportBox table tbody tr {
    display: block;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
  }

  #payrollReportBox table tbody tr:hover,
  #finReportBox table tbody tr:hover,
  #attendanceReportBox table tbody tr:hover,
  #studentReportBox table tbody tr:hover {
    border-color: var(--primary);
  }

  #payrollReportBox table tbody td,
  #finReportBox table tbody td,
  #attendanceReportBox table tbody td,
  #studentReportBox table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px !important;
    border: none !important;
    font-size: 0.85rem;
    white-space: normal !important;
    text-align: left;
    gap: 8px;
  }

  #payrollReportBox table tbody td + td,
  #finReportBox table tbody td + td,
  #attendanceReportBox table tbody td + td,
  #studentReportBox table tbody td + td {
    border-top: 1px dashed var(--card-border) !important;
    padding-top: 8px !important;
  }

  /* --- عرض الـ label من data-label --- */
  #payrollReportBox table tbody td[data-label]:not([data-label=""])::before,
  #finReportBox table tbody td[data-label]:not([data-label=""])::before,
  #attendanceReportBox table tbody td[data-label]:not([data-label=""])::before,
  #studentReportBox table tbody td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
    padding: 2px 8px;
    background: var(--hover-bg);
    border-radius: 6px;
  }

  /* --- أول خلية (العنوان) --- */
  #payrollReportBox table tbody td:first-child,
  #finReportBox table tbody td:first-child,
  #attendanceReportBox table tbody td:first-child,
  #studentReportBox table tbody td:first-child {
    display: block;
    text-align: center;
    padding-bottom: 10px !important;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--card-border) !important;
  }

  #payrollReportBox table tbody td:first-child::before,
  #finReportBox table tbody td:first-child::before,
  #attendanceReportBox table tbody td:first-child::before,
  #studentReportBox table tbody td:first-child::before {
    content: none;
  }

  /* --- صف الإجمالي --- */
  #payrollReportBox table tbody tr:last-child,
  #finReportBox table tbody tr:last-child {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
    border-color: var(--primary);
    font-weight: 800;
  }

  /* --- خلية colspan --- */
  #payrollReportBox table tbody td[colspan],
  #finReportBox table tbody td[colspan] {
    display: block;
    text-align: center;
    font-weight: 800;
    color: var(--primary);
    padding: 8px 0 !important;
    border-bottom: 1px solid var(--card-border) !important;
  }

  #payrollReportBox table tbody td[colspan]::before,
  #finReportBox table tbody td[colspan]::before {
    content: none;
  }
}

/* --- تحسين بطاقات الطلاب/الموظفين على الجوال --- */
@media (max-width: 480px) {
  .student-item,
  .log-item,
  .bus-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }

  .action-btns-group {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }

  .student-info h4 {
    font-size: 0.95rem;
  }
}
/* ============================================================
   ✅ Skeleton Loaders (بند 15)
   ============================================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--hover-bg) 25%,
    var(--active-bg) 50%,
    var(--hover-bg) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
  display: block;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-text-sm {
  height: 10px;
  margin-bottom: 6px;
}

.skeleton-title {
  height: 18px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.skeleton-card .skeleton-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.skeleton-card .skeleton-circle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.skeleton-card .skeleton-info {
  flex: 1;
}

/* ✅ للوضع الداكن */
[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 200% 100%;
}
/* ============================================================
   ✅ Dark Mode للأيقونات (بند 14)
   ============================================================ */

/* ✅ الأيقونات الفاتحة اللي بتبان غامقة في الوضع الداكن */
[data-theme="dark"] .brand-logo-img,
[data-theme="dark"] .hero-logo-img {
  filter: brightness(1.2) drop-shadow(0 2px 8px rgba(99, 102, 241, 0.5));
}

/* ✅ أيقونات Font Awesome (لو بتبان غامقة) */
[data-theme="dark"] .fa-solid,
[data-theme="dark"] .fa-brands,
[data-theme="dark"] .fa-regular {
  /* مش محتاج filter — الألوان في theme.css بتتكفل */
}

/* ✅ الأيقونات في admin-card */
[data-theme="dark"] .admin-card-icon {
  background: rgba(99, 102, 241, 0.2) !important;
}

/* ✅ الأيقونات في mpc-icon-wrap */
[data-theme="dark"] .mpc-icon-wrap {
  background: rgba(99, 102, 241, 0.2) !important;
}
/* ============================================================
   ✅ Financial Report V2 Styles
   ============================================================ */
#financialReportModalV2 .report-container {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 24px !important;
  border-radius: 12px;
  margin: 0 auto;
  direction: rtl;
}
#financialReportModalV2 .report-header-centered { text-align: center; border-bottom: 3px solid #1e40af; padding-bottom: 16px; margin-bottom: 20px; }
#financialReportModalV2 .report-logo { width: 80px; height: 80px; object-fit: contain; display: block; margin: 0 auto 10px; }
#financialReportModalV2 .report-app-name { font-size: 1.5rem; font-weight: 800; color: #1e40af; margin: 0; }
#financialReportModalV2 .report-app-subtitle { font-size: 0.85rem; color: #64748b; margin: 4px 0 0; }
#financialReportModalV2 .report-title { font-size: 1.2rem; font-weight: 800; color: #1e40af; margin: 12px 0; }
#financialReportModalV2 .report-meta { font-size: 0.85rem; color: #64748b; background: #f8fafc; padding: 10px; border-radius: 8px; line-height: 1.7; }
#financialReportModalV2 .report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
#financialReportModalV2 .report-stat { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; text-align: center; }
#financialReportModalV2 .report-stat h3 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
#financialReportModalV2 .report-stat p { font-size: 0.75rem; color: #64748b; margin: 0; }
#financialReportModalV2 .report-section h4 { font-size: 1rem; font-weight: 800; color: #1e40af; margin: 0 0 10px; }
#financialReportModalV2 .report-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
#financialReportModalV2 .report-table th { background: #1e40af; color: #fff; padding: 8px; text-align: right; font-weight: 700; }
#financialReportModalV2 .report-table td { padding: 6px 8px; border: 1px solid #e2e8f0; color: #0f172a; }
#financialReportModalV2 .report-table tr:nth-child(even) { background: #f8fafc; }
#financialReportModalV2 .report-footer { margin-top: 20px; padding-top: 12px; border-top: 2px solid #e2e8f0; text-align: center; font-size: 0.75rem; color: #94a3b8; }

@media (max-width: 600px) {
  #financialReportModalV2 .report-stats { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  body * { visibility: hidden; }
  #financialReportModalV2 .report-container,
  #financialReportModalV2 .report-container * { visibility: visible; }
  #financialReportModalV2 .report-container { position: absolute; top: 0; right: 0; left: 0; padding: 15mm !important; }
}
