/* Honey Badger Lodge - Enterprise UI Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&family=Roboto:wght@400;500&display=swap');

:root {
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --primary-light: #3B82F6;
    --sidebar: #0F172A;
    --accent: #D4AF37;
    --bg: #F8FAFC;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #F59E0B;
    --text-main: #1E293B;
    --text-muted: #475569;
    --border: #E2E8F0;
    --glass: rgba(255, 255, 255, 0.7);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    margin: 0;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    position: fixed;
    height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.top-nav {
    height: 70px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.workspace {
    padding: 30px;
    flex: 1;
}

/* Medium laptops (1024–1280px) */
@media (max-width: 1280px) and (min-width: 993px) {
    .sidebar {
        width: 230px;
    }
    .main-content {
        margin-left: 230px;
    }
    .workspace {
        padding: 20px;
    }
}

/* Sidebar Navigation */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px 25px;
}

.sidebar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    padding: 0 15px;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-label {
    color: #FFFFFF !important; /* Pure white for maximum visibility */
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    padding: 30px 18px 12px !important;
    display: block !important;
    opacity: 1 !important;
}

.sidebar-nav .nav-link {
    color: #CBD5E1;
    padding: 11px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.88rem;
    text-decoration: none;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
}

.sidebar-nav .nav-link i {
    width: 24px;
    font-size: 1.2rem; /* Slightly larger icons */
    text-align: center;
}

.sidebar-footer {
    padding: 25px;
    margin-top: auto;
    background: rgba(0,0,0,0.2);
}

.sidebar-footer hr {
    border-color: rgba(255,255,255,0.2);
    margin-bottom: 20px;
}

/* Mobile Adaptation & Responsiveness */
@media (max-width: 992px) {
    .sidebar {
        display: none !important;
        left: 0 !important;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
        z-index: 2000;
    }
    .sidebar.active {
        display: flex !important;
        transform: translateX(0);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
    }
    .sidebar.active + .sidebar-overlay {
        display: block;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100%;
        min-height: 100vh;
        overflow-y: visible !important;
    }
    .top-nav {
        padding: 0 10px;
        height: 50px;
        position: sticky;
        top: 0;
    }
    .top-nav h3 {
        font-size: 1rem !important;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    .search-box {
        display: none !important;
    }
    .workspace {
        padding: 20px 15px 80px; /* Add bottom padding for better scroll clearance */
        flex: 1;
        overflow-y: visible !important;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .card-premium {
        padding: 15px;
    }
    /* Stack action buttons in tables on mobile */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    /* Ensure tables can scroll horizontally */
    .table-responsive {
        border: 0;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Adjust chart heights */
    canvas {
        max-height: 250px !important;
    }
    /* DataTables Mobile Fixes */
    .dataTables_filter, .dataTables_length {
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 10px;
    }
    .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
    }
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
    }
    .d-flex.justify-content-between.align-items-center > * {
        width: 100%;
    }
    .btn-group {
        display: flex;
        width: 100%;
    }
    .btn-group .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .user-meta .text-end {
        display: none !important;
    }
    .sidebar-brand span {
        font-size: 1.2rem;
    }
    .card-premium h2 {
        font-size: 1.5rem;
    }
    .modal-dialog {
        margin: 10px;
    }
}

/* UI Components */
.card-premium {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 24px;
    transition: all 0.3s ease;
}

.card-premium:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.btn-premium {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-premium {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border: none;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.4);
}

.btn-primary-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
}

.btn-light-premium {
    background: white;
    color: var(--text-main) !important;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.btn-light-premium:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 8px 15px rgba(30, 64, 175, 0.3);
    transform: translateY(-3px);
}

/* Typography & Badges */
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; margin-bottom: 0.5rem; }
.text-accent { color: var(--accent); }
.badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Landing Page Hero */
.hero-section {
    padding: 80px 0;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

/* Stats */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Tables */
.table-premium {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.table-premium th {
    background: #F8FAFC;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.table-premium td {
    padding: 16px 24px;
    vertical-align: middle;
}

/* Premium Action Buttons */
.btn-action-success {
    background: #ecfdf5;
    color: #10b981;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}
.btn-action-success:hover { 
    background: #10b981; 
    color: white; 
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-action-warning {
    background: #fffbeb;
    color: #f59e0b;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}
.btn-action-warning:hover { 
    background: #f59e0b; 
    color: white; 
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-action-danger {
    background: #fef2f2;
    color: #ef4444;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}
.btn-action-danger:hover { 
    background: #ef4444; 
    color: white; 
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media print {
    .sidebar, .top-nav, .btn, button, .dataTables_filter, .dataTables_length, .dataTables_paginate, .dataTables_info, #bulkActions, hr, .no-print {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .workspace {
        padding: 0 !important;
    }
    .card-premium {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    th, td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
    }
}
