:root {
    --fl-primary: #1a56db;
    --fl-primary-dark: #1344b0;
    --fl-secondary: #0f172a;
    --fl-accent: #06b6d4;
    --fl-success: #10b981;
    --fl-warning: #f59e0b;
    --fl-danger: #ef4444;
    --fl-sidebar-width: 260px;
    --fl-sidebar-bg: #0f172a;
    --fl-sidebar-hover: #1e293b;
    --fl-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --fl-radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    min-height: 100vh;
}

.fl-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--fl-sidebar-width);
    height: 100vh;
    background: var(--fl-sidebar-bg);
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.fl-sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fl-sidebar-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.fl-sidebar-brand small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.fl-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.fl-nav-link:hover,
.fl-nav-link.active {
    color: #fff;
    background: var(--fl-sidebar-hover);
    border-left-color: var(--fl-accent);
}

.fl-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.fl-nav-badge {
    margin-left: auto;
    background: var(--fl-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

.fl-nav-badge-warning {
    background: var(--fl-warning);
    color: #1e293b;
}

.fl-nav-badge-danger {
    background: var(--fl-danger);
    color: #fff;
}

.fl-main {
    margin-left: var(--fl-sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.fl-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.fl-content {
    padding: 1.5rem;
}

.fl-card {
    background: #fff;
    border-radius: var(--fl-radius);
    box-shadow: var(--fl-card-shadow);
    border: 1px solid #e2e8f0;
}

.fl-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: var(--fl-secondary);
}

.fl-card-body {
    padding: 1.25rem;
}

.fl-stat-card {
    background: #fff;
    border-radius: var(--fl-radius);
    padding: 1.25rem;
    box-shadow: var(--fl-card-shadow);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fl-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.fl-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.fl-badge-status {
    padding: 0.35em 0.75em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fl-badge-active { background: #d1fae5; color: #065f46; }
.fl-badge-locked { background: #fee2e2; color: #991b1b; }
.fl-badge-enrolled { background: #dbeafe; color: #1e40af; }
.fl-badge-overdue { background: #fef3c7; color: #92400e; }
.fl-badge-closed { background: #e2e8f0; color: #475569; }
.fl-badge-released { background: #e0e7ff; color: #3730a3; }
.fl-badge-pending { background: #e0f2fe; color: #0369a1; }
.fl-badge-paid { background: #d1fae5; color: #065f46; }
.fl-badge-waived { background: #f3e8ff; color: #6b21a8; }
.fl-badge-normal { background: #d1fae5; color: #065f46; }
.fl-badge-restricted { background: #fee2e2; color: #991b1b; }
.fl-badge-sent { background: #fef3c7; color: #92400e; }
.fl-badge-acknowledged { background: #d1fae5; color: #065f46; }
.fl-badge-pool { background: #e0e7ff; color: #3730a3; }
.fl-badge-assigned { background: #dbeafe; color: #1e40af; }
.fl-badge-used { background: #e2e8f0; color: #475569; }
.fl-badge-revoked { background: #fee2e2; color: #991b1b; }

.fl-table {
    margin: 0;
}

.fl-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.fl-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.fl-btn-action {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.fl-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--fl-secondary);
    cursor: pointer;
}

.fl-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

@media (max-width: 991.98px) {
    .fl-sidebar {
        transform: translateX(-100%);
    }

    .fl-sidebar.show {
        transform: translateX(0);
    }

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

    .fl-sidebar-toggle {
        display: block;
    }

    .fl-overlay.show {
        display: block;
    }

    .fl-content {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .fl-stat-card {
        padding: 1rem;
    }

    .fl-topbar h2 {
        font-size: 1.1rem;
    }
}
