/* assets/css/style.css */

:root {
    --primary-color: #EA580C; /* Construction Orange */
    --secondary-color: #1E40AF; /* Deep Blue */
    --accent-color: #F97316; /* Bright Orange */
    --dark-color: #1E293B; /* Slate Dark */
    --bg-light: #FFF7ED; /* Warm Light */
    --success-color: #16A34A; /* Green */
    --warning-color: #EAB308; /* Yellow */
    --danger-color: #DC2626; /* Red */
    --sidebar-start: #1E293B;
    --sidebar-end: #0F172A;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #334155;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    height: 100%;
    background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    overflow-y: scroll !important;
    overflow-x: hidden;
    scrollbar-width: auto; /* Standard scrollbar for visibility */
}

.sidebar::-webkit-scrollbar {
    width: 8px;
    display: block !important;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 0;
}

.sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar .sidebar-header h3 i {
    color: var(--primary-color);
}

.sidebar ul.components {
    padding: 20px 0;
}

.sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.sidebar ul li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--primary-color);
}

.sidebar ul li.active > a {
    color: #fff;
    background: linear-gradient(90deg, rgba(234, 88, 12, 0.15) 0%, transparent 100%);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar ul li.active > a i {
    color: var(--primary-color);
}

/* Page Content */
.page-content {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Navbar inside content */
.top-navbar {
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 12px 24px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(234, 88, 12, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 24px;
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.stat-icon.orange { background: rgba(234, 88, 12, 0.1); color: var(--primary-color); }
.stat-icon.blue { background: rgba(30, 64, 175, 0.1); color: var(--secondary-color); }
.stat-icon.green { background: rgba(22, 163, 74, 0.1); color: var(--success-color); }
.stat-icon.yellow { background: rgba(234, 179, 8, 0.1); color: var(--warning-color); }

.stat-content h5 {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 4px 6px rgba(234, 88, 12, 0.4);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: #172554;
    border-color: #172554;
}

/* Badges */
.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* Tables */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table th {
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Forms */
.form-control, .form-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(234, 88, 12, 0.25);
}

/* Login Page */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    margin: 0;
    padding: 0;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    display: flex;
}

.login-image {
    flex: 1;
    background: linear-gradient(45deg, rgba(30, 64, 175, 0.8), rgba(234, 88, 12, 0.8)), url('https://images.unsplash.com/photo-1541888081622-1db37aa25790?auto=format&fit=crop&q=80') center/cover;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 40px;
    text-align: center;
}

@media (min-width: 768px) {
    .login-image {
        display: flex;
    }
}

.login-form-container {
    flex: 1;
    padding: 40px;
}

.demo-credentials {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
    }
    .sidebar.active {
        margin-left: 0;
    }
    .page-content {
        margin-left: 0;
        padding: 15px;
    }
}
