/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary: #004a99;    /* LEAD Official Blue */
    --primary-hover: #003366;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 260px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    color: var(--dark);
    line-height: 1.6;
}

/* =========================================
   2. LAYOUT (SIDEBAR & MAIN CONTENT)
   ========================================= */
.sidebar {
    height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.logo-section h3 {
    margin: 0;
    letter-spacing: 1px;
    color: #fff;
}

.nav-menu {
    flex-grow: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-menu a {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    color: #ced4da;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}

.nav-menu i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.nav-menu a:hover, .nav-menu a.active {
    background: var(--primary);
    color: white;
}

.nav-label {
    font-size: 0.7rem;
    color: #6c757d;
    padding: 15px 25px 5px;
    text-transform: uppercase;
    font-weight: bold;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* =========================================
   3. DASHBOARD COMPONENTS (CARDS & TABLES)
   ========================================= */
.container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary);
}

.stat-card h4 { margin: 0; color: var(--secondary); font-size: 0.8rem; text-transform: uppercase; }
.stat-card .value { font-size: 1.8rem; font-weight: bold; margin-top: 5px; }

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #dee2e6;
    color: var(--secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

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

tr:hover { background-color: #fdfdfd; }

/* =========================================
   4. FORMS, BUTTONS & BADGES
   ========================================= */
input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0 20px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,74,153,0.1);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: 0.2s;
}

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

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

.badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
}

/* Status Colors */
.badge-open        { background: #e3f2fd; color: #0d47a1; }
.badge-in-progress { background: #fff3cd; color: #856404; }
.badge-resolved    { background: #d1e7dd; color: #0f5132; }
.badge-urgent      { background: #f8d7da; color: #721c24; }
.badge-closed      { background: #e2e3e5; color: #383d41; }

/* =========================================
   5. LOGIN PAGE SPECIFIC
   ========================================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #002a55 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

/* =========================================
   6. RESPONSIVE DESIGN
   ========================================= */
.menu-toggle {
    display: none;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sidebar { left: -260px; }
    .sidebar.active { left: 0; }
    .main-content { margin-left: 0; padding: 15px; }
    .menu-toggle { display: block; margin-bottom: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
}
.logo-section img {
    max-width: 150px; /* Limits the size on large screens */
    display: block;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1)); /* Optional: adds a soft depth */
}

.login-card {
    padding: 40px;
    border-top: 5px solid var(--primary); /* Optional: Adds a branded stripe at the top */
}
