﻿/* ===== CSS Variables & Design System ===== */
:root {
    --primary: #1a56db;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --primary-glow: rgba(59, 130, 246, 0.15);

    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.15);

    --success: #059669;
    --success-light: #34d399;
    --success-bg: rgba(5, 150, 105, 0.1);

    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --info-bg: rgba(8, 145, 178, 0.1);

    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --bg-input: rgba(15, 23, 42, 0.6);
    --bg-header: rgba(15, 23, 42, 0.9);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    --border: rgba(148, 163, 184, 0.15);
    --border-focus: rgba(59, 130, 246, 0.5);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.2);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== Base Reset ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Background Decoration ===== */
.bg-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent);
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.bg-circle-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent);
    bottom: -150px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

.bg-circle-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.2), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(10px, -10px) scale(1.02);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* ===== Header ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    color: var(--primary-light);
    flex-shrink: 0;
    animation: spin-slow 30s linear infinite;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logo-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-action svg {
    width: 18px;
    height: 18px;
}

.btn-action-secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.btn-action-secondary:hover {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.btn-action-official {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
}

.btn-action-official:hover {
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
}

/* ===== Tab Navigation ===== */
.tab-nav {
    position: sticky;
    top: 65px;
    z-index: 90;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}

.tab-nav-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-nav-inner::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent-light));
    border-radius: 3px 3px 0 0;
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ===== Tab Panels ===== */
.tab-panel {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.panel-header h2 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-light);
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.panel-header .bilingual {
    font-family: 'Roboto', sans-serif;
    color: var(--text-muted);
    font-style: italic;
    direction: ltr;
    text-align: right;
}

/* ===== Cards ===== */
.card {
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-xl);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.badge {
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(220, 38, 38, 0.15);
    color: #ef4444;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(8, 145, 178, 0.25);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-light);
    border-color: rgba(5, 150, 105, 0.25);
}

/* ===== Forms ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.form-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group select {
    cursor: pointer;
}

.static-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.6rem 0;
}

.value-highlight {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.value-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== Salary Table ===== */
.salary-table-container {
    overflow-x: auto;
    padding: 0.5rem;
}

.salary-input-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.salary-input-table th {
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.salary-input-table .year-header {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-light);
    font-size: 0.9rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.salary-input-table .sub-header {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.salary-col {
    color: var(--success-light) !important;
}

.bonus-col {
    color: var(--accent-light) !important;
}

.month-col {
    min-width: 100px;
}

.salary-input-table td {
    padding: 0.3rem;
    text-align: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.salary-input-table td.month-name {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    padding-right: 0.75rem;
}

.salary-input-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.salary-input-table input {
    width: 100%;
    min-width: 75px;
    padding: 0.35rem 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.3);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.82rem;
    text-align: center;
    outline: none;
    transition: var(--transition-fast);
}

.salary-input-table input:hover {
    border-color: var(--border);
    background: var(--bg-input);
}

.salary-input-table input:focus {
    border-color: var(--primary-light);
    background: var(--bg-input);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    opacity: 0.1;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.stat-card-primary::before {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stat-card-accent::before {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.stat-card-info::before {
    background: linear-gradient(135deg, var(--info), #06b6d4);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(59, 130, 246, 0.25);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
}

.stat-card-accent .stat-icon {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.stat-card-info .stat-icon {
    background: var(--info-bg);
    color: var(--info);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== Contribution Table ===== */
.contribution-table-wrapper {
    overflow-x: auto;
    padding: 0.5rem;
}

.contribution-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.contribution-table th,
.contribution-table td {
    padding: 0.5rem 0.6rem;
    text-align: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.period-header {
    padding: 0.6rem !important;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--border) !important;
}

.period-1 {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.period-2 {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

.period-3 {
    background: rgba(5, 150, 105, 0.1);
    color: #34d399;
}

.period-4 {
    background: rgba(217, 119, 6, 0.1);
    color: #fbbf24;
}

.period-5 {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
}

.sub-h {
    font-size: 0.72rem !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

.contribution-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.contribution-table tbody td:nth-child(3n+1) {
    font-weight: 600;
    color: var(--text-primary);
}

.contribution-table tbody td:nth-child(3n+2) {
    color: var(--text-secondary);
}

.contribution-table tbody td:nth-child(3n) {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.total-row {
    background: rgba(59, 130, 246, 0.05) !important;
}

.total-row td {
    padding: 0.8rem 0.6rem !important;
    border-top: 2px solid var(--border) !important;
    font-weight: 700;
}

.total-value {
    font-size: 0.95rem;
    color: var(--primary-light) !important;
}

.total-label {
    font-size: 0.75rem;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

/* ===== Table Footer ===== */
.table-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-value {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.9rem;
}

.footer-totals {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.footer-total-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-total-item span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.footer-total-item strong {
    font-size: 1.25rem;
    color: var(--primary-light);
}

.footer-stamp {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Attestation Card ===== */
.attestation-card {
    padding: 2rem;
}

.attestation-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.attestation-title {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.attestation-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.attestation-section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.attestation-section-title h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.attestation-section-title p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.attestation-body {
    margin-bottom: 1.5rem;
}

.att-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.att-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.att-field label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.att-field-lg {
    flex: 2;
}

.att-field-full {
    flex: 1;
    width: 100%;
}

.att-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    direction: ltr;
}

.att-value-highlight {
    color: var(--primary-light);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.2rem 0.6rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.att-divider {
    height: 1px;
    background: var(--border);
    margin: 0.75rem 0;
}

/* ===== Category Boxes ===== */
.category-boxes,
.category-boxes-bi {
    display: flex;
    gap: 1rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.cat-box,
.cat-box-bi {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.cat-box:hover,
.cat-box-bi:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.cat-checkbox,
.cat-checkbox-bi {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: transparent;
    transition: var(--transition);
}

.cat-checkbox.checked,
.cat-checkbox-bi.checked {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.cat-label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Attestation Footer ===== */
.attestation-footer {
    margin-top: 1.5rem;
}

.att-legal {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.att-warning {
    padding: 1rem 1.25rem;
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius-md);
}

.att-warning h5 {
    color: #f87171;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.att-warning p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Bilingual Card ===== */
.bi-title-section {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.bi-title-ar {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.bi-title-fr {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-light);
    font-family: 'Roboto', sans-serif;
    direction: ltr;
}

.bi-subtitle-ar {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.bi-subtitle-fr {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'Roboto', sans-serif;
    direction: ltr;
}

.bi-section {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
}

.bi-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bi-row-inline {
    justify-content: flex-start;
}

.bi-col {
    flex: 1;
    min-width: 150px;
}

.bi-col-lg {
    flex: 2;
}

.bi-label-fr {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: 'Roboto', sans-serif;
    direction: ltr;
    display: block;
}

.bi-value {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 0.95rem;
}

.bi-value-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.bi-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

.bi-legal-section {
    margin: 1rem 0;
}

.bi-legal-ar,
.bi-legal-fr {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.bi-legal-fr {
    direction: ltr;
    text-align: left;
    font-family: 'Roboto', sans-serif;
    border-top: 1px solid var(--border);
}

.bi-ar-section {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.08);
}

.bi-ar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    flex-wrap: wrap;
}

.bi-ar-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.bi-recommendations {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(217, 119, 6, 0.05);
    border: 1px solid rgba(217, 119, 6, 0.15);
    border-radius: var(--radius-md);
}

.rec-title-ar {
    color: var(--warning);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.rec-title-fr {
    color: var(--warning);
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    direction: ltr;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.rec-text-ar {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.rec-text-fr {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Roboto', sans-serif;
    direction: ltr;
    text-align: left;
    line-height: 1.8;
}

.rec-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(217, 119, 6, 0.15);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: 'Roboto', sans-serif;
    direction: ltr;
}

/* ===== Footer ===== */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: white;
        color: #000;
        font-size: 10pt;
    }

    .bg-decoration,
    .app-header,
    .tab-nav,
    .panel-header,
    .app-footer,
    .btn-action,
    .stats-grid {
        display: none !important;
    }

    .tab-panel {
        display: none !important;
    }

    .tab-panel.print-active {
        display: block !important;
    }

    .main-content {
        padding: 0;
        max-width: 100%;
    }

    .glass-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
        backdrop-filter: none;
    }

    .card-header {
        background: #f5f5f5;
    }

    .attestation-title {
        -webkit-text-fill-color: #1a56db;
        color: #1a56db;
    }

    .att-value-highlight {
        background: #eef;
        border-color: #ccd;
    }

    .period-1,
    .period-2,
    .period-3,
    .period-4,
    .period-5 {
        color: #000 !important;
    }

    .stat-value,
    .total-value,
    .bi-value,
    .att-value,
    .footer-value,
    .value-highlight {
        color: #1a56db !important;
        -webkit-text-fill-color: initial;
    }

    * {
        color: #000;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .logo-text h1 {
        font-size: 0.95rem;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn {
        padding: 0.75rem;
    }

    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-footer {
        grid-template-columns: 1fr;
    }

    .footer-totals {
        grid-template-columns: 1fr;
    }

    .category-boxes,
    .category-boxes-bi {
        flex-direction: column;
    }

    .attestation-card {
        padding: 1rem;
    }

    .panel-header h2 {
        font-size: 1.2rem;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* ===== Notification Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-xl);
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    z-index: 1000;
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    border-color: rgba(5, 150, 105, 0.3);
}

/* ===== App Footer ===== */
.app-footer {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Animated gradient top border */
.footer-glow-border {
    height: 3px;
    background: linear-gradient(90deg,
            var(--primary-dark),
            var(--primary-light),
            var(--accent-light),
            var(--primary-light),
            var(--primary-dark));
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 3rem 2rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 3rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Brand section */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.25rem;
}

.footer-brand-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-light);
    flex-shrink: 0;
}

.footer-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-title-icon {
    color: var(--primary-light);
    font-size: 1rem;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.9;
    margin: 0;
}

.footer-desc strong {
    color: var(--primary-light);
    font-weight: 700;
}

/* Contact List */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.08);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    direction: ltr;
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.contact-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-light);
    font-size: 0.85rem;
    transition: all 0.3s;
}

.contact-item:hover .contact-icon-box {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

/* Social Links */
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(30, 41, 59, 0.5);
}

.social-link i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.social-link span {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.social-link:hover {
    transform: translateX(-4px);
}

/* Facebook */
.social-facebook {
    color: #8b9dc3;
}

.social-facebook i {
    background: rgba(59, 89, 152, 0.15);
    color: #3b5998;
}

.social-facebook:hover {
    background: rgba(59, 89, 152, 0.1);
    border-color: rgba(59, 89, 152, 0.3);
    color: #3b5998;
}

.social-facebook:hover i {
    background: rgba(59, 89, 152, 0.25);
    box-shadow: 0 0 15px rgba(59, 89, 152, 0.3);
}

/* Twitter */
.social-twitter {
    color: #8ecdf7;
}

.social-twitter i {
    background: rgba(29, 161, 242, 0.15);
    color: #1da1f2;
}

.social-twitter:hover {
    background: rgba(29, 161, 242, 0.1);
    border-color: rgba(29, 161, 242, 0.3);
    color: #1da1f2;
}

.social-twitter:hover i {
    background: rgba(29, 161, 242, 0.25);
    box-shadow: 0 0 15px rgba(29, 161, 242, 0.3);
}

/* Instagram */
.social-instagram {
    color: #f0a0af;
}

.social-instagram i {
    background: rgba(228, 64, 95, 0.15);
    color: #e4405f;
}

.social-instagram:hover {
    background: rgba(228, 64, 95, 0.1);
    border-color: rgba(228, 64, 95, 0.3);
    color: #e4405f;
}

.social-instagram:hover i {
    background: rgba(228, 64, 95, 0.25);
    box-shadow: 0 0 15px rgba(228, 64, 95, 0.3);
}

/* LinkedIn */
.social-linkedin {
    color: #80bbda;
}

.social-linkedin i {
    background: rgba(0, 119, 181, 0.15);
    color: #0077b5;
}

.social-linkedin:hover {
    background: rgba(0, 119, 181, 0.1);
    border-color: rgba(0, 119, 181, 0.3);
    color: #0077b5;
}

.social-linkedin:hover i {
    background: rgba(0, 119, 181, 0.25);
    box-shadow: 0 0 15px rgba(0, 119, 181, 0.3);
}

/* Divider */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent 5%,
            rgba(59, 130, 246, 0.3) 30%,
            rgba(139, 92, 246, 0.3) 50%,
            rgba(59, 130, 246, 0.3) 70%,
            transparent 95%);
    margin: 2.5rem 0 1.5rem;
}

/* Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-credit {
    font-size: 0.92rem;
    margin: 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-credit span {
    opacity: 0.7;
}

.footer-credit a {
    color: #f093fb;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    position: relative;
}

.footer-credit a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f093fb, #a78bfa);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.footer-credit a:hover {
    color: #e879f9;
    text-shadow: 0 0 15px rgba(240, 147, 251, 0.5);
}

.footer-credit a:hover::after {
    width: 100%;
}

.footer-copyright {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-grid .footer-col:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-content {
        padding: 2rem 1.25rem 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-grid .footer-col:first-child {
        grid-column: auto;
    }

    .footer-social {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .social-link {
        flex: 1;
        min-width: 130px;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}


