/* Tracker Academy - Main Stylesheet */
/* Phoenix Theme v1.23.0 Compliance */

:root {
    /* Earthy Natural Theme Colors */
    --earth-primary: #8B6F47; /* Rich brown */
    --earth-secondary: #6B5B4F; /* Muted brown */
    --earth-accent: #A67C52; /* Warm tan */
    --earth-green: #5A7C4E; /* Forest green */
    --earth-dark: #3E3A35; /* Dark earth */
    --earth-light: #F5F1EB; /* Cream/beige */
    --earth-sand: #D4C4B0; /* Sand/tan */
    --earth-success: #6B8E5A; /* Natural green */
    --earth-info: #7A9B8A; /* Sage green */
    --earth-warning: #C9A961; /* Golden */
    --earth-danger: #B85C4A; /* Terracotta */
    
    /* Override Bootstrap CSS Variables with Earthy Colors */
    --bs-primary: #8B6F47 !important;
    --bs-primary-rgb: 139, 111, 71 !important;
    --bs-secondary: #6B5B4F !important;
    --bs-info: #7A9B8A !important;
    --bs-success: #6B8E5A !important;
    --bs-warning: #C9A961 !important;
    --bs-danger: #B85C4A !important;
    --bs-link-color: #8B6F47 !important;
    --bs-link-hover-color: #A67C52 !important;
    
    /* Phoenix Theme Colors (kept for compatibility) */
    --phoenix-primary: #8B6F47;
    --phoenix-secondary: #6B5B4F;
    --phoenix-success: #6B8E5A;
    --phoenix-info: #7A9B8A;
    --phoenix-warning: #C9A961;
    --phoenix-danger: #B85C4A;
    --phoenix-dark: #3E3A35;
    --phoenix-light: #F5F1EB;
    
    /* Background Colors */
    --phoenix-body-bg: #F5F1EB;
    --phoenix-body-color: #3E3A35;
    
    /* Sidebar Colors - Earthy Natural Theme */
    --phoenix-sidebar-bg: linear-gradient(180deg, #E8DDD0 0%, #D4C4B0 100%);
    --phoenix-sidebar-bg-solid: #E8DDD0;
    --phoenix-sidebar-border: #C4B5A0;
    
    /* Navbar Colors - Earthy */
    --phoenix-navbar-bg: #F5F1EB;
    --phoenix-navbar-border: #D4C4B0;
    
    /* Card Colors */
    --phoenix-card-bg: #ffffff;
    --phoenix-card-border: #e5e7eb;
    
    /* Text Colors */
    --phoenix-text-primary: #1a1d29;
    --phoenix-text-secondary: #6c757d;
    --phoenix-text-muted: #9ca3af;
    
    /* Border Colors */
    --phoenix-border-color: #e5e7eb;
    --phoenix-border-radius: 0.5rem;
    
    /* Shadows */
    --phoenix-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --phoenix-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --phoenix-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transitions */
    --phoenix-transition: all 0.3s ease;
}

[data-bs-theme="dark"] {
    /* Dark Earthy Theme */
    --phoenix-body-bg: #2A2520;
    --phoenix-body-color: #E8DDD0;
    --phoenix-sidebar-bg: linear-gradient(180deg, #3A332D 0%, #2A2520 100%);
    --phoenix-sidebar-bg-solid: #3A332D;
    --phoenix-sidebar-border: #4A423A;
    --phoenix-navbar-bg: #3A332D;
    --phoenix-navbar-border: #4A423A;
    --phoenix-card-bg: #3A332D;
    --phoenix-card-border: #4A423A;
    --phoenix-text-primary: #E8DDD0;
    --phoenix-text-secondary: #C4B5A0;
    --phoenix-text-muted: #8B7A6B;
    --phoenix-border-color: #4A423A;
    --earth-primary: #A67C52;
    --earth-accent: #C9A961;
    --earth-secondary: #8B7A6B;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--phoenix-body-bg);
    color: var(--phoenix-body-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Enhanced Navbar Styling */
.navbar,
nav.navbar,
.navbar-expand-lg {
    background: linear-gradient(135deg, #F5F1EB 0%, #D4C4B0 100%) !important;
    background-color: #F5F1EB !important;
    background-image: linear-gradient(135deg, #F5F1EB 0%, #D4C4B0 100%) !important;
    border-bottom: 2px solid var(--phoenix-sidebar-border);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(139, 111, 71, 0.1);
}

/* Force navbar background - override any Bootstrap styles */
.navbar::before,
.navbar::after {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--earth-dark) !important;
    text-decoration: none;
    transition: var(--phoenix-transition);
}

.navbar-brand:hover {
    color: var(--earth-primary) !important;
}

.navbar-brand span:not(.brand-icon) {
    color: var(--earth-dark) !important;
}

.navbar-brand:hover span:not(.brand-icon) {
    color: var(--earth-primary) !important;
}

.navbar-brand:hover .brand-icon {
    color: var(--earth-accent);
    transform: scale(1.05);
}

.navbar-brand .brand-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--earth-primary);
    animation: sparkle 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(139, 111, 71, 0.3));
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
}

.navbar-brand .brand-subtitle {
    font-size: 0.75rem;
    color: var(--earth-secondary) !important;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--earth-primary) 0%, var(--earth-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--phoenix-transition);
    border: 2px solid var(--phoenix-sidebar-border);
    box-shadow: 0 2px 6px rgba(139, 111, 71, 0.2);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.4);
    border-color: var(--earth-accent);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.user-avatar-md {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

.dropdown-menu {
    border: 1px solid var(--phoenix-border-color);
    box-shadow: var(--phoenix-shadow-lg);
    border-radius: var(--phoenix-border-radius);
    padding: 0.5rem;
    min-width: 250px;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--phoenix-border-color);
    background-color: var(--phoenix-body-bg);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: calc(var(--phoenix-border-radius) - 0.25rem);
    transition: var(--phoenix-transition);
}

.dropdown-item:hover {
    background-color: rgba(139, 111, 71, 0.1);
    color: var(--earth-primary);
}

/* Sidebar Navigation - Earthy Natural Theme */
.sidebar,
aside.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, #E8DDD0 0%, #D4C4B0 100%) !important;
    background-color: #E8DDD0 !important;
    background-image: linear-gradient(180deg, #E8DDD0 0%, #D4C4B0 100%) !important;
    border-right: 2px solid var(--phoenix-sidebar-border);
    overflow-y: auto;
    z-index: 1000;
    transition: var(--phoenix-transition);
    box-shadow: 2px 0 8px rgba(62, 58, 53, 0.15);
}

/* Force sidebar background - override any Bootstrap or inline styles */
.sidebar::before,
.sidebar::after {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 111, 71, 0.03) 2px,
            rgba(139, 111, 71, 0.03) 4px
        );
    pointer-events: none;
    opacity: 0.5;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(212, 196, 176, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--earth-accent);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--earth-primary);
}

.sidebar-nav {
    list-style: none;
    padding: 1.5rem 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.sidebar-nav-item {
    margin-bottom: 0.5rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--earth-dark);
    text-decoration: none;
    transition: var(--phoenix-transition);
    border-left: 4px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    border-radius: 0 8px 8px 0;
    margin-right: 0.5rem;
}

.sidebar-nav-link,
.sidebar-nav-link:link,
.sidebar-nav-link:visited {
    color: var(--earth-dark) !important;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.1), transparent);
    transition: width 0.3s ease;
    border-radius: 0 8px 8px 0;
}

.sidebar-nav-link:hover {
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.08), rgba(212, 196, 176, 0.3));
    color: var(--earth-primary);
    border-left-color: var(--earth-accent);
    transform: translateX(2px);
}

.sidebar-nav-link:hover::before {
    width: 100%;
}

.sidebar-nav-link.active {
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.15), rgba(212, 196, 176, 0.4));
    color: var(--earth-primary);
    border-left-color: var(--earth-primary);
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(139, 111, 71, 0.1);
}

.sidebar-nav-link.active::before {
    width: 100%;
}

.sidebar-nav-link i {
    width: 24px;
    margin-right: 0.875rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--earth-secondary);
    transition: var(--phoenix-transition);
}

.sidebar-nav-link i.fa-home,
.sidebar-nav-link i.fa-graduation-cap,
.sidebar-nav-link i.fa-clipboard-check,
.sidebar-nav-link i.fa-users-cog {
    color: var(--earth-secondary) !important;
}

.sidebar-nav-link:hover i,
.sidebar-nav-link.active i {
    color: var(--earth-primary);
    transform: scale(1.1);
}

.sidebar-nav-link .chevron {
    margin-left: auto;
    transition: var(--phoenix-transition);
    font-size: 0.75rem;
}

.sidebar-nav-link[data-bs-toggle="collapse"] .chevron {
    transform: rotate(0deg);
}

.sidebar-nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .chevron,
.sidebar-nav-link[data-bs-toggle="collapse"].expanded .chevron {
    transform: rotate(90deg) !important;
}

/* Ensure expanded menus are visible */
.sidebar-nav-link[data-bs-toggle="collapse"][aria-expanded="true"] {
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.12), rgba(212, 196, 176, 0.35));
    color: var(--earth-primary);
    border-left-color: var(--earth-primary);
}

.sidebar-subnav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    background: rgba(212, 196, 176, 0.2);
    border-left: 2px solid rgba(139, 111, 71, 0.2);
    margin-left: 1.5rem;
    margin-right: 0.5rem;
    border-radius: 0 8px 8px 0;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.sidebar-subnav-item {
    margin: 0.25rem 0;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.sidebar-subnav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.5rem 0.625rem 3.75rem;
    color: var(--earth-secondary);
    text-decoration: none;
    transition: var(--phoenix-transition);
    position: relative;
    font-size: 0.9rem;
    border-radius: 0 6px 6px 0;
    z-index: 11;
    pointer-events: auto;
    cursor: pointer;
}

.sidebar-subnav-link::before {
    content: '•';
    position: absolute;
    left: 3rem;
    font-size: 1.2rem;
    color: var(--earth-accent) !important;
    transition: var(--phoenix-transition);
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}

.sidebar-subnav-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.1), transparent);
    transition: width 0.3s ease;
    border-radius: 0 6px 6px 0;
    pointer-events: none;
    z-index: 0;
}

.sidebar-subnav-link:hover {
    color: var(--earth-primary);
    background: rgba(212, 196, 176, 0.4);
    transform: translateX(2px);
}

.sidebar-subnav-link:hover::before {
    color: var(--earth-primary);
    transform: scale(1.2);
}

.sidebar-subnav-link:hover::after {
    width: 100%;
}

.sidebar-subnav-link.active {
    color: var(--earth-primary);
    font-weight: 600;
    background: rgba(139, 111, 71, 0.15);
}

.sidebar-subnav-link.active::before {
    color: var(--earth-primary);
    font-weight: bold;
}

.sidebar-subnav-link.active::after {
    width: 100%;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 2px solid var(--phoenix-sidebar-border);
    background: rgba(139, 111, 71, 0.05);
    position: relative;
    z-index: 1;
}

.sidebar-header h4 {
    color: var(--earth-dark) !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h4,
.sidebar-header h4 * {
    color: var(--earth-dark) !important;
}

.sidebar-header .text-primary {
    color: var(--earth-primary) !important;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: var(--phoenix-transition);
    background-color: var(--phoenix-body-bg) !important;
    background: var(--phoenix-body-bg) !important;
}

.content-wrapper {
    padding: 2rem;
    background-color: var(--phoenix-body-bg) !important;
    background: var(--phoenix-body-bg) !important;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--earth-dark) !important;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(139, 111, 71, 0.1);
}

.page-title,
.page-title * {
    color: var(--earth-dark) !important;
}

.page-description {
    color: var(--earth-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Cards */
.card {
    background-color: var(--phoenix-card-bg);
    border: 1px solid var(--phoenix-card-border);
    border-radius: var(--phoenix-border-radius);
    box-shadow: 0 2px 8px rgba(62, 58, 53, 0.08);
    transition: var(--phoenix-transition);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #F5F1EB 100%);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(139, 111, 71, 0.15);
    transform: translateY(-2px);
    border-color: rgba(139, 111, 71, 0.2);
}

.card-header {
    background-color: var(--phoenix-body-bg);
    border-bottom: 1px solid var(--phoenix-card-border);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--phoenix-text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--phoenix-body-bg);
    border-top: 1px solid var(--phoenix-card-border);
    padding: 1rem 1.5rem;
}

/* Metric Cards */
.metric-card {
    border-left: 4px solid var(--earth-primary);
    background: linear-gradient(135deg, #ffffff 0%, #F5F1EB 100%);
    transition: all 0.3s ease;
}

.metric-card.clickable-metric {
    cursor: pointer;
}

.metric-card.clickable-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.2);
    border-left-width: 6px;
}

.metric-card.clickable-metric:active {
    transform: translateY(0);
}

.metric-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--phoenix-text-primary);
}

.metric-label {
    color: var(--phoenix-text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--phoenix-border-radius);
    background: linear-gradient(135deg, var(--earth-primary) 0%, var(--earth-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(139, 111, 71, 0.2);
}

/* Buttons */
.btn {
    border-radius: var(--phoenix-border-radius);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: var(--phoenix-transition);
}

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

.btn-primary:hover {
    background-color: var(--earth-accent);
    border-color: var(--earth-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
    color: white;
}

/* Tables */
.table-responsive {
    border-radius: var(--phoenix-border-radius);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: var(--phoenix-body-bg);
}

.table thead th {
    border-bottom: 2px solid rgba(139, 111, 71, 0.2);
    font-weight: 600;
    color: var(--earth-dark);
    padding: 1rem;
    background: linear-gradient(180deg, rgba(245, 241, 235, 0.8) 0%, rgba(232, 221, 208, 0.5) 100%);
}

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

.table tbody tr:hover {
    background-color: rgba(212, 196, 176, 0.2);
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid var(--phoenix-border-color);
    border-radius: var(--phoenix-border-radius);
    padding: 0.625rem 1rem;
    transition: var(--phoenix-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--earth-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 111, 71, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--phoenix-text-primary);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--phoenix-danger);
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: calc(var(--phoenix-border-radius) - 0.25rem);
    font-weight: 500;
}

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

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

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

/* Sidebar Section Dividers */
.sidebar-nav-item:not(:first-child) {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(196, 181, 160, 0.3);
}

/* Remove divider from first item after header */
.sidebar-nav-item:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Sidebar Collapsible Sections */
.sidebar-nav-link[data-bs-toggle="collapse"] {
    font-weight: 600;
}

.sidebar-nav-link[data-bs-toggle="collapse"][aria-expanded="true"],
.sidebar-nav-link[data-bs-toggle="collapse"].expanded {
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.12), rgba(212, 196, 176, 0.35)) !important;
    color: var(--earth-primary) !important;
    border-left-color: var(--earth-primary) !important;
}

/* Ensure chevron is rotated for expanded menus */
.sidebar-nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .chevron,
.sidebar-nav-link[data-bs-toggle="collapse"].expanded .chevron {
    transform: rotate(90deg) !important;
}

/* Ensure expanded submenus are visible - but don't use !important to allow Bootstrap to toggle */
.collapse.show {
    display: block;
}

/* Ensure submenu items are clickable */
.collapse.show .sidebar-subnav,
.collapse.show .sidebar-subnav-link {
    pointer-events: auto !important;
    z-index: 10 !important;
}

.collapse.show {
    pointer-events: auto !important;
}

.collapse.show .sidebar-subnav-link {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 11 !important;
}

.sidebar-subnav-item {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Ensure submenu links span is clickable */
.sidebar-subnav-link span {
    pointer-events: none; /* Let clicks pass through to parent link */
    position: relative;
    z-index: 1;
}

/* Enhanced Brand Icon in Sidebar */
.sidebar-header .fa-graduation-cap {
    color: var(--earth-primary);
    filter: drop-shadow(0 2px 4px rgba(139, 111, 71, 0.2));
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        width: 338px; /* 30% wider than 260px (260 * 1.3 = 338) */
        transition: transform 0.3s ease-in-out;
        z-index: 1040;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }

    /* Ensure navbar burger button is visible */
    .sidebar-toggle {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    /* Hide burger button on desktop */
    .sidebar-toggle {
        display: none !important;
    }
    
    /* Ensure sidebar is always visible on desktop */
    .sidebar {
        transform: translateX(0) !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: var(--phoenix-shadow-sm) !important;
}

.shadow {
    box-shadow: var(--phoenix-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--phoenix-shadow-lg) !important;
}

/* Bootstrap Overrides - Remove Blue Colors */
a {
    color: var(--earth-primary);
}

a:hover {
    color: var(--earth-accent);
}

a:focus {
    color: var(--earth-primary);
}

/* Override Bootstrap primary blue - Force earthy colors */
.text-primary,
.text-primary * {
    color: var(--earth-primary) !important;
}

.bg-primary,
.bg-primary * {
    background-color: var(--earth-primary) !important;
}

.btn-primary {
    background-color: var(--earth-primary) !important;
    border-color: var(--earth-primary) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--earth-accent) !important;
    border-color: var(--earth-accent) !important;
    color: white !important;
}

/* Remove any blue gradients */
.navbar,
.navbar * {
    background-image: none !important;
}

/* Ensure no blue backgrounds appear */
[style*="background-color: #"],
[style*="background: #"] {
    /* Override any inline blue styles */
}

/* Override Bootstrap link colors */
.table a,
.card a,
a[href] {
    color: var(--earth-primary) !important;
}

.table a:hover,
.card a:hover,
a[href]:hover {
    color: var(--earth-accent) !important;
}

/* Override any blue backgrounds */
.bg-info {
    background-color: var(--earth-info) !important;
}

/* Ensure navbar brand text is earthy */
.navbar-brand {
    color: var(--earth-dark) !important;
}

.navbar-brand:hover {
    color: var(--earth-primary) !important;
}

/* Override any Bootstrap blue text */
.text-info {
    color: var(--earth-info) !important;
}

/* Ensure links in tables use earthy colors */
.table td a,
.table th a {
    color: var(--earth-primary) !important;
    text-decoration: none;
}

.table td a:hover,
.table th a:hover {
    color: var(--earth-accent) !important;
    text-decoration: underline;
}

/* Force override any remaining blue colors */
* {
    /* Remove any blue color inheritance */
}

/* Specific overrides for common Bootstrap classes that might show blue */
.navbar-nav .nav-link {
    color: var(--earth-dark) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--earth-primary) !important;
}

/* Override any link colors that might be blue */
a:not(.btn):not(.badge) {
    color: var(--earth-primary) !important;
}

a:not(.btn):not(.badge):hover {
    color: var(--earth-accent) !important;
}

/* Ensure sidebar links are never blue */
.sidebar a,
.sidebar-nav-link,
.sidebar-subnav-link {
    color: var(--earth-dark) !important;
}

.sidebar a:hover,
.sidebar-nav-link:hover,
.sidebar-subnav-link:hover {
    color: var(--earth-primary) !important;
}

.sidebar a.active,
.sidebar-nav-link.active,
.sidebar-subnav-link.active {
    color: var(--earth-primary) !important;
}

/* ============================================
   CRITICAL OVERRIDES - Force Earthy Colors
   These must be at the end to override Bootstrap
   ============================================ */

/* Override ALL Bootstrap primary blue colors with maximum specificity */
html body .text-primary,
html body .text-primary *,
html body i.text-primary,
html body .fa-graduation-cap.text-primary,
html body .sidebar-header .text-primary,
html body .navbar-brand .text-primary {
    color: #8B6F47 !important;
}

html body .bg-primary,
html body .bg-primary * {
    background-color: #8B6F47 !important;
    background: #8B6F47 !important;
}

/* Override Bootstrap link colors globally */
html body a,
html body a:link,
html body a:visited,
html body .table a,
html body .card a,
html body .navbar a,
html body .sidebar a {
    color: #8B6F47 !important;
}

html body a:hover,
html body a:focus,
html body .table a:hover,
html body .card a:hover,
html body .navbar a:hover,
html body .sidebar a:hover {
    color: #A67C52 !important;
}

/* Force sidebar background - no blue */
html body .sidebar,
html body aside.sidebar {
    background: linear-gradient(180deg, #E8DDD0 0%, #D4C4B0 100%) !important;
    background-color: #E8DDD0 !important;
    background-image: linear-gradient(180deg, #E8DDD0 0%, #D4C4B0 100%) !important;
}

/* Force navbar background - no blue */
html body .navbar,
html body nav.navbar {
    background: linear-gradient(135deg, #F5F1EB 0%, #D4C4B0 100%) !important;
    background-color: #F5F1EB !important;
    background-image: linear-gradient(135deg, #F5F1EB 0%, #D4C4B0 100%) !important;
}

/* Override any blue borders */
html body .sidebar,
html body .navbar,
html body .card,
html body .table {
    border-color: #D4C4B0 !important;
}

/* Force sidebar navigation link colors */
html body .sidebar-nav-link,
html body .sidebar-nav-link:link,
html body .sidebar-nav-link:visited,
html body .sidebar-nav-link:active,
html body .sidebar-subnav-link,
html body .sidebar-subnav-link:link,
html body .sidebar-subnav-link:visited {
    color: #3E3A35 !important;
}

html body .sidebar-nav-link:hover,
html body .sidebar-nav-link.active,
html body .sidebar-subnav-link:hover,
html body .sidebar-subnav-link.active {
    color: #8B6F47 !important;
}

/* Override sidebar icons */
html body .sidebar-nav-link i,
html body .sidebar-subnav-link i,
html body .sidebar i.fa,
html body .sidebar i.fas {
    color: #6B5B4F !important;
}

html body .sidebar-nav-link:hover i,
html body .sidebar-nav-link.active i,
html body .sidebar-subnav-link:hover i {
    color: #8B6F47 !important;
}

/* Override buttons */
html body .btn-primary,
html body button.btn-primary,
html body a.btn-primary {
    background-color: #8B6F47 !important;
    border-color: #8B6F47 !important;
    color: #ffffff !important;
}

html body .btn-primary:hover,
html body .btn-primary:focus,
html body .btn-primary:active,
html body button.btn-primary:hover {
    background-color: #A67C52 !important;
    border-color: #A67C52 !important;
    color: #ffffff !important;
}

/* Override badges */
html body .badge.bg-primary,
html body .badge.bg-success {
    background-color: #8B6F47 !important;
}

html body .badge.bg-success {
    background-color: #6B8E5A !important;
}

/* Remove any blue gradients or backgrounds */
html body * {
    background-image: none !important;
}

html body .sidebar,
html body .navbar,
html body .card,
html body .metric-card {
    background-image: linear-gradient(135deg, #F5F1EB 0%, #E8DDD0 100%) !important;
}

html body .sidebar {
    background-image: linear-gradient(180deg, #E8DDD0 0%, #D4C4B0 100%) !important;
}

/* Override any inline styles that might be blue */
html body [style*="color:"] {
    /* Let specific overrides handle this */
}

/* Force navbar brand colors */
html body .navbar-brand,
html body .navbar-brand span,
html body .navbar-brand .brand-subtitle {
    color: #3E3A35 !important;
}

html body .navbar-brand:hover,
html body .navbar-brand:hover span {
    color: #8B6F47 !important;
}

/* Override table link colors */
html body .table td a,
html body .table th a,
html body .table a {
    color: #8B6F47 !important;
}

html body .table td a:hover,
html body .table th a:hover {
    color: #A67C52 !important;
}

/* Force sidebar header title - Final override */
html body .sidebar-header h4,
html body .sidebar-header h4 span,
html body .sidebar-header h4 * {
    color: #3E3A35 !important;
}

/* Force sidebar bullet points - Final override */
html body .sidebar-subnav-link::before {
    color: #A67C52 !important;
}

/* Force main content background - Final override */
html body .main-content,
html body main.main-content,
html body .content-wrapper {
    background-color: #F5F1EB !important;
    background: #F5F1EB !important;
    background-image: none !important;
}

/* Force page titles - Final override */
html body .page-title,
html body .page-title *,
html body h1:not(.navbar-brand),
html body h2 {
    color: #3E3A35 !important;
}
