/* Root Variables */
:root {
    --primary-color: #ff8c42;
    --primary-dark: #e67e22;
    --primary-light: #ffb366;
    --secondary-color: #ffffff;
    --accent-color: #ff8c42;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #95a5a6;
    --text-white: #ffffff;
    
    --bg-primary: #fefefe;
    --bg-secondary: #f8f9fa;
    --bg-sidebar: #ffffff !important;
    --bg-header: #ff8c42;
    
    --border-color: #ecf0f1;
    --border-dark: #2c3e50;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 15px rgba(0,0,0,0.12);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

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

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background-color: white !important; /* Force white background with !important */
    color: var(--text-primary) !important; /* Force dark text color */
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    background-color: white !important;
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sidebar-header h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary) !important;
    text-align: center;
    letter-spacing: -0.025em;
}

.sidebar.collapsed .sidebar-header h2 {
    font-size: var(--font-size-sm);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-primary) !important;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: #fff5f0; /* Light orange background on hover */
    border-left-color: var(--primary-color);
    color: var(--primary-color) !important;
    transform: translateX(2px); /* Subtle slide effect */
}

.nav-link.active {
    background-color: #fff2ec; /* Slightly darker orange background */
    border-left-color: var(--primary-color);
    color: var(--primary-color) !important;
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.nav-text {
    font-size: var(--font-size-base);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.sidebar.collapsed .nav-text {
    display: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: 70px;
}

/* Header Styles */
.main-header {
    background-color: var(--bg-header);
    color: var(--text-white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.toggle-sidebar:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn {
    background-color: var(--text-white);
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-1px);
}

/* Content Area */
.content-area {
    padding: 2rem;
}

.page-title {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-danger {
    background-color: #dc3545;
    color: var(--text-white);
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--primary-color);
    color: var(--text-white);
    font-weight: 600;
}

.table tr:hover {
    background-color: var(--bg-secondary);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: var(--font-size-lg);
    opacity: 0.9;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.login-card {
    background-color: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #cce7ff;
    border-color: #b8daff;
    color: #004085;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Force white sidebar - highest specificity */
html body .app-container .sidebar,
html body .app-container aside.sidebar,
html body .sidebar,
.app-container .sidebar,
aside.sidebar,
#sidebar {
    background-color: white !important;
    background: white !important;
}

html body .app-container .sidebar .sidebar-header,
html body .app-container aside.sidebar .sidebar-header,
html body .sidebar .sidebar-header,
.app-container .sidebar .sidebar-header,
aside.sidebar .sidebar-header,
#sidebar .sidebar-header {
    background-color: white !important;
    background: white !important;
}

html body .app-container .sidebar .nav-link,
html body .app-container aside.sidebar .nav-link,
html body .sidebar .nav-link,
.app-container .sidebar .nav-link,
aside.sidebar .nav-link,
#sidebar .nav-link {
    color: #000000 !important;
}

html body .app-container .sidebar .sidebar-header h2,
html body .app-container aside.sidebar .sidebar-header h2,
html body .sidebar .sidebar-header h2,
.app-container .sidebar .sidebar-header h2,
aside.sidebar .sidebar-header h2,
#sidebar .sidebar-header h2 {
    color: #000000 !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}