/* ============================================================
   IPRN PROJECT - FLOWBITE INSPIRED THEME
   Modern, Clean, Compact Sidebar Design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --fb-primary-50: #eff6ff;
    --fb-primary-100: #dbeafe;
    --fb-primary-200: #bfdbfe;
    --fb-primary-300: #93c5fd;
    --fb-primary-400: #60a5fa;
    --fb-primary-500: #3b82f6;
    --fb-primary-600: #2563eb;
    --fb-primary-700: #1d4ed8;
    --fb-primary-800: #1e40af;
    --fb-primary-900: #1e3a8a;
    
    --fb-gray-50: #f9fafb;
    --fb-gray-100: #f3f4f6;
    --fb-gray-200: #e5e7eb;
    --fb-gray-300: #d1d5db;
    --fb-gray-400: #9ca3af;
    --fb-gray-500: #6b7280;
    --fb-gray-600: #4b5563;
    --fb-gray-700: #374151;
    --fb-gray-800: #1f2937;
    --fb-gray-900: #111827;
    
    --fb-sidebar-width: 16rem;
    --fb-sidebar-collapsed: 4rem;
    --fb-navbar-height: 4rem;
    
    --fb-radius: 0.5rem;
    --fb-radius-lg: 0.75rem;
    --fb-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --fb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ===== BASE STYLES ===== */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif !important;
    background: var(--fb-gray-50) !important;
    color: var(--fb-gray-900) !important;
}

/* ===== NAVBAR / TOPBAR ===== */
.fi-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--fb-gray-200) !important;
    box-shadow: var(--fb-shadow) !important;
    height: var(--fb-navbar-height) !important;
    padding: 0 1rem !important;
}

.fi-topbar nav {
    background: transparent !important;
}

/* Brand Logo */
.fi-topbar .fi-brand {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: var(--fb-gray-900) !important;
}

/* Topbar Icons */
.fi-topbar button {
    border-radius: var(--fb-radius) !important;
    transition: all 0.2s ease !important;
}

.fi-topbar button:hover {
    background: var(--fb-gray-100) !important;
}

/* ===== SIDEBAR - COMPACT & COLLAPSIBLE ===== */
.fi-sidebar {
    background: #ffffff !important;
    border-right: 1px solid var(--fb-gray-200) !important;
    width: var(--fb-sidebar-width) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: var(--fb-shadow) !important;
}

/* Collapsed Sidebar */
.fi-sidebar.fi-sidebar-collapsed,
.fi-sidebar.collapsed {
    width: var(--fb-sidebar-collapsed) !important;
}

/* Sidebar Header */
.fi-sidebar-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--fb-gray-200) !important;
    padding: 1rem !important;
}

/* Sidebar Navigation */
.fi-sidebar-nav {
    padding: 0.5rem !important;
}

/* Sidebar Items */
.fi-sidebar-item {
    margin: 0.125rem 0.5rem !important;
    border-radius: var(--fb-radius) !important;
    transition: all 0.2s ease !important;
}

.fi-sidebar-item a,
.fi-sidebar-item button {
    padding: 0.625rem 0.75rem !important;
    border-radius: var(--fb-radius) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--fb-gray-700) !important;
    transition: all 0.2s ease !important;
}

.fi-sidebar-item a:hover,
.fi-sidebar-item button:hover {
    background: var(--fb-primary-50) !important;
    color: var(--fb-primary-700) !important;
}

/* Active Sidebar Item */
.fi-sidebar-item-active,
.fi-sidebar-item.active {
    background: var(--fb-primary-600) !important;
}

.fi-sidebar-item-active a,
.fi-sidebar-item.active a,
.fi-sidebar-item-active button,
.fi-sidebar-item.active button {
    color: #ffffff !important;
    background: var(--fb-primary-600) !important;
}

/* Sidebar Item Icon */
.fi-sidebar-item .fi-sidebar-item-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-right: 0.75rem !important;
}

/* Sidebar Group */
.fi-sidebar-group {
    margin-top: 0.5rem !important;
}

.fi-sidebar-group-label {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--fb-gray-500) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.5rem 0.75rem !important;
}

/* ===== MAIN CONTENT ===== */
.fi-main {
    background: var(--fb-gray-50) !important;
    padding: 1.5rem !important;
}

.fi-page {
    max-width: 100% !important;
}

/* ===== CARDS / SECTIONS ===== */
.fi-section,
.fi-ta-ctn,
.fi-stats-overview-stat,
.fi-wi-stats-overview-stat {
    background: #ffffff !important;
    border-radius: var(--fb-radius-lg) !important;
    border: 1px solid var(--fb-gray-200) !important;
    box-shadow: var(--fb-shadow) !important;
    transition: all 0.2s ease !important;
}

.fi-section:hover,
.fi-ta-ctn:hover {
    box-shadow: var(--fb-shadow-lg) !important;
}

/* Section Header */
.fi-section-header {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid var(--fb-gray-200) !important;
}

.fi-section-header-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--fb-gray-900) !important;
}

/* Section Content */
.fi-section-content {
    padding: 1.5rem !important;
}

/* ===== STATS OVERVIEW ===== */
.fi-stats-overview-stat {
    padding: 1.25rem !important;
}

.fi-stats-overview-stat-value {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    color: var(--fb-gray-900) !important;
}

.fi-stats-overview-stat-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--fb-gray-500) !important;
}

/* ===== BUTTONS ===== */
.fi-btn {
    border-radius: var(--fb-radius) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--fb-shadow) !important;
}

.fi-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--fb-shadow-lg) !important;
}

.fi-btn-primary {
    background: var(--fb-primary-600) !important;
    color: #ffffff !important;
}

.fi-btn-primary:hover {
    background: var(--fb-primary-700) !important;
}

.fi-btn-secondary {
    background: #ffffff !important;
    color: var(--fb-gray-700) !important;
    border: 1px solid var(--fb-gray-300) !important;
}

.fi-btn-secondary:hover {
    background: var(--fb-gray-50) !important;
}

/* ===== TABLES ===== */
.fi-ta-header {
    background: var(--fb-gray-50) !important;
    border-bottom: 1px solid var(--fb-gray-200) !important;
}

.fi-ta-header-cell {
    background: var(--fb-gray-50) !important;
    color: var(--fb-gray-600) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.75rem 1rem !important;
}

.fi-ta-row {
    transition: background 0.15s ease !important;
}

.fi-ta-row:hover {
    background: var(--fb-primary-50) !important;
}

.fi-ta-cell {
    border-bottom: 1px solid var(--fb-gray-200) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
}

/* ===== BADGES ===== */
.fi-badge {
    border-radius: 9999px !important;
    padding: 0.25rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.fi-badge-primary {
    background: var(--fb-primary-100) !important;
    color: var(--fb-primary-800) !important;
}

.fi-badge-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.fi-badge-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.fi-badge-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* ===== FORMS ===== */
input, select, textarea,
.fi-fo-text-input input,
.fi-fo-select select {
    border: 1px solid var(--fb-gray-300) !important;
    border-radius: var(--fb-radius) !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--fb-primary-500) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* ===== MODALS ===== */
.fi-modal-window {
    border-radius: var(--fb-radius-lg) !important;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important;
}

.fi-modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--fb-gray-200) !important;
    padding: 1rem 1.5rem !important;
}

.fi-modal-body {
    padding: 1.5rem !important;
}

.fi-modal-footer {
    background: var(--fb-gray-50) !important;
    border-top: 1px solid var(--fb-gray-200) !important;
    padding: 1rem 1.5rem !important;
}

/* ===== DROPDOWNS ===== */
.fi-dropdown {
    border-radius: var(--fb-radius) !important;
    box-shadow: var(--fb-shadow-lg) !important;
    border: 1px solid var(--fb-gray-200) !important;
}

.fi-dropdown-item {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    transition: all 0.15s ease !important;
}

.fi-dropdown-item:hover {
    background: var(--fb-primary-50) !important;
    color: var(--fb-primary-700) !important;
}

/* ===== PAGINATION ===== */
.fi-pagination button {
    border-radius: var(--fb-radius) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.fi-pagination button:hover:not(:disabled) {
    background: var(--fb-primary-50) !important;
    color: var(--fb-primary-700) !important;
}

/* ===== TABS ===== */
.fi-tabs {
    border-bottom: 1px solid var(--fb-gray-200) !important;
}

.fi-tab {
    font-weight: 500 !important;
    color: var(--fb-gray-500) !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s ease !important;
    padding: 0.75rem 1rem !important;
}

.fi-tab:hover {
    color: var(--fb-primary-600) !important;
}

.fi-tab-active {
    color: var(--fb-primary-600) !important;
    border-bottom-color: var(--fb-primary-600) !important;
}

/* ===== DARK MODE ===== */
.dark body,
body.dark {
    background: var(--fb-gray-900) !important;
    color: var(--fb-gray-100) !important;
}

.dark .fi-topbar,
.dark .fi-sidebar,
.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-modal-window {
    background: var(--fb-gray-800) !important;
    border-color: var(--fb-gray-700) !important;
}

.dark .fi-sidebar-item a,
.dark .fi-sidebar-item button {
    color: var(--fb-gray-300) !important;
}

.dark .fi-sidebar-item a:hover,
.dark .fi-sidebar-item button:hover {
    background: var(--fb-gray-700) !important;
    color: var(--fb-primary-400) !important;
}

.dark .fi-ta-header,
.dark .fi-ta-header-cell {
    background: var(--fb-gray-800) !important;
    color: var(--fb-gray-400) !important;
}

.dark .fi-ta-row:hover {
    background: var(--fb-gray-800) !important;
}

.dark input,
.dark select,
.dark textarea {
    background: var(--fb-gray-700) !important;
    border-color: var(--fb-gray-600) !important;
    color: var(--fb-gray-100) !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fi-section,
.fi-ta-ctn,
.fi-stats-overview-stat {
    animation: fadeIn 0.3s ease !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--fb-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--fb-gray-300);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--fb-gray-400);
}

.dark ::-webkit-scrollbar-track {
    background: var(--fb-gray-800);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--fb-gray-600);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .fi-sidebar {
        position: fixed !important;
        z-index: 50 !important;
        transform: translateX(-100%) !important;
    }
    
    .fi-sidebar.fi-sidebar-open {
        transform: translateX(0) !important;
    }
    
    .fi-main {
        padding: 1rem !important;
    }
    
    .fi-stats-overview-stat-value {
        font-size: 1.5rem !important;
    }
}

/* ===== LINKS ===== */
a {
    color: var(--fb-primary-600) !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

a:hover {
    color: var(--fb-primary-700) !important;
}

/* ===== TOGGLE / SWITCH ===== */
.fi-toggle-checked {
    background: var(--fb-primary-600) !important;
}

/* ===== PROGRESS BAR ===== */
.fi-progress-bar {
    background: var(--fb-primary-600) !important;
    border-radius: 9999px !important;
}

/* ===== HEADER ===== */
.fi-header {
    margin-bottom: 1.5rem !important;
}

.fi-header-heading {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--fb-gray-900) !important;
}

.fi-header-subheading {
    font-size: 0.875rem !important;
    color: var(--fb-gray-500) !important;
}