/* =========================================
   Core Layout & Reset
   ========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', 'Segoe UI', sans-serif; 
}

body { 
    background-color: #f4f7fa; 
    color: #1a1a1a; 
    line-height: 1.6; 
    transition: background-color 0.3s, color 0.3s; 
}

.admin-wrapper { 
    display: flex; 
    min-height: 100vh; 
}

/* =========================================
   Global Dark Mode Overrides
   ========================================= */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

/* Sidebar behavior - Keep it dark blue */
body.dark-mode .sidebar {
    background-color: #00336d !important;
}

/* Targeted Overrides for ALL pages (Cards, Containers, Forms) */
body.dark-mode .form-card, 
body.dark-mode .table-container, 
body.dark-mode .detail-card,
body.dark-mode .stat-card {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

/* Table Text & Formatting in Dark Mode */
body.dark-mode table, 
body.dark-mode th, 
body.dark-mode td {
    color: #e0e0e0 !important;
}

body.dark-mode th {
    background-color: #252525 !important;
    color: #007bff !important; /* Keep brand blue for headers */
    border-bottom-color: #4a5568 !important;
}

body.dark-mode td {
    border-bottom-color: #2d3748 !important;
}

body.dark-mode tr:hover {
    background-color: #2a2a2a !important;
}

/* Form Inputs & Filters in Dark Mode */
body.dark-mode input, 
body.dark-mode select, 
body.dark-mode textarea {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #ffffff !important;
}

/* Detail Items & Labels in Dark Mode */
body.dark-mode .detail-item p,
body.dark-mode .detail-row span {
    color: #ffffff !important;
}

body.dark-mode header h1,
body.dark-mode h2,
body.dark-mode .stat-card h2 {
    color: #ffffff !important;
}

body.dark-mode p, 
body.dark-mode label {
    color: #aaaaaa;
}

/* Sidebar Active Adjustment in Dark Mode */
body.dark-mode .sidebar ul li.active { 
    background: #1a202c !important; 
    color: #ffffff !important; 
}

/* =========================================
   Sidebar Navigation
   ========================================= */
.sidebar { 
    width: 260px; 
    background-color: #004494; 
    color: white; 
    padding: 25px 15px; 
    flex-shrink: 0; 
    position: sticky; 
    top: 0; 
    height: 100vh; 
}

.sidebar h2 { 
    margin-bottom: 40px; 
    text-align: center; 
    font-size: 1.2rem; 
    letter-spacing: 1px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    padding-bottom: 20px; 
}

.sidebar ul li { 
    padding: 12px 20px; 
    list-style: none; 
    cursor: pointer; 
    border-radius: 8px; 
    transition: all 0.2s ease; 
    margin-bottom: 8px; 
    font-size: 14px; 
    display: flex; 
    align-items: center; 
}

.sidebar ul li:hover { 
    background: rgba(255, 255, 255, 0.1); 
}

.sidebar ul li.active { 
    background: #ffffff; 
    color: #004494; 
    font-weight: 700; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

.sidebar ul li#logout-btn { 
    margin-top: auto; 
    color: #ffcccc; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 20px; 
}

.sidebar ul li#logout-btn:hover { 
    background: #d9534f; 
    color: white; 
}

/* =========================================
   Main Content Area
   ========================================= */
.content { 
    flex: 1; 
    padding: 40px; 
    max-width: 1400px; 
    margin: 0 auto; 
}

header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 40px; 
}

header h1 { 
    font-size: 24px; 
    font-weight: 700; 
    color: #333; 
}

.user-stats { 
    background: #004494; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 30px; 
    font-size: 13px; 
    font-weight: 600; 
}

/* =========================================
   Dashboard Grid System
   ========================================= */
.dashboard-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 25px; 
    margin-bottom: 40px; 
}

.stat-card { 
    background: white; 
    padding: 30px; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    border: 1px solid #edf2f7; 
    transition: transform 0.2s, background-color 0.3s; 
}

.stat-card:hover { 
    transform: translateY(-5px); 
}

.stat-card label { 
    font-size: 11px; 
    text-transform: uppercase; 
    color: #718096; 
    font-weight: 800; 
    letter-spacing: 0.5px; 
}

.stat-card h2 { 
    font-size: 36px; 
    margin: 12px 0; 
    color: #1a202c; 
    font-weight: 800; 
}

.stat-card p { 
    font-size: 14px; 
    color: #a0aec0; 
}

/* =========================================
   Tables & Data
   ========================================= */
.table-container { 
    background: white; 
    padding: 25px; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
    margin-top: 30px; 
}

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

th { 
    background: #f8fafc; 
    padding: 15px; 
    text-align: left; 
    font-size: 12px; 
    text-transform: uppercase; 
    color: #718096; 
    font-weight: 700; 
    border-bottom: 2px solid #edf2f7; 
}

td { 
    padding: 18px 15px; 
    text-align: left; 
    border-bottom: 1px solid #edf2f7; 
    font-size: 14px; 
    color: #4a5568; 
}

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

/* =========================================
   Status Badges
   ========================================= */
.status-badge { 
    padding: 6px 12px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase; 
}

.status-badge.confirmed { 
    background: #c6f6d5; 
    color: #22543d; 
}

.status-badge.pending { 
    background: #feebc8; 
    color: #744210; 
}

/* =========================================
   Login Page Specific Styling
   ========================================= */
.login-container { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #f0f4f8; 
}

body.dark-mode.login-container { 
    background: #1a202c !important; 
}

.login-card { 
    background: white; 
    padding: 45px; 
    border-radius: 20px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.1); 
    width: 100%; 
    max-width: 420px; 
    text-align: center; 
}

.login-logo { 
    width: 180px; 
    margin-bottom: 30px; 
}

.input-group { 
    position: relative; 
    margin-bottom: 20px; 
    text-align: left; 
}

.input-group label { 
    display: block; 
    font-size: 12px; 
    font-weight: 700; 
    color: #4a5568; 
    margin-bottom: 8px; 
    text-transform: uppercase; 
}

.input-group input { 
    width: 100%; 
    padding: 14px 16px; 
    border: 2px solid #e2e8f0; 
    border-radius: 10px; 
    font-size: 15px; 
    transition: 0.2s; 
    outline: none; 
}

.input-group input:focus { 
    border-color: #004494; 
    box-shadow: 0 0 0 4px rgba(0,68,148,0.1); 
}

/* Password Eye Icon */
.password-wrapper { 
    position: relative; 
}

.toggle-password { 
    position: absolute; 
    right: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    cursor: pointer; 
    color: #a0aec0; 
    font-size: 18px; 
}

.toggle-password:hover { 
    color: #004494; 
}

/* =========================================
   Buttons
   ========================================= */
.primary-btn { 
    width: 100%; 
    background: #004494; 
    color: white; 
    padding: 16px; 
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 16px; 
    transition: 0.3s; 
}

.primary-btn:hover { 
    background: #00336d; 
    box-shadow: 0 8px 15px rgba(0,68,148,0.2); 
}

.sec-btn { 
    background: #ddd; 
    color: #333;
    padding: 10px 20px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600;
}

/* =========================================
   Internal Data Highlighting (Darkened)
   ========================================= */
.internal-data {
    background: #fff4e5;
    border-left: 5px solid #ffa000;
    padding: 15px;
    margin: 10px 0;
}

body.dark-mode .internal-data {
    background: #2c1d01 !important;
    border-left-color: #ffa000 !important;
}