:root {
    --navy: #1a2a6c;
    --slate: #708090;
    --goldenrod: #f4c430;
    --light-grey: #f8f9fa;
    --white: #ffffff;
    --danger: #d9534f;
    --text-main: #333333;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

body { background-color: var(--light-grey); color: var(--text-main); line-height: 1.6; }

.hidden { display: none !important; }

/* --- DASHBOARD STYLES --- */
.app-container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

.main-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 2rem; 
    flex-wrap: wrap; 
    gap: 1rem;
}

.brand h1 { color: var(--navy); font-size: 2rem; text-transform: uppercase; letter-spacing: 1px; }
.brand .highlight { color: var(--goldenrod); }
.brand p { color: var(--slate); font-size: 0.9rem; }

.stats-bar { display: flex; gap: 1.5rem; }
.stat-card { 
    background: var(--navy); 
    color: white; 
    padding: 1rem 1.5rem; 
    border-radius: 8px; 
    text-align: center; 
    min-width: 140px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.stat-label { display: block; font-size: 0.75rem; text-transform: uppercase; opacity: 0.8; }
.stat-value { font-size: 1.4rem; font-weight: bold; color: var(--goldenrod); }

.content-grid { 
    display: grid; 
    grid-template-columns: 350px 1fr; 
    gap: 2rem; 
    align-items: start;
}

.card { 
    background: var(--white); 
    padding: 1.5rem; 
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
    border-top: 5px solid var(--navy);
}

.card h2 { margin-bottom: 1.5rem; color: var(--navy); font-size: 1.2rem; }

.form-group { margin-bottom: 1.2rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--slate); }
input, textarea { 
    width: 100%; padding: 0.7rem; border: 1px solid #ddd; border-radius: 6px; 
    font-size: 0.9rem; transition: var(--transition);
}
input:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1); }

button { cursor: pointer; border: none; border-radius: 6px; font-weight: 600; transition: var(--transition); }
.btn-primary { background: var(--navy); color: white; padding: 0.8rem 1.5rem; width: 100%; }
.btn-primary:hover { background: #253a91; transform: translateY(-2px); }
.btn-secondary { background: var(--slate); color: white; padding: 0.6rem 1rem; }
.btn-highlight { background: var(--goldenrod); color: var(--navy); padding: 0.6rem 1rem; }
.btn-danger { background: var(--danger); color: white; padding: 0.4rem 0.8rem; }

.list-controls { 
    display: flex; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap;
}
#search-bar { width: 300px; }

.table-wrapper { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: var(--navy); color: white; padding: 1rem; font-size: 0.85rem; text-transform: uppercase; }
td { padding: 1rem; border-bottom: 1px solid #eee; font-size: 0.9rem; }
tr:hover { background-color: #fcfcfc; }

/* --- OFFICIAL REPORT STYLES (The "Paper" Look) --- */
@page {
    size: landscape;
    margin: 0.5in;
}

.report-container { 
    background: #e0e0e0; 
    padding: 3rem 1rem; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.report-sheet {
    background: white;
    width: 100%;
    max-width: 1050px;
    padding: 0.6in;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.report-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 250px;
}

.logo-text {
    font-family: "Times New Roman", serif;
    line-height: 1.2;
}

.rsl-main { font-weight: bold; font-size: 1.5rem; }
.rsl-sub { font-size: 0.65rem; text-transform: uppercase; }

.report-title {
    flex-grow: 1;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-right: 250px; /* Offset to center title regardless of logo */
}

.official-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid black;
    font-family: Arial, sans-serif;
}

.official-table th {
    background-color: #333 !important;
    color: white !important;
    text-align: left;
    padding: 10px;
    font-size: 0.9rem;
    border: 1px solid black;
}

.official-table td {
    border: 1px solid black;
    padding: 12px 10px;
    height: 35px;
    font-size: 0.9rem;
    color: black;
}

.summary-bar {
    margin-top: 15px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    border: 2px solid black;
    background: white;
}

.summary-item {
    padding: 12px 8px;
    border-right: 1px solid black;
    display: flex;
    align-items: baseline;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
}

.summary-item:last-child { border-right: none; }
.summary-item .label { font-weight: bold; white-space: nowrap; }
.summary-item .underline { flex-grow: 1; border-bottom: 1px solid black; margin-left: 5px; min-width: 40px; }
.summary-item .value { margin-left: 5px; font-weight: bold; }

.report-controls {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Modal */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; 
    z-index: 1000; 
}
.modal { background: white; padding: 2rem; border-radius: 12px; max-width: 400px; text-align: center; }
.modal-btns { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

/* Responsive */
@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
    .main-header { flex-direction: column; text-align: center; }
    .stats-bar { justify-content: center; }
}

@media print {
    .report-controls, .app-container, .modal-overlay { display: none !important; }
    .report-container { padding: 0; background: white; }
    .report-sheet { box-shadow: none; width: 100%; max-width: none; padding: 0; }
    body { background: white; }
}
