/* Root Variables */
:root {
    --primary: #1A2A44;
    --accent: #D4AF37;
    --background: #FFFFFF;
    --secondary: #E5E7EB;
    --text: #111827;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Container */
.container-fluid {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.row {
    flex: 1;
    margin: 0;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.login-card .card-body {
    background: var(--background);
}

.company-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1020;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: var(--background);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text);
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: var(--secondary);
    color: var(--primary);
    padding-left: 1.5rem;
}

.sidebar .nav-link.active {
    color: var(--accent);
    background-color: var(--primary);
}

.sidebar .nav-link i {
    width: 1.5rem;
}

/* Main Content Area */
main {
    margin-top: 56px;
    padding-bottom: 20px;
    min-height: calc(100vh - 56px);
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--accent);
}

.bg-accent {
    background-color: var(--accent) !important;
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

/* Statistics Cards */
.stat-card, .dashboard-card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.stat-card:hover, .dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-primary-light {
    background: rgba(26, 42, 68, 0.1);
}

.bg-success-light {
    background: rgba(40, 167, 69, 0.1);
}

.bg-warning-light {
    background: rgba(255, 193, 7, 0.1);
}

.bg-info-light {
    background: rgba(23, 162, 184, 0.1);
}

.bg-accent-light {
    background: rgba(212, 175, 55, 0.1);
}

.bg-danger-light {
    background: rgba(220, 53, 69, 0.1);
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.quick-action-link {
    background: var(--background);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text);
}

.quick-action-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quick-action-link:hover i,
.quick-action-link:hover span {
    color: white;
}

.quick-action-link i {
    color: var(--primary);
    transition: color 0.3s;
}

.quick-action-link span {
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
}

/* Card Header */
.card-header {
    background: var(--background);
    border-bottom: 2px solid var(--secondary);
    padding: 1rem 1.25rem;
}

.card-header h5 {
    font-weight: 600;
    color: var(--primary);
}

.card-header.bg-primary {
    background-color: var(--primary) !important;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Border Left Variants */
.border-left-primary {
    border-left: 4px solid var(--primary);
}

.border-left-success {
    border-left: 4px solid #28a745;
}

.border-left-warning {
    border-left: 4px solid #ffc107;
}

.border-left-danger {
    border-left: 4px solid #dc3545;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #0f1e33;
    border-color: #0f1e33;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Form Controls */
.form-control:focus, .input-group-text:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Tables */
.table thead th {
    background-color: var(--primary);
    color: white;
    border-bottom: none;
}

.table-hover tbody tr:hover {
    background-color: var(--secondary);
}

/* Alerts */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Footer Styles - Fixed at Bottom */
.footer {
    margin-top: auto;
    background-color: var(--background) !important;
    border-top: 1px solid var(--secondary);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    position: relative;
    bottom: 0;
    width: 100%;
    z-index: 99;
}

/* Text Colors */
.text-primary {
    color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-gray-800 {
    color: var(--text) !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Font Weights */
.font-weight-bold {
    font-weight: 700;
}

.text-xs {
    font-size: 0.7rem;
}

/* Input Group */
.input-group-text {
    background-color: var(--secondary);
    border-color: #ced4da;
}

/* Toggle Password Button */
.toggle-password {
    border-left: none;
}

.toggle-password:hover {
    background-color: var(--secondary);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        width: 100%;
    }
    
    main {
        margin-top: 0;
        min-height: auto;
    }
    
    .login-card {
        margin: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon i {
        font-size: 1.5rem;
    }
    
    .stat-card h2 {
        font-size: 1.5rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .quick-action-link {
        padding: 15px 5px;
    }
    
    .quick-action-link i {
        font-size: 1.5rem;
    }
    
    .quick-action-link span {
        font-size: 0.75rem;
    }
    
    .footer {
        text-align: center;
        position: relative;
    }
}

@media (max-width: 576px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .welcome-banner h3 {
        font-size: 1.25rem;
    }
    
    .footer .col-md-6 {
        margin-bottom: 10px;
    }
    
    .footer .col-md-6:last-child {
        margin-bottom: 0;
    }
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    main {
        margin: 0;
        padding: 0;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}