/* ============================================
   IFE GESTION - Style Juridix
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Primary */
    --color-primary: #14b8a6;
    --color-primary-dark: #0f766e;
    --color-primary-light: #5eead4;
    --color-primary-bg: rgba(20, 184, 166, 0.1);

    /* Colors - Secondary */
    --color-secondary: #06b6d4;
    --color-accent: #f59e0b;

    /* Colors - States */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #0891b2;

    /* Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-primary: 0 10px 25px -5px rgba(20, 184, 166, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --topbar-height: 72px;
    --sidebar-width: 72px;
    --sidebar-width-expanded: 260px;
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
    margin: 0;
    padding: 0;
}

/* ============================================
   TOPBAR
   ============================================ */
.ife-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.5);
    z-index: 1000;
    box-shadow: var(--shadow-xs);
}

.topbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 2rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition-base);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--color-primary);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1.25rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-search {
    flex: 1;
    max-width: 500px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    z-index: 1;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 44px;
    padding-left: 2.75rem !important;
    padding-right: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    font-size: 0.9375rem;
    transition: var(--transition-base);
}

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

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--gray-800);
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

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

.search-suggestion-item:hover {
    background: var(--gray-50);
    color: var(--color-primary);
}

.search-suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
}

.search-suggestion-icon.depense {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

.search-suggestion-icon.partage {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.search-suggestion-icon.materiel {
    background: rgba(8, 145, 178, 0.1);
    color: var(--color-info);
}

.search-suggestion-content {
    flex: 1;
    min-width: 0;
}

.search-suggestion-title {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.search-view-all {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    background: var(--gray-50);
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.search-view-all:hover {
    background: var(--gray-100);
    color: var(--color-primary-dark);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-base);
}

.user-dropdown:hover {
    background: var(--gray-100);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   SIDEBAR
   ============================================ */
.ife-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    z-index: 999;
    transition: width var(--transition-slow) ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Expanded state via hover OR pinned */
.ife-sidebar:hover,
.ife-sidebar.expanded {
    width: var(--sidebar-width-expanded);
    box-shadow: var(--shadow-lg);
}

/* Pinned sidebar stays expanded */
.ife-sidebar.pinned {
    width: var(--sidebar-width-expanded);
    box-shadow: none;
    border-right: 1px solid var(--gray-200);
}

/* Sidebar header with pin button */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
    min-height: 48px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.ife-sidebar:hover .sidebar-header,
.ife-sidebar.expanded .sidebar-header,
.ife-sidebar.pinned .sidebar-header {
    opacity: 1;
}

.sidebar-pin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition-base);
}

.sidebar-pin-btn:hover {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

.sidebar-pin-btn.active {
    background: var(--color-primary);
    color: white;
}

.sidebar-pin-btn i {
    transition: transform var(--transition-base);
}

.sidebar-pin-btn.active i {
    transform: rotate(45deg);
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    height: 44px;
    padding: 0 0.875rem;
    border-radius: var(--radius-lg);
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
    white-space: nowrap;
    overflow: hidden;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: var(--shadow-primary);
}

.nav-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-text {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ife-sidebar:hover .nav-text,
.ife-sidebar.expanded .nav-text,
.ife-sidebar.pinned .nav-text {
    opacity: 1;
    transform: translateX(0);
}

.nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0.875rem;
}

/* Nav section labels */
.nav-section {
    padding: 0.5rem 0.875rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    opacity: 0;
    transition: opacity var(--transition-base);
    white-space: nowrap;
}

.ife-sidebar:hover .nav-section,
.ife-sidebar.expanded .nav-section,
.ife-sidebar.pinned .nav-section {
    opacity: 1;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.version-badge {
    font-size: 0.75rem;
    color: var(--gray-500);
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ife-sidebar:hover .version-badge,
.ife-sidebar.expanded .version-badge,
.ife-sidebar.pinned .version-badge {
    opacity: 1;
}

/* Collapsed icon indicator in footer */
.sidebar-footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--gray-400);
    font-size: 1rem;
}

.ife-sidebar:hover .sidebar-footer-icon,
.ife-sidebar.expanded .sidebar-footer-icon,
.ife-sidebar.pinned .sidebar-footer-icon {
    display: none;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.ife-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left var(--transition-slow) ease;
}

/* When sidebar is pinned, main content adjusts */
.sidebar-pinned .ife-main {
    margin-left: var(--sidebar-width-expanded);
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeInUp 0.3s ease-out;
}

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

/* Footer discret */
.ife-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-400);
    border-top: 1px solid var(--gray-200);
}

.ife-footer span {
    opacity: 0.7;
    transition: opacity var(--transition-base);
}

.ife-footer span:hover {
    opacity: 1;
}

/* Auth Main (Login page) */
.ife-auth-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

/* Footer pour page de login */
.auth-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: var(--gray-400);
    background: transparent;
}

.auth-footer span {
    opacity: 0.6;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: var(--transition-base);
}

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

.card-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* Stat Cards */
.stat-card {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    transition: var(--transition-base);
}

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

.stat-card.primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    color: white;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--color-primary-bg);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card.primary .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stat-card.primary .stat-value {
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.stat-card.primary .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   FORMS
   ============================================ */
.form-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    height: 44px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 0 1rem;
    font-size: 0.9375rem;
    color: var(--gray-900);
    transition: var(--transition-base);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-bg);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 0.75rem 1rem;
}

.input-group-text {
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--gray-500);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 40px;
    padding: 0 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-sm {
    height: 32px;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    height: 48px;
    padding: 0 1.5rem;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-primary);
    color: white;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

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

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

.btn-outline-secondary {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

/* ============================================
   TABLES
   ============================================ */
.table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--gray-700);
    padding: 0.875rem 1rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

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

.table-hover tbody tr:hover {
    background: var(--gray-50);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-success,
.bg-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--color-success) !important;
}

.badge-warning,
.bg-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: var(--color-warning) !important;
}

.badge-danger,
.bg-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--color-danger) !important;
}

.badge-info,
.bg-info {
    background: rgba(8, 145, 178, 0.1) !important;
    color: var(--color-info) !important;
}

.badge-secondary,
.bg-secondary {
    background: var(--gray-100) !important;
    color: var(--gray-600) !important;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border: 1px solid;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.alert-info {
    background: rgba(8, 145, 178, 0.1);
    border-color: rgba(8, 145, 178, 0.2);
    color: #155e75;
}

.flash-messages {
    margin-bottom: 1.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    gap: 0.25rem;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition-base);
}

.page-link:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.page-item.active .page-link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.page-item.disabled .page-link {
    background: var(--gray-50);
    color: var(--gray-400);
}

/* ============================================
   DROPDOWN
   ============================================ */
.dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 0.9375rem;
    transition: var(--transition-base);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--gray-200);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: var(--radius-xl);
    color: white;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .btn-primary {
    width: 100%;
    height: 48px;
    font-size: 1rem;
}

.remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ============================================
   PAGE HEADERS
   ============================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ============================================
   MODAL
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-muted { color: var(--gray-500) !important; }

.bg-primary-light { background: var(--color-primary-bg) !important; }

.fw-semibold { font-weight: 600 !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .ife-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width-expanded);
    }

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

    .ife-sidebar.open ~ .sidebar-overlay {
        display: block;
    }

    .ife-sidebar .nav-text,
    .ife-sidebar .version-badge,
    .ife-sidebar .nav-section,
    .ife-sidebar .sidebar-header {
        opacity: 1;
    }

    .ife-sidebar .nav-text {
        transform: translateX(0);
    }

    /* Hide pin button on mobile */
    .sidebar-pin-btn {
        display: none;
    }

    .ife-main,
    .sidebar-pinned .ife-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --topbar-height: 60px;
    }

    .topbar-container {
        padding: 0 1rem;
    }

    .brand-text {
        display: none;
    }

    .ife-main {
        padding: 1rem;
    }

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

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
    }

    .page-header .btn {
        width: auto;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}
