/* ==========================================
   Modern Dark Professional Theme - Option 1
   ========================================== */

:root {
    /* Color Palette */
    --sidebar-bg: #1a1d29;
    --sidebar-bg-end: #0f1117;
    --primary-accent: #6366f1;
    --secondary-accent: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    /* Text Colors */
    --text-light: #e2e8f0;
    --text-gray: #94a3b8;
    --text-dark: #1e293b;

    /* Background Colors */
    --bg-light: #f8fafc;
    --bg-white: #f5f5f5;
    --hover-bg: #2d3142;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* 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);
}

/* ==========================================
   Sidebar Styling
   ========================================== */

.sidebar {
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-end) 100%) !important;
    box-shadow: var(--shadow-xl);
}

.sidebar .sidebar-brand {
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.sidebar .sidebar-brand:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar .sidebar-brand-icon {
    color: var(--primary-accent);
    font-size: 1.5rem;
}

.sidebar .sidebar-brand-text {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 1rem 0;
}

.sidebar-heading {
    color: var(--text-gray) !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 1rem 1rem 0.5rem;
}

/* Sidebar Navigation Items */
.sidebar .nav-item {
    margin: 0.25rem 0.75rem;
}

.sidebar .nav-link {
    color: var(--text-gray) !important;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-accent);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.sidebar .nav-link:hover {
    background: var(--hover-bg);
    color: var(--text-light) !important;
    transform: translateX(4px);
}

.sidebar .nav-link:hover::before {
    transform: scaleY(1);
}

.sidebar .nav-item.active .nav-link {
    background: linear-gradient(90deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    color: var(--text-light) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* Sidebar Collapse Items */
.sidebar .collapse-inner {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: var(--radius-md);
    padding: 0.5rem !important;
    margin-top: 0.5rem;
}

.sidebar .collapse-header {
    color: var(--text-gray) !important;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0.75rem !important;
}

.sidebar .collapse-item {
    color: var(--text-gray) !important;
    padding: 0.625rem 0.75rem;
    margin: 0.125rem 0;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.sidebar .collapse-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-light) !important;
    transform: translateX(4px);
}

.sidebar .collapse-item.active {
    background: var(--primary-accent) !important;
    color: white !important;
}

/* Sidebar Toggle Button */
#sidebarToggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    width: 2.5rem;
    height: 2.5rem;
    transition: all var(--transition-base);
}

#sidebarToggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: rotate(180deg);
}

/* ==========================================
   Topbar Styling
   ========================================== */

.topbar {
    background: var(--bg-white) !important;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.topbar .dropdown-list {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl);
    border: 1px solid #e2e8f0;
}

.topbar .dropdown-header {
    background: var(--primary-accent) !important;
    color: white !important;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* User Dropdown */
.topbar .nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.topbar .nav-link:hover {
    background: var(--bg-light);
}

.topbar .dropdown-menu {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl);
    border: 1px solid #e2e8f0;
    margin-top: 0.5rem;
}

.topbar .dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.topbar .dropdown-item:hover {
    background: var(--bg-light) !important;
    color: var(--primary-accent) !important;
    transform: translateX(4px);
}

.topbar .dropdown-item i {
    color: var(--text-gray);
    transition: color var(--transition-fast);
}

.topbar .dropdown-item:hover i {
    color: var(--primary-accent);
}

/* ==========================================
   Main Content Area
   ========================================== */

#content {
    background: var(--bg-light);
}

.container-fluid {
    padding: 1.5rem 2rem;
}

/* Page Heading */
h3,
h4,
h5 {
    color: var(--text-dark);
    font-weight: 700;
}

/* ==========================================
   Cards
   ========================================== */

.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    background: var(--bg-white);
}

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

.card-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--bg-light);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all var(--transition-base);
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%) !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5558e3 0%, #7c4ee8 100%) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

.btn-success:hover {
    background: #0d9668 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

.btn-warning:hover {
    background: #d97706 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

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

.btn-danger:hover {
    background: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-info {
    background: var(--info-color) !important;
    color: white !important;
}

.btn-info:hover {
    background: #2563eb !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #64748b !important;
    color: white !important;
}

.btn-secondary:hover {
    background: #475569 !important;
}

/* ==========================================
   Tables
   ========================================== */

.table-responsive {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: var(--bg-white);
    padding: 1.5rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
}

.table tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--bg-light);
}

.table tbody tr:hover {
    background: var(--bg-light);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* ==========================================
   Badges
   ========================================== */

.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success-color) !important;
    color: white !important;
}

.badge-secondary {
    background: #64748b !important;
    color: white !important;
}

.badge-primary {
    background: var(--primary-accent) !important;
    color: white !important;
}

.badge-info {
    background: var(--info-color) !important;
    color: white !important;
}

.badge-warning {
    background: var(--warning-color) !important;
    color: white !important;
}

.badge-danger {
    background: var(--danger-color) !important;
    color: white !important;
}

/* ==========================================
   Forms
   ========================================== */

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-base);
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.custom-select {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    /* padding: 0.75rem 1rem; */
    transition: all var(--transition-base);
}

.custom-select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.label-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ==========================================
   Modals
   ========================================== */

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

.modal-header {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    color: #f5f5f5;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.5rem;
    border: none;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-header .close {
    color: #f5f5f5;
    opacity: 0.9;
    transition: all var(--transition-fast);
}

.modal-header .close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 2px solid var(--bg-light);
    padding: 1.25rem 2rem;
}

/* ==========================================
   Alerts
   ========================================== */

.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e3a8a;
}

/* ==========================================
   Footer
   ========================================== */

.sticky-footer {
    background: var(--bg-white) !important;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 0;
}

.sticky-footer .copyright {
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* ==========================================
   Scroll to Top Button
   ========================================== */

.scroll-to-top {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%) !important;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    align-content: center;
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   Utilities
   ========================================== */

.text-primary {
    color: var(--primary-accent) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.bg-gradient-primary {
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-end) 100%) !important;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }

    .table-responsive {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}