/* ========== CSS VARIABLES ========== */
:root {
    /* Colors (DO NOT CHANGE) */
    --fnd-blue: #1a6fc4;
    --fnd-blue-dark: #0f4f8f;
    --fnd-teal: #1dbf8a;
    --fnd-muted: #6c757d;
    --fnd-blue-light: #e8f0fe;
    --fnd-bg: #f8f9fa;
    --fnd-border: #e9ecef;

    /* Spacing scale */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.25);

    /* Typography */
    --font-family: 'Outfit', 'Segoe UI', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 0.95rem;  /* 15.2px */
    --text-md: 1rem;       /* 16px */
    --text-lg: 1.25rem;    /* 20px */
    --text-xl: 1.5rem;     /* 24px */
    --text-2xl: 1.75rem;   /* 28px */
    --text-3xl: 2rem;      /* 32px */
    --text-4xl: 2.5rem;    /* 40px */

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
}

/* ========== BASE RESET ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.6;
    color: #0a2540;
    background: var(--fnd-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--fnd-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--fnd-blue-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: var(--space-sm);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-sm); }

p {
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

small {
    font-size: var(--text-sm);
}

strong, .fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--fnd-muted); }
.text-primary { color: var(--fnd-blue); }
.text-success { color: var(--fnd-teal); }
.text-danger { color: #dc3545; }
.text-warning { color: #f39c12; }

/* ========== LAYOUT UTILITIES ========== */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }

.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }

/* Margin utilities */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.ms-auto { margin-left: auto; }
.me-auto { margin-right: auto; }
.me-2 { margin-right: var(--space-sm); }
.me-3 { margin-right: var(--space-md); }
.ms-2 { margin-left: var(--space-sm); }
.ms-3 { margin-left: var(--space-md); }

/* Padding utilities */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.px-3 { padding-left: var(--space-md); padding-right: var(--space-md); }
.py-3 { padding-top: var(--space-md); padding-bottom: var(--space-md); }

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

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.5;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Primary button (blue gradient) */
.btn-primary,
.btn-fnd-primary {
    background: linear-gradient(135deg, var(--fnd-blue), var(--fnd-blue-dark));
    color: white;
    border: none;
}

.btn-primary:hover,
.btn-fnd-primary:hover {
    background: linear-gradient(135deg, var(--fnd-blue-dark), #0a3a6a);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 111, 196, 0.35);
}

/* Teal button */
.btn-teal {
    background: linear-gradient(135deg, var(--fnd-teal), #0fa87a);
    color: white;
    border: none;
}

/* Outline button */
.btn-outline,
.btn-fnd-outline {
    background: transparent;
    border: 2px solid var(--fnd-border);
    color: #0a2540;
}

.btn-outline:hover,
.btn-fnd-outline:hover {
    background: var(--fnd-blue-light);
    border-color: var(--fnd-blue);
    color: var(--fnd-blue);
}

/* Danger button */
.btn-danger,
.btn-fnd-danger {
    background: #fee2e2;
    color: #dc2626;
    border: none;
}

.btn-danger:hover,
.btn-fnd-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}

/* Small button */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
}

/* Large button */
.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label,
.form-label-fnd {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #0a2540;
    margin-bottom: var(--space-xs);
}

.form-control,
.form-input-fnd,
.form-select-fnd {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.5;
    color: #0a2540;
    background: white;
    border: 2px solid var(--fnd-border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus,
.form-input-fnd:focus,
.form-select-fnd:focus {
    outline: none;
    border-color: var(--fnd-blue);
    box-shadow: 0 0 0 4px rgba(26, 111, 196, 0.15);
}

.form-control:disabled,
.form-input-fnd:disabled,
.form-select-fnd:disabled {
    background: var(--fnd-bg);
    color: var(--fnd-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-control::placeholder,
.form-input-fnd::placeholder {
    color: #adb5bd;
}

.form-select-fnd {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

textarea.form-control,
textarea.form-input-fnd {
    min-height: 100px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--fnd-blue);
}

.form-check-label {
    font-size: var(--text-base);
    color: #0a2540;
}

/* Input group */
.input-group {
    display: flex;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--fnd-border);
    transition: border-color 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--fnd-blue);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--fnd-bg);
    border: none;
    color: var(--fnd-muted);
    font-size: var(--text-base);
}

.input-group .form-control,
.input-group .form-control-fnd {
    border: none;
    border-radius: 0;
}

.input-group .form-control:focus {
    box-shadow: none;
}

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

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

.card-header {
    padding: var(--space-md) var(--space-lg);
    background: white;
    border-bottom: 1px solid var(--fnd-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    background: var(--fnd-bg);
    border-top: 1px solid var(--fnd-border);
}

/* Modern card variant */
.card-modern {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

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

.card-modern-header {
    padding: var(--space-md) var(--space-lg);
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-modern-body {
    padding: var(--space-lg);
}

/* Stats card */
.stats-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.stats-card-primary {
    border-left: 4px solid var(--fnd-blue);
}

.stats-card-secondary {
    border-left: 4px solid var(--fnd-muted);
}

.stats-card-teal {
    border-left: 4px solid var(--fnd-teal);
}

.stats-card-warning {
    border-left: 4px solid #f39c12;
}

.stats-card-content {
    display: flex;
    gap: var(--space-md);
    flex: 1;
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.stats-card-primary .stats-icon {
    background: var(--fnd-blue-light);
    color: var(--fnd-blue);
}

.stats-card-secondary .stats-icon {
    background: var(--fnd-bg);
    color: var(--fnd-muted);
}

.stats-card-teal .stats-icon {
    background: #e8f9f1;
    color: var(--fnd-teal);
}

.stats-card-warning .stats-icon {
    background: #fff4e0;
    color: #f39c12;
}

.stats-info {
    flex: 1;
    min-width: 0;
}

.stats-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--fnd-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

.stats-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: #0a2540;
    line-height: 1.2;
    margin-bottom: var(--space-xs);
}

.stats-trend {
    font-size: var(--text-xs);
    font-weight: 600;
}

.trend-up { color: #27ae60; }
.trend-down { color: #e74c3c; }
.trend-neutral { color: #f39c12; }

.stats-footer {
    padding-top: var(--space-md);
    border-top: 1px solid #f0f0f0;
    margin-top: var(--space-sm);
}

.stats-link {
    font-size: var(--text-sm);
    color: var(--fnd-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: gap 0.2s ease;
}

.stats-link:hover {
    gap: var(--space-sm);
    color: var(--fnd-blue-dark);
}

/* Admin stats card */
.stat-card-admin {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-card-admin .stat-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    font-size: var(--text-xl);
}

.stat-card-admin .stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: #0a2540;
    line-height: 1.2;
}

.stat-card-admin .stat-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--fnd-muted);
    margin-top: var(--space-xs);
}

/* ========== TABLES ========== */
.table,
.fnd-table-admin {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table thead th,
.fnd-table-admin thead th {
    background: var(--fnd-bg);
    padding: var(--space-md);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fnd-muted);
    border-bottom: 2px solid var(--fnd-border);
    text-align: left;
    vertical-align: middle;
}

.table tbody td,
.fnd-table-admin tbody td {
    padding: var(--space-md);
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: var(--text-base);
    color: #0a2540;
}

.table tbody tr:hover,
.fnd-table-admin tbody tr:hover {
    background: #f8f9fc;
}

.table-striped tbody tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.02);
}

/* Responsive table wrapper */
.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========== ALERTS ========== */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--text-base);
}

.alert i {
    flex-shrink: 0;
    font-size: var(--text-lg);
}

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

.alert-danger {
    background: #fce8e8;
    color: #c0392b;
    border: 1px solid #fadbd8;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: var(--fnd-blue-light);
    color: var(--fnd-blue-dark);
    border: 1px solid #b3d7f5;
}

.alert-fnd {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
}

.alert-fnd i {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.alert-danger-fnd {
    background: #fce8e8;
    color: #c0392b;
    border: 1px solid #fadbd8;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-primary {
    background: var(--fnd-blue-light);
    color: var(--fnd-blue);
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #fce8e8;
    color: #c0392b;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-admin-fnd {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-role-admin {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.badge-role-bureau {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.badge-role-membre {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.badge-valide {
    background: #d4edda;
    color: #155724;
}

.badge-attente {
    background: #fff3cd;
    color: #856404;
}

.badge-refuse {
    background: #fce8e8;
    color: #721c24;
}

.badge-count {
    background: var(--fnd-bg);
    color: var(--fnd-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* ========== MODALS ========== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1055;
    width: 90%;
    max-width: 500px;
}

.modal-dialog {
    width: 100%;
}

.modal-content {
    background: white;
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-fnd .modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--fnd-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-fnd .modal-header {
    background: linear-gradient(135deg, var(--fnd-blue), var(--fnd-blue-dark));
    color: white;
    border-radius: 0;
    border: none;
    padding: var(--space-md) var(--space-lg);
}

.modal-fnd .modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-fnd .modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-md) var(--space-xl);
    border-top: 1px solid var(--fnd-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.modal-fnd .modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid #f0f0f0;
}

.modal-body .detail-row {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
}

.modal-body .detail-row:last-child {
    border-bottom: none;
}

.modal-body .detail-label {
    width: 140px;
    flex-shrink: 0;
    color: var(--fnd-muted);
    font-weight: 600;
    font-size: var(--text-sm);
}

.modal-body .detail-value {
    color: #0a2540;
    font-size: var(--text-base);
}

/* ========== USER AVATAR ========== */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--fnd-teal), var(--fnd-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    color: white;
    flex-shrink: 0;
}

.user-avatar-lg {
    width: 50px;
    height: 50px;
    font-size: var(--text-base);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--text-xs);
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.page-header h2 {
    font-size: var(--text-2xl);
    margin-bottom: 0;
}

.page-header p {
    color: var(--fnd-muted);
    font-size: var(--text-sm);
    margin-bottom: 0;
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--fnd-bg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quick-action-card:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: inherit;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.bg-blue-light { background: var(--fnd-blue-light); color: var(--fnd-blue); }
.bg-teal-light { background: #e8f9f1; color: var(--fnd-teal); }
.bg-purple-light { background: #f3e8ff; color: #8b5cf6; }
.bg-warning-light { background: #fff4e0; color: #f39c12; }

.quick-action-info h6 {
    font-size: var(--text-base);
    font-weight: 700;
    color: #0a2540;
    margin-bottom: var(--space-xs);
}

.quick-action-info small {
    font-size: var(--text-sm);
    color: var(--fnd-muted);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
}

.empty-state i {
    opacity: 0.4;
    font-size: 3rem;
    color: var(--fnd-muted);
    margin-bottom: var(--space-md);
}

/* ========== MEMBER LIST ========== */
.member-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.member-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: #f8f9fc;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.member-item:hover {
    background: var(--fnd-blue-light);
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: #0a2540;
}

.member-email {
    font-size: var(--text-xs);
    color: var(--fnd-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== ROLE BADGE ========== */
.role-badge {
    background: #e8f9f1;
    color: var(--fnd-teal);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ========== FORM ROW (2 COLUMNS) ========== */
.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 0;
}

/* ========== AUTH PAGES ========== */
body.auth-page {
    background: linear-gradient(135deg, #0f4f8f 0%, #1a6fc4 50%, #1dbf8a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.auth-container {
    display: flex;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
}

.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, #1a2a3a 0%, #2d4a6a 100%);
    padding: var(--space-2xl) var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(29, 191, 138, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-logo {
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.logo-letters {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -2px;
}

.logo-letters .letter-teal {
    color: var(--fnd-teal);
}

.brand-tagline {
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-2xl);
}

.brand-tagline h1 {
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: var(--space-md);
    color: white;
}

.brand-tagline p {
    font-size: var(--text-sm);
    opacity: 0.8;
    line-height: 1.5;
    color: white;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: relative;
    z-index: 1;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.85);
}

.brand-feature i {
    font-size: var(--text-xl);
    color: var(--fnd-teal);
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: #fafbfc;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
}

.auth-form-inner h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: #0a2540;
    margin-bottom: var(--space-xs);
}

.auth-sub {
    color: var(--fnd-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
}

/* Auth divider */
.auth-divider {
    text-align: center;
    margin: var(--space-lg) 0;
    position: relative;
    color: #adb5bd;
    font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--fnd-border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* Auth link */
.auth-link {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--fnd-muted);
}

.auth-link a {
    color: var(--fnd-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link a:hover {
    color: var(--fnd-blue-dark);
    text-decoration: underline;
}

/* Submit button for auth */
.btn-submit {
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--fnd-blue), var(--fnd-blue-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 111, 196, 0.35);
}

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

/* Form input with icon */
.form-input-wrap {
    position: relative;
}

.form-input-wrap i {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--fnd-muted);
    font-size: var(--text-base);
    z-index: 1;
}

.form-input-wrap .form-input-fnd {
    padding-left: 2.75rem;
}

/* ========== SIDEBAR ========== */
/* (Sidebar styles are kept in main.php inline CSS to avoid duplication) */

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 992px) {
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        font-size: var(--text-sm);
    }

    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
    h4 { font-size: var(--text-lg); }

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

    .page-header > a,
    .page-header > button {
        width: 100%;
        justify-content: center;
    }

    .stats-card-content {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .stats-icon {
        width: 40px;
        height: 40px;
        font-size: var(--text-lg);
    }

    .row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-container {
        flex-direction: column;
        min-height: auto;
    }

    .auth-brand {
        padding: var(--space-lg) var(--space-md);
    }

    .logo-letters {
        font-size: 2.5rem;
    }

    .brand-tagline h1 {
        font-size: var(--text-xl);
    }

    .brand-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .brand-feature {
        font-size: var(--text-xs);
        flex-direction: column;
        gap: var(--space-xs);
    }

    .brand-feature i {
        font-size: var(--text-lg);
    }

    .auth-form-panel {
        padding: var(--space-lg) var(--space-md);
    }

    .auth-form-inner h2 {
        font-size: var(--text-xl);
    }

    .table-responsive-custom {
        font-size: var(--text-sm);
    }

    .modal {
        width: 95%;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .brand-features {
        display: none;
    }

    .stats-card-admin {
        padding: var(--space-md);
    }

    .stat-card-admin .stat-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .d-none-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .auth-brand {
        padding: var(--space-md);
    }

    .logo-letters {
        font-size: 2rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: var(--text-sm);
    }

    .card-body,
    .card-modern-body {
        padding: var(--space-md);
    }
}

/* ========== UTILITY CLASSES ========== */
.float-end { float: right; }
.float-start { float: left; }
.clearfix::after { content: ""; display: table; clear: both; }

.text-decoration-none { text-decoration: none; }
.text-decoration-underline { text-decoration: underline; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }

.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.start-0 { left: 0; }
.end-0 { right: 0; }

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

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

/* ========== PRINT STYLES ========== */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .no-print {
        display: none !important;
    }

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

    body {
        background: white;
    }
}
