/* ========================================
   ADMIN-STYLES.CSS - Système de gestion unifié
   Version: 3.0 (Université Chouaib Doukkali)
   ======================================== */

/* ========================================
   1. VARIABLES & RESET - Nouvelle palette
   ======================================== */
:root {
    /* Couleurs principales - Université Chouaib Doukkali */
    --primary-color: #1a5276;      /* Bleu foncé */
    --primary-dark: #0e2f44;       /* Bleu très foncé */
    --primary-light: #5b8db8;      /* Bleu clair */
    --primary-bg: #e8f0f8;         /* Bleu très clair */
    --primary-gradient: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);

    --secondary-color: #2e86c1;    /* Bleu moyen */
    --secondary-dark: #1a5276;     /* Bleu foncé */
    --secondary-light: #85c1e9;    /* Bleu clair */
    --secondary-bg: #d6eaf8;       /* Bleu très clair */

    --accent-color: #27ae60;       /* Vert */
    --accent-dark: #1e8449;        /* Vert foncé */
    --accent-light: #82e0aa;       /* Vert clair */
    --accent-bg: #d5f5e3;          /* Vert très clair */

    --danger-color: #e74c3c;
    --danger-dark: #c0392b;
    --danger-light: #f5b7b1;
    --danger-bg: #fdedec;

    --warning-color: #f39c12;
    --warning-dark: #d68910;
    --warning-light: #f9e79f;
    --warning-bg: #fef9e7;

    --success-color: #27ae60;
    --success-dark: #1e8449;
    --success-light: #82e0aa;
    --success-bg: #d5f5e3;

    --info-color: #2e86c1;
    --info-dark: #1a5276;
    --info-light: #85c1e9;
    --info-bg: #d6eaf8;

    /* Couleurs neutres */
    --border-color: #d4dce8;
    --border-light: #e8edf3;
    --text-color: #1a2a3a;
    --text-light: #4a5a6a;
    --text-muted: #7f8c9a;
    --bg-color: #f0f4f9;
    --bg-white: #ffffff;
    --bg-light: #f7f9fc;
    --bg-hover: #eef3f8;
    --bg-dark: #1a2a3a;

    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(26, 82, 118, 0.12);
    --shadow: 0 2px 10px rgba(26, 82, 118, 0.1);
    --shadow-lg: 0 5px 30px rgba(26, 82, 118, 0.25);
    --shadow-hover: 0 4px 15px rgba(26, 82, 118, 0.18);

    /* Espacements */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;

    /* Bordures */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 0.2s;
    --transition: 0.3s;
    --transition-slow: 0.5s;

    /* Typographie */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 24px;
}

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

html, body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================
   2. HEADER (principal) - Nouveau style
   ======================================== */
.app-header {
    background: var(--primary-gradient);
    color: #fff;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.logo i {
    font-size: 1.8rem;
    color: #fff;
}

.logo .logo-text {
    color: #fff;
}

.logo .logo-text .accent {
    color: #82e0aa;
}

.header-nav {
    display: flex;
    align-items: center;
}

.header-nav ul {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-nav ul li a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.header-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.header-nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #82e0aa;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 1rem 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-profile i {
    font-size: 1.6rem;
    color: #82e0aa;
}

/* ========================================
   3. SECONDARY NAV - Nouveau style
   ======================================== */
.secondary-nav {
    background: var(--bg-white);
    border-bottom: 2px solid var(--primary-color);
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(26, 82, 118, 0.08);
    position: sticky;
    top: 70px;
    z-index: 999;
    flex-shrink: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.nav-container > ul {
    display: flex;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-container > ul li {
    display: inline-block;
}

.nav-container > ul li a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s;
}

.nav-container > ul li a:hover {
    background: var(--secondary-bg);
    color: var(--primary-color);
}

.nav-container > ul li a.active {
    background: var(--primary-color);
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
}

.nav-actions .badge {
    background: var(--accent-color);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   4. FOOTER - Nouveau style
   ======================================== */
.app-footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 1.2rem 2rem;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 3px solid var(--primary-color);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.footer-left {
    font-size: 0.85rem;
}

.footer-left .footer-logo {
    color: #82e0aa;
    font-weight: 600;
}

.footer-center ul {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-center ul li a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.footer-center ul li a:hover {
    color: #82e0aa;
}

.footer-right {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-right .fa-heart {
    color: #82e0aa;
}

/* ========================================
   5. MAIN CONTENT
   ======================================== */
.main-content {
    flex: 1 0 auto;
    padding: 2rem 2rem 3rem;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   6. LAYOUT & CONTAINERS
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Page Header interne */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.page-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 0.2rem;
}

/* Header legacy (pour compatibilité) */
.header {
    background: var(--bg-white);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid var(--primary-color);
}

.header h1 {
    color: var(--primary-color);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xs);
}

.header p {
    color: var(--text-light);
    font-size: var(--font-size-md);
}

/* ========================================
   7. SEARCH SECTION
   ======================================== */
.search-section {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-lg);
    border-top: 3px solid var(--primary-color);
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}


.search-form .search-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-end;
    grid-column: 1 / -1;
    flex-wrap: wrap;
}

/* ========================================
   8. FORM ELEMENTS
   ======================================== */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

.form-group label .required {
    color: var(--danger-color);
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-md);
    font-family: inherit;
    transition: var(--transition-fast);
    background: var(--bg-white);
    color: var(--text-color);
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

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

.form-group .help-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* ========================================
   9. BUTTONS - Nouveau style
   ======================================== */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Button variants */
.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    box-shadow: 0 2px 8px rgba(46, 134, 193, 0.3);
}

.btn-success {
    background: var(--success-bg);
    color: var(--success-dark);
}

.btn-success:hover {
    background: var(--success-dark);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

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

.btn-danger:hover {
    background: var(--danger-dark);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: var(--warning-dark);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: var(--info-dark);
    box-shadow: 0 2px 8px rgba(46, 134, 193, 0.3);
}

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

.btn-accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.btn-icon {
    padding: var(--spacing-sm);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
}

/* ========================================
   10. TABLES - Nouveau style
   ======================================== */
.table-container {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    border-top: 3px solid var(--primary-color);
}

.table-wrapper {
    overflow-x: auto;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-md);
}

thead {
    background: var(--primary-gradient);
    color: white;
}

thead th {
    padding: var(--spacing-md) var(--spacing-md);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

thead th.sortable {
    cursor: pointer;
    user-select: none;
}

thead th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

thead th .sort-icon {
    margin-left: var(--spacing-xs);
    opacity: 0.5;
}

tbody td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr:hover td {
    background: var(--secondary-bg);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr.selected {
    background: var(--primary-bg);
}

/* Table empty state */
.table-empty {
    text-align: center;
    padding: var(--spacing-xl) !important;
    color: var(--text-muted);
}

.table-empty .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--spacing-md);
}

/* ========================================
   11. BADGES & STATUS - Nouveau style
   ======================================== */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-xl);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Badge colors */
.badge-primary {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.badge-secondary {
    background: var(--secondary-bg);
    color: var(--secondary-dark);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-dark);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info-dark);
}

.badge-accent {
    background: var(--accent-bg);
    color: var(--accent-dark);
}

.badge-active {
    background: var(--accent-bg);
    color: var(--accent-dark);
}

.badge-inactive {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

/* Concours status badges */
.badge-ouvert {
    background: var(--accent-bg);
    color: var(--accent-dark);
}

.badge-ferme {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

.badge-en-cours {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.badge-termine {
    background: var(--info-bg);
    color: var(--info-dark);
}

/* ========================================
   12. PAGINATION - Nouveau style
   ======================================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.pagination-info {
    font-size: var(--font-size-md);
    color: var(--text-light);
}

.pagination-buttons {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

.pagination-buttons button {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--font-size-sm);
    color: var(--text-color);
    min-width: 36px;
    text-align: center;
}

.pagination-buttons button:hover:not(:disabled):not(.active) {
    background: var(--secondary-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-buttons button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================================
   13. MODAL - Nouveau style
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 42, 58, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: var(--spacing-lg);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-large {
    max-width: 800px;
}

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

.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-bg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}
.modal-body .form-group label {
    color: var(--text-color); /* Changes #666 to your dark #333 text color */
    font-weight: 700;         /* Makes text slightly thicker for clarity */
}
/* ========================================
   FIX BACKGROUND TRANSPARENT (Nouveau Concours)
   ======================================== */

.modal-body {
    background-color: #ffffff !important;
    position: relative !important;
}
.modal-body form {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* هنا درنا 3 أعمدة */
    gap: 20px !important;
    padding: 20px 0 !important;
}
.modal-body h3 {
    grid-column: 1 / -1;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #1a5276;
    border-bottom: 2px solid #e8f0f8;
    padding-bottom: 5px;
}

/* جعل حقول معينة تأخذ كامل العرض إذا لزم الأمر */
.modal-body .full-width {
    grid-column: 1 / -1;
}
.modal-body .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.modal-body .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d4dce8;
    border-radius: 4px;
}


.modal-body .tabs,
.modal-body .tab-content,
.modal-body .tab-pane {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: none !important;
}


/* جعل العناوين (Informations Personnelles) تأخذ كامل العرض */
.modal-body h3 {
    grid-column: 1 / -1;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #1a5276;
    border-bottom: 2px solid #e8f0f8;
    padding-bottom: 5px;
}
.modal-body .full-width {
    grid-column: 1 / -1;
}


.modal-body .form-group:has(textarea),
.modal-body .form-group.full-width {
    grid-column: span 2 !important;
}

/* ========================================
   14. TABS - Nouveau style
   ======================================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: var(--spacing-lg);
    gap: 0;
    overflow-x: auto;
}

.tab-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--secondary-bg);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

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

.tab-content.active {
    display: block;
}

/* ========================================
   15. MEMBERS MANAGEMENT
   ======================================== */
.members-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    background: var(--bg-light);
}

.members-list {
    min-height: 50px;
    margin-bottom: var(--spacing-sm);
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-xs);
    animation: slideIn 0.3s ease;
}

.member-item .member-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.member-item .member-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 20px;
    padding: 0 var(--spacing-xs);
    transition: var(--transition-fast);
    line-height: 1;
}

.member-item .member-remove:hover {
    transform: scale(1.3);
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--secondary-bg);
    color: var(--secondary-dark);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.member-badge.chef {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.add-member {
    display: flex;
    gap: var(--spacing-sm);
}

.add-member select {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-md);
}

.add-member select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ========================================
   16. DETAIL VIEW - Nouveau style
   ======================================== */
.detail-section {
    margin-bottom: var(--spacing-xl);
}

.detail-section h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.detail-item .label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item .value {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-top: var(--spacing-xs);
    word-break: break-word;
}

.detail-item .value.full-width {
    grid-column: 1 / -1;
}

.members-list-detail {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

/* ========================================
   17. LOADING STATES
   ======================================== */
.loading {
    display: none;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.loading.active {
    display: block;
}

.spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, var(--border-light) 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
    height: 20px;
    margin: var(--spacing-xs) 0;
}

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

/* ========================================
   18. TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
    width: 100%;
}

.toast {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    color: black;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--danger-color);
}

.toast-warning {
    background: var(--warning-color);
}

.toast-info {
    background: var(--info-color);
}

.toast .toast-icon {
    font-size: var(--font-size-xl);
}

.toast .toast-message {
    flex: 1;
}

.toast .toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: var(--font-size-xl);
    opacity: 0.7;
    transition: var(--transition-fast);
    padding: 0 var(--spacing-xs);
}

.toast .toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   19. DETAILS (Types de Diplômes)
   ======================================== */
.details-header {
    margin-bottom: var(--spacing-lg);
}

.details-header h3 {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.details-header p {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.details-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.details-list {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    min-height: 80px;
}

.detail-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-xs);
}

.detail-item-row .detail-info {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.detail-item-row .detail-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition-fast);
}

.detail-item-row .detail-remove:hover {
    transform: scale(1.2);
}

.add-detail {
    background: var(--bg-white);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
}

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

/* ========================================
   20. STATS CARDS - Nouveau style
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: 50%;
    color: var(--primary-color);
}

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

.stat-card .stat-label {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .stat-value {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-color);
    margin-top: var(--spacing-xs);
}

/* Different colors for stats */
.stat-card:nth-child(1) { border-left-color: var(--primary-color); }
.stat-card:nth-child(1) .stat-icon { background: var(--primary-bg); color: var(--primary-dark); }

.stat-card:nth-child(2) { border-left-color: var(--accent-color); }
.stat-card:nth-child(2) .stat-icon { background: var(--accent-bg); color: var(--accent-dark); }

.stat-card:nth-child(3) { border-left-color: var(--warning-color); }
.stat-card:nth-child(3) .stat-icon { background: var(--warning-bg); color: var(--warning-dark); }

.stat-card:nth-child(4) { border-left-color: var(--info-color); }
.stat-card:nth-child(4) .stat-icon { background: var(--info-bg); color: var(--info-dark); }

/* ========================================
   21. FILE INPUTS
   ======================================== */
input[type="file"] {
    padding: var(--spacing-sm);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    cursor: pointer;
    width: 100%;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: var(--primary-bg);
}

input[type="file"]::-webkit-file-upload-button {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    margin-right: var(--spacing-sm);
    transition: var(--transition-fast);
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-dark);
}

input[type="file"]::file-selector-button {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    margin-right: var(--spacing-sm);
    transition: var(--transition-fast);
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-dark);
}

/* ========================================
   22. GROUPEMENT (pour compatibilité)
   ======================================== */
.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.group-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: var(--transition);
    cursor: pointer;
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.group-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.group-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.group-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    flex-shrink: 0;
}

.group-title h4 {
    margin: 0;
    font-size: var(--font-size-md);
    color: var(--text-color);
}

.group-title .badge {
    font-size: var(--font-size-xs);
}

.group-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.group-stat {
    text-align: center;
    padding: var(--spacing-xs);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.group-stat .stat-number {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-color);
}

.group-stat .stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.group-progress {
    margin-bottom: var(--spacing-md);
}

.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    margin-bottom: var(--spacing-xs);
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.group-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-light);
}

/* ========================================
   23. DETAIL MODAL STYLES - Nouveau style
   ======================================== */

/* Detail Modal specific styles */
#detailModal .modal-content {
    max-width: 700px;
}

#detailModal .modal-header {
    background: var(--primary-bg);
    border-bottom: 3px solid var(--primary-color);
}

#detailModal .modal-header h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

#detailModal .modal-header h2 i {
    font-size: 24px;
}

.detail-section {
    padding: 5px 0;
}

.detail-section .detail-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-light);
}

.detail-section .detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.detail-section .detail-title {
    flex: 1;
}

.detail-section .detail-title h2 {
    margin: 0 0 5px 0;
    color: var(--text-color);
    font-size: 24px;
}

.detail-section .detail-title .detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-section .detail-title .detail-meta .badge {
    font-size: 14px;
    padding: 5px 12px;
}

.detail-section .detail-title .detail-meta .meta-text {
    color: var(--text-muted);
    font-size: 14px;
}

.detail-section .detail-title .detail-meta .meta-text i {
    margin-right: 4px;
}

.detail-section h3 {
    margin: 20px 0 15px 0;
    color: var(--text-color);
    font-size: 18px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
}

.detail-section h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item .label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-item .label i {
    margin-right: 4px;
}

.detail-item .value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    word-break: break-word;
}

.detail-item .value .badge {
    font-size: 14px;
    padding: 4px 12px;
}

.detail-item .value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
}

/* Metadata section */
.detail-metadata {
    background: var(--bg-light);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid var(--border-light);
}

.detail-metadata h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.detail-metadata h4 i {
    margin-right: 6px;
}

.detail-metadata .metadata-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
}

.detail-metadata .metadata-grid .meta-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.detail-metadata .metadata-grid .meta-item .meta-label {
    color: var(--text-muted);
}

.detail-metadata .metadata-grid .meta-item .meta-value {
    font-weight: 500;
}

/* Detail Modal Footer */
#detailModal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-light);
    border-radius: 0 0 8px 8px;
}

#detailModal .modal-footer .btn {
    padding: 8px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Error state in detail modal */
.error-state {
    text-align: center;
    padding: 40px 20px;
}

.error-state i {
    font-size: 48px;
    color: var(--danger-color);
}

.error-state p {
    margin-top: 10px;
    color: var(--danger-color);
}

/* Loading state in detail modal */
#detailContent .loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

#detailContent .loading.active {
    display: block;
}

#detailContent .loading .spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ========================================
   24. ADMIN NAVIGATION (legacy)
   ======================================== */
.admin-nav {
    background: var(--bg-white);
    box-shadow: 0 2px 4px rgba(26, 82, 118, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 var(--spacing-lg);
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-color);
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-brand-text {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.nav-link:hover {
    background: var(--secondary-bg);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-bg);
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: var(--font-size-md);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-color);
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.user-name i {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--danger-bg);
    color: var(--danger-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--danger-color);
    color: white;
}

.btn-logout i {
    font-size: var(--font-size-md);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--text-color);
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: var(--font-size-xs);
    padding: 2px 6px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* ========================================
   25. RESPONSIVE DESIGN
   ======================================== */
/* Tablets & small screens */
@media (max-width: 992px) {
    .search-form {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .modal-xl {
        max-width: 95%;
    }

    .header-nav ul {
        gap: 0.3rem;
    }

    .header-nav ul li a {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow);
        gap: 2px;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-link {
        padding: var(--spacing-md);
        width: 100%;
    }

    .nav-user .user-name span {
        display: none;
    }

    .btn-logout span {
        display: none;
    }

    .nav-brand-text {
        display: none;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    .app-header {
        padding: 0 1rem;
        height: 60px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo i {
        font-size: 1.3rem;
    }

    .header-nav ul {
        gap: 0.2rem;
    }

    .header-nav ul li a {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .header-nav ul li a span {
        display: none;
    }

    .user-profile span {
        display: none;
    }

    .secondary-nav {
        padding: 0 1rem;
        height: 48px;
        top: 60px;
    }

    .nav-container > ul li a {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .nav-container > ul li a span {
        display: none;
    }

    .main-content {
        padding: 1rem 1rem 2rem;
    }

    .container {
        padding: 0;
        margin: 0;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .search-form {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }

    .search-form .search-actions {
        grid-column: 1 / -1;
        flex-wrap: wrap;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

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

    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
        height: 100vh;
        width: 100%;
    }

    .modal-header {
        border-radius: 0;
        padding: var(--spacing-md);
    }

    .modal-body {
        padding: var(--spacing-md);
    }

    .modal-footer {
        border-radius: 0;
        padding: var(--spacing-md);
        flex-direction: column;
    }

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

    .pagination {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }

    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tab-btn {
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .members-container {
        padding: var(--spacing-sm);
    }

    .add-member {
        flex-direction: column;
    }

    .toast-container {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        left: var(--spacing-sm);
        max-width: 100%;
    }

    .table-wrapper table {
        font-size: var(--font-size-sm);
    }

    thead th,
    tbody td {
        padding: var(--spacing-sm);
    }

    .btn {
        font-size: var(--font-size-sm);
        padding: var(--spacing-xs) var(--spacing-md);
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-center ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Detail modal responsive */
    #detailModal .modal-content {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .detail-item.full-width {
        grid-column: 1;
    }

    .detail-section .detail-header {
        flex-direction: column;
        text-align: center;
    }

    .detail-section .detail-title .detail-meta {
        justify-content: center;
    }

    .detail-metadata .metadata-grid {
        grid-template-columns: 1fr;
    }

    #detailModal .modal-footer {
        flex-direction: column;
    }

    #detailModal .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .modal-body {
        padding: var(--spacing-sm);
    }

    .detail-item {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .detail-item .value {
        font-size: var(--font-size-md);
    }

    .member-item {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }

    .app-header {
        padding: 0 0.5rem;
        height: 54px;
    }

    .logo {
        font-size: 0.9rem;
    }

    .logo i {
        font-size: 1.1rem;
    }

    .header-nav ul li a {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .secondary-nav {
        padding: 0 0.5rem;
        height: 40px;
        top: 54px;
    }

    .nav-container > ul li a {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .main-content {
        padding: 0.5rem 0.5rem 1.5rem;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

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

    .admin-nav {
        padding: 0 var(--spacing-sm);
    }

    .nav-container {
        height: 60px;
    }

    .nav-logo {
        height: 32px;
    }

    .nav-link {
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm);
    }

    .nav-user {
        gap: var(--spacing-sm);
    }

    .user-name {
        font-size: var(--font-size-xs);
    }

    .detail-section .detail-title h2 {
        font-size: 20px;
    }

    .detail-section .detail-avatar {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .detail-item .value {
        font-size: 14px;
    }
}

/* ========================================
   26. UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--primary-bg); }
.bg-success { background: var(--success-bg); }
.bg-danger { background: var(--danger-bg); }
.bg-warning { background: var(--warning-bg); }
.bg-info { background: var(--info-bg); }
.bg-accent { background: var(--accent-bg); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.ml-1 { margin-left: var(--spacing-xs); }
.ml-2 { margin-left: var(--spacing-sm); }

.mr-1 { margin-right: var(--spacing-xs); }
.mr-2 { margin-right: var(--spacing-sm); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-md); }

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

.hidden { display: none !important; }
.visible { display: block !important; }

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
/* Styles pour la sélection en masse */
.selected-row {
    background: #e3f2fd !important;
}

.row-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.group-header td {
    font-weight: 600;
    font-size: 14px;
    padding: 10px 15px;
    background: #f1f3f5;
    border-top: 2px solid #dee2e6;
}

.bulk-actions .btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
}

.bulk-actions .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#selectedCount {
    font-size: 14px;
    font-weight: 500;
}

/* Style pour le tri */
#searchTri {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

/* Styles supplémentaires pour la gestion des échelles */

/* Detail echellons */
.detail-echellons {
    margin-top: 20px;
}

.detail-echellons h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.echellons-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

.echellon-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.echellon-item:last-child {
    border-bottom: none;
}

.echellon-item:hover {
    background: #fff;
    border-radius: 4px;
}

.echellon-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color, #4f46e5);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.echellon-code {
    font-family: monospace;
    font-size: 13px;
    color: #495057;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
}

.echellon-libelle {
    font-size: 14px;
    color: #212529;
}

.echellon-item .badge {
    margin-left: auto;
    font-size: 11px;
}

/* Text alignment helpers */
.text-center {
    text-align: center;
}

/* Form row */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group:last-child {
    margin-right: 0;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Styles supplémentaires pour la gestion des échelons */

/* Chain display */
.detail-echellon-chain {
    margin-top: 20px;
}

.detail-echellon-chain h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chain-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 60px;
}

.chain-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.chain-item:last-child {
    margin-bottom: 0;
}

.chain-item:hover {
    background: #fff;
}

.chain-item.current {
    background: #e8f4fd;
    border-left: 3px solid var(--primary-color, #4f46e5);
}

.chain-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #e9ecef;
    color: #495057;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.chain-item.current .chain-number {
    background: var(--primary-color, #4f46e5);
    color: #fff;
}

.chain-code {
    font-family: monospace;
    font-size: 12px;
    color: #495057;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
}

.chain-libelle {
    font-size: 13px;
    color: #212529;
}

.chain-item .badge {
    margin-left: auto;
    font-size: 10px;
}

.chain-arrow {
    color: #adb5bd;
    font-size: 18px;
    margin: 0 4px;
}

/* Badge variants */
.badge-primary {
    background: #4f46e5;
    color: #fff;
}

.badge-secondary {
    background: #6c757d;
    color: #fff;
}

.badge-success {
    background: #28a745;
    color: #fff;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-danger {
    background: #dc3545;
    color: #fff;
}

.badge-info {
    background: #17a2b8;
    color: #fff;
}

/* Loading states */
.loading {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color, #4f46e5);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.error-state {
    text-align: center;
    padding: 30px 20px;
    color: #dc3545;
}

.error-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

.error-state p {
    font-size: 16px;
    margin: 0;
}

/* Toast container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #212529;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 0 4px;
}

.toast-close:hover {
    color: #212529;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    .chain-item {
        flex-wrap: wrap;
    }

    .chain-arrow {
        display: none;
    }

    .toast {
        min-width: 250px;
        max-width: 90vw;
    }
}


.group-header td {
    background-color: #f0f4f8;
    font-weight: bold;
    padding: 10px 15px;
    border-bottom: 2px solid #d1d9e6;
}
.group-header td:first-child {
    border-radius: 8px 0 0 8px;
}
.group-header td:last-child {
    border-radius: 0 8px 8px 0;
}
.group-header .group-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.group-header .group-title .badge-group {
    background: #2c3e50;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}
.multi-select-actions {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.multi-select-actions .selected-info {
    font-size: 0.9rem;
    color: #495057;
}
.multi-select-actions .selected-info strong {
    color: #0d6efd;
}
.multi-select-actions .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.table-container .checkbox-col {
    width: 40px;
    text-align: center;
}
.table-container .checkbox-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0d6efd;
}
/* Badge styles */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e2e3e5; color: #383d41; }
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-group { background: #6c757d; color: white; padding: 2px 10px; border-radius: 12px; font-size: 0.7rem; }

/* Download section styles */
.download-section {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.download-section .btn-group {
    display: flex;
    gap: 5px;
}
.download-section .btn-group .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.download-section .btn-group .btn:first-child {
    border-radius: 4px 0 0 4px;
}
.download-section .btn-group .btn:last-child {
    border-radius: 0 4px 4px 0;
}
.download-section .btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.download-section .btn-group .btn:active {
    transform: translateY(0);
}
.download-section .btn i {
    margin-right: 5px;
}

/* Toast improvements */
.toast {
    min-width: 300px;
}



/* ADMIN DASHBOARD TO BE REVISED*/

:root {
    --primary-blue: #1a2a6c;
    --primary-green: #2ecc71;
    --primary-red: #e74c3c;
    --primary-orange: #f39c12;
}
body {
    background: #f4f6f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.sidebar {
    min-height: 100vh;
    background: var(--primary-blue);
    color: white;
}
.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 0;
    transition: all 0.3s;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
}
.sidebar .nav-link i {
    width: 25px;
}
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-blue);
    height: 100%;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card.green { border-left-color: var(--primary-green); }
.stat-card.green .stat-number { color: var(--primary-green); }
.stat-card.red { border-left-color: var(--primary-red); }
.stat-card.red .stat-number { color: var(--primary-red); }
.stat-card.orange { border-left-color: var(--primary-orange); }
.stat-card.orange .stat-number { color: var(--primary-orange); }
.stat-card.purple { border-left-color: #9b59b6; }
.stat-card.purple .stat-number { color: #9b59b6; }
.stat-card.teal { border-left-color: #1abc9c; }
.stat-card.teal .stat-number { color: #1abc9c; }

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}
.chart-container h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
}
.top-header {
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}
@media (max-width: 768px) {
    .sidebar { min-height: auto; }
    .stat-card .stat-number { font-size: 1.5rem; }
}


/* CSV Import Modal */
.modal-content {
    max-width: 600px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.modal-body .form-group select,
.modal-body .form-group input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modal-body .form-group input[type="file"] {
    padding: 8px;
    background: #f8f9fa;
}

.modal-body .form-group small {
    color: #666;
    font-size: 12px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color, #007bff);
    width: 0%;
    transition: width 0.3s ease;
}

/* Alert styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Toast improvements */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    background: white;
    border-left: 4px solid #666;
}

.toast-success { border-left-color: #28a745; }
.toast-error { border-left-color: #dc3545; }
.toast-warning { border-left-color: #ffc107; }
.toast-info { border-left-color: #17a2b8; }

.toast-icon { font-size: 20px; }
.toast-message { flex: 1; font-size: 14px; }
.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* مضاعفة حجم خانة Concours في نموذج البحث */
.search-form .form-group:first-child {
    grid-column: span 2;
}
/* تكبير حجم النافذة المنبثقة لتصبح عريضة ومريحة */
.modal-overlay .modal-content,
.modal-overlay .modal-box { /* استعمل الكلاس الصحيح لصندوق المودال الداخلي لديك */
    width: 95% !important;
    max-width: 1200px !important; /* تجعلها عريضة جداً مثل الصورة الثانية */
    max-height: 90vh !important; /* تمنع خروج النافذة عن الشاشة عمودياً */
    overflow-y: auto !important; /* تفعيل شريط التمرير الداخلي عند الحاجة */
    border-radius: 8px;
}

/* تنسيق الأقسام لتظهر تحت بعضها بشكل أنيق بدلاً من الاختفاء */
.modal-section-block {
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.modal-section-block h3 {
    font-size: 18px;
    color: #1e4263;
    margin-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 5px;
}

.modal-body form {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* عمودان فقط */
    gap: 20px !important;
}

/* لجعل عناوين الأقسام تمتد على كامل العرض */
.section-title {
    grid-column: 1 / -1;
    font-weight: bold;
    color: #1a5276;
    margin: 15px 0 10px 0;
    border-bottom: 2px solid #e8f0f8;
    padding-bottom: 5px;
}

/* لحقل الوصف ليمتد على كامل العرض */
.full-width {
    grid-column: 1 / -1;
}

/* تقسيم الفورمير لـ 2 أعمدة */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1; /* كيعطي نفس العرض لكل input */
}

/* تنسيق العناوين */
.section-title {
    font-weight: bold;
    color: #2c3e50;
    margin: 20px 0 10px 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* تحسين شكل الـ inputs */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.password-field .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-field .toggle-password {
    position: absolute;
    /* بدلي هاد القيمة (مثلاً 10px أو 15px) باش تحركيها فين بغيتي */
    right: 15px;
    cursor: pointer;
    color: #666;
    /* زيدي هاد السطر باش تضمنيها ديما فوسط الحقل عمودياً */
    top: 50%;
    transform: translateY(-50%);
}

/* التأكد من توزيع الحقول داخل الصف بشكل متساوي */
.modal-body form .form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* هذا يقسم الصف إلى قسمين متساويين 3/3 */
    gap: 20px !important;
}

/* تنسيق إضافي لضمان محاذاة الأيقونة داخل الحقل */
.password-field .input-wrapper {
    position: relative;
    width: 100%;
}

.password-field .input-wrapper input {
    width: 100%;
    padding-right: 40px; /* مساحة للأيقونة */
}

.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* التأكد من أن المودال يأخذ مساحته بشكل صحيح */
.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* يمنع المودال من تجاوز طول الشاشة */
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 50px;
    cursor: pointer;
    color: var(--text-muted);
}

.input-wrapper button.btn-outline {
    margin-left: 5px;
    padding: 5px 10px;
}
.form-group input {
    padding-right: 40px;
}
.password-field-custom .toggle-password {
    right: 10px;
}
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
}

input {
    padding-right: 35px;
    width: 100%;
}


/* الكونتينر اللي كيجمع الـ input والأيقونة */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* الـ Input كياخد مساحة كافية على اليمين باش ما يتغطاش النص */
.input-wrapper input {
    width: 100%;
    padding-right: 40px !important; /* هادي هي المسافة اللي كتخلي بلاصة للعين */
}

.input-wrapper .toggle-password {
    position: absolute !important;
    right: 10px !important; /* هنا تقدري تحكمي فالمسافة من اليمين (زيدي أو نقصي باش تحركيها) */
    top: 50% !important;
    transform: translateY(-50%) !important; /* هادي كتضمن أنها تجي الوسط عمودياً */
    cursor: pointer;
    z-index: 10;
    color: #7f8c9a;
}
.input-container {
    position: relative; /* ضروري باش الأيقونة تحبس فحدود الـ div */
    display: flex;
    align-items: center;
}

.input-container input {
    padding-right: 40px; /* باش النص ما يتغطاش بالأيقونة */
    width: 100%;
}

.input-container .toggle-password {
    position: absolute;
    right: 15px; /* المسافة من اليمين */
    cursor: pointer;
    color: #666;
}