/* ============================================================
   YIM-SARL — Admin CSS
   Palette extraite du logo YIM :
     Rouge     #e8132b  • Rouge clair  #f0435b  • Rouge foncé  #b50e21
     Orange    #f5a11a  • Magenta      #cc1e8a  • Cyan          #29b5e8
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
    --primary: #e8132b;
    --primary-light: #f0435b;
    --primary-dark: #b50e21;
    --primary-xlight: #fde8eb;

    --secondary: #f5a11a;
    --secondary-light: #f8bc52;
    --secondary-xlight: #fef3d7;

    --magenta: #cc1e8a;
    --magenta-light: #e040a6;
    --cyan: #29b5e8;
    --cyan-light: #5eccf1;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f5a11a;
    --info: #29b5e8;

    --dark: #1a0a0e;
    --card: #f9fafb;
    --background: #ffffff;
    --text-primary: #1a0a0e;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --sidebar-bg: #f9fafb;
    --sidebar-text: #374151;

    --radius: 14px;
    --sidebar-width: 230px;
    --sidebar-collapsed: 70px;
    --header-height: 70px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .10), 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .10), 0 4px 6px -2px rgba(0, 0, 0, .05);
}

[data-theme="dark"] {
    --primary: #f0435b;
    --primary-light: #f76a7e;
    --primary-xlight: rgba(232, 19, 43, .15);
    --card: #2a1218;
    --background: #1a0a0e;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border: #4b1f2a;
    --sidebar-bg: #220d13;
    --sidebar-text: #f1c3c8;
    --shadow: 0 1px 3px rgba(0, 0, 0, .35);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .35);
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--card);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    transition: all .3s;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 70px;
    flex-shrink: 0;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(232, 19, 43, .35);
}

.logo-text {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    transition: all .3s;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: .75rem 0;
    flex: 1;
}

.nav-section-title {
    padding: .6rem 1.5rem .3rem;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary);
    transition: all .3s;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: .65rem 1.25rem;
    margin: .15rem .75rem;
    width: calc(100% - 1.5rem);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .2s;
    border-radius: 8px;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    transform: scaleY(0);
    transition: transform .2s;
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item:hover {
    background: var(--primary-xlight);
    color: var(--primary);
    padding-left: 1.6rem;
}

.nav-item.active {
    background: var(--primary-xlight);
    color: var(--primary);
    font-weight: 700;
}

.nav-item i {
    width: 20px;
    margin-right: .65rem;
    font-size: 17px;
    opacity: .75;
    transition: all .2s;
    flex-shrink: 0;
}

.nav-item:hover i,
.nav-item.active i {
    opacity: 1;
    transform: scale(1.1);
    color: var(--primary);
}

.nav-text {
    white-space: nowrap;
    transition: all .3s;
}

.logout-item {
    color: var(--danger) !important;
}

.logout-item::before {
    background: var(--danger) !important;
}

.logout-item:hover {
    background: rgba(220, 38, 38, .07) !important;
    color: var(--danger) !important;
}

.nav-footer {
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left .3s;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: .9rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
}

.desktop-sidebar-toggle {
    display: flex;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
}

.desktop-sidebar-toggle:hover,
.sidebar-toggle:hover {
    background: var(--card);
}

.school-info h1 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
}

.school-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

.academic-year-indicator {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: .4rem .9rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 2px 8px rgba(232, 19, 43, .3);
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all .2s;
    font-size: 19px;
}

.icon-btn:hover {
    background: var(--card);
    color: var(--primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid var(--border);
    position: relative;
}

.user-menu:hover {
    background: var(--card);
}

.user-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.user-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.user-arrow {
    color: var(--text-secondary);
    transition: transform .3s;
    font-size: 16px;
}

.user-menu.active .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 200;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.dropdown-header {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background .2s;
}

.dropdown-item:hover {
    background: var(--card);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

/* ══════════════════════════════════════════════════════════
   PAGE
══════════════════════════════════════════════════════════ */
.page-content {
    padding: 1.75rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: .2rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}

.page-actions {
    display: flex;
    gap: .65rem;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 0;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: all .3s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

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

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ══════════════════════════════════════════════════════════
   STATS
══════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.4rem;
    border: 1px solid var(--border);
    transition: all .3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity .3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 19, 43, .12);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .9rem;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #fff;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 3px 10px rgba(232, 19, 43, .3);
}

.stat-icon.secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    box-shadow: 0 3px 10px rgba(245, 161, 26, .3);
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-light));
    box-shadow: 0 3px 10px rgba(41, 181, 232, .3);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success), #22c55e);
    box-shadow: 0 3px 10px rgba(22, 163, 74, .3);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning), #f8bc52);
    box-shadow: 0 3px 10px rgba(245, 161, 26, .3);
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger), #ef4444);
    box-shadow: 0 3px 10px rgba(220, 38, 38, .3);
}

.stat-icon.magenta {
    background: linear-gradient(135deg, var(--magenta), var(--magenta-light));
    box-shadow: 0 3px 10px rgba(204, 30, 138, .3);
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: .2rem;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.btn {
    padding: .65rem 1.3rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 2px 8px rgba(232, 19, 43, .25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 19, 43, .4);
}

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

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 161, 26, .25);
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245, 161, 26, .4);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-1px);
}

.btn-info {
    background: var(--cyan);
    color: #fff;
    box-shadow: 0 2px 8px rgba(41, 181, 232, .25);
}

.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(41, 181, 232, .4);
}

.btn-magenta {
    background: linear-gradient(135deg, var(--magenta), var(--magenta-light));
    color: #fff;
}

.btn-magenta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(204, 30, 138, .4);
}

.btn-sm {
    padding: .35rem .75rem;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: .9rem;
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label .req {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    padding: .7rem .95rem;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    background: var(--background);
    color: var(--text-primary);
    font-size: 13.5px;
    transition: all .2s;
    font-family: inherit;
    width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 19, 43, .1);
}

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

.form-hint {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ══════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════ */
.badge {
    padding: .25rem .7rem;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.badge-success {
    background: rgba(22, 163, 74, .12);
    color: var(--success);
}

.badge-danger {
    background: rgba(220, 38, 38, .12);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 161, 26, .12);
    color: var(--secondary);
}

.badge-info {
    background: rgba(41, 181, 232, .12);
    color: var(--cyan);
}

.badge-secondary {
    background: rgba(107, 114, 128, .12);
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--primary-xlight);
    color: var(--primary);
}

.badge-magenta {
    background: rgba(204, 30, 138, .12);
    color: var(--magenta);
}

.badge-orange {
    background: rgba(245, 161, 26, .12);
    color: var(--secondary);
}

/* ══════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════ */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: .8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-primary);
    vertical-align: middle;
}

.table th {
    background: var(--background);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: rgba(232, 19, 43, .03);
}

.font-mono {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* ══════════════════════════════════════════════════════════
   ACTION BUTTONS
══════════════════════════════════════════════════════════ */
.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-size: 15px;
}

.action-btn.view {
    background: rgba(41, 181, 232, .12);
    color: var(--cyan);
}

.action-btn.edit {
    background: rgba(245, 161, 26, .12);
    color: var(--secondary);
}

.action-btn.delete {
    background: rgba(220, 38, 38, .12);
    color: var(--danger);
}

.action-btn.print {
    background: var(--primary-xlight);
    color: var(--primary);
}

.action-btn.magenta {
    background: rgba(204, 30, 138, .12);
    color: var(--magenta);
}

.action-btn:hover {
    transform: scale(1.12);
}

.action-btns {
    display: flex;
    gap: .35rem;
}

/* ══════════════════════════════════════════════════════════
   OVERLAY
══════════════════════════════════════════════════════════ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity .3s;
}

.overlay.show {
    display: block;
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════════════ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: 0 0 1.25rem;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--background);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    animation: modalIn .25s ease;
}

.modal-content.modal-lg {
    max-width: 720px;
}

@keyframes modalIn {
    from {
        transform: scale(.95) translateY(-10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 3px solid var(--primary);
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 7px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--card);
    color: var(--danger);
}

.modal-body {
    padding: 1.4rem;
}

.modal-footer {
    padding: .9rem 1.4rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
}

/* ══════════════════════════════════════════════════════════
   FLASH MESSAGES
══════════════════════════════════════════════════════════ */
.flash-container {
    margin-bottom: 1.25rem;
}

.flash {
    padding: .9rem 1.1rem;
    border-radius: 9px;
    margin-bottom: .65rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: 13.5px;
    font-weight: 500;
    animation: fadeInDown .3s ease;
}

.flash-success {
    background: rgba(22, 163, 74, .10);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, .2);
}

.flash-error {
    background: rgba(220, 38, 38, .10);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, .2);
}

.flash-warning {
    background: rgba(245, 161, 26, .10);
    color: var(--secondary);
    border: 1px solid rgba(245, 161, 26, .2);
}

.flash-info {
    background: rgba(41, 181, 232, .10);
    color: var(--cyan);
    border: 1px solid rgba(41, 181, 232, .2);
}

.flash-primary {
    background: var(--primary-xlight);
    color: var(--primary);
    border: 1px solid rgba(232, 19, 43, .2);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 44px;
    margin-bottom: .75rem;
    opacity: .35;
    display: block;
}

.empty-state p {
    font-size: 13.5px;
}

/* ══════════════════════════════════════════════════════════
   INFO LIST
══════════════════════════════════════════════════════════ */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.info-value {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════
   CAISSE / BALANCE CARD
══════════════════════════════════════════════════════════ */
.caisse-balance {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    border-radius: var(--radius);
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(232, 19, 43, .35);
}

.caisse-balance .amount {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

.caisse-balance .label {
    font-size: 14px;
    opacity: .85;
    margin-top: .4rem;
}

/* ══════════════════════════════════════════════════════════
   HIGHLIGHT STRIP (barre accent en haut des sections)
══════════════════════════════════════════════════════════ */
.accent-strip {
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 40%, var(--magenta) 70%, var(--cyan) 100%);
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BARS
══════════════════════════════════════════════════════════ */
.progress {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width .6s ease;
}

.progress-bar.info {
    background: linear-gradient(90deg, var(--cyan), var(--cyan-light));
}

.progress-bar.magenta {
    background: linear-gradient(90deg, var(--magenta), var(--magenta-light));
}

.progress-bar.success {
    background: linear-gradient(90deg, var(--success), #22c55e);
}

/* ══════════════════════════════════════════════════════════
   GRID HELPERS
══════════════════════════════════════════════════════════ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.gap-1 {
    gap: .5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.fw-700 {
    font-weight: 700;
}

.text-xs {
    font-size: 11.5px;
}

.text-sm {
    font-size: 13px;
}

.text-muted {
    color: var(--text-secondary);
}

.text-danger {
    color: var(--danger) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-orange {
    color: var(--secondary) !important;
}

.text-cyan {
    color: var(--cyan) !important;
}

.text-magenta {
    color: var(--magenta) !important;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: .5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: .5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-6 {
    padding: 1.5rem;
}

/* ══════════════════════════════════════════════════════════
   PRINT
══════════════════════════════════════════════════════════ */
@media print {

    .sidebar,
    .header,
    .page-actions,
    .action-btns,
    .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════ */
.loading {
    opacity: 0;
    animation: fadeInUp .5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:nth-child(1) {
    animation-delay: .05s;
}

.stat-card:nth-child(2) {
    animation-delay: .10s;
}

.stat-card:nth-child(3) {
    animation-delay: .15s;
}

.stat-card:nth-child(4) {
    animation-delay: .20s;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media(max-width:1024px) {
    .desktop-sidebar-toggle {
        display: none;
    }
}

@media(max-width:768px) {
    .sidebar {
        transform: translateX(-250px);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .header {
        padding: .9rem 1rem;
    }

    .page-content {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        justify-content: stretch;
    }

    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .user-name,
    .academic-year-indicator {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

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