﻿/* =====================================================
   BASE / RESET
===================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: #f5f6fa;
    color: #111;
    line-height: 1.4;
}

/* =====================================================
   PAGE WRAPPER
===================================================== */
.wrap {
    max-width: 1000px;
    margin: 32px auto;
    padding: 0 16px;
}

/* =====================================================
   HEADER
===================================================== */
.header {
    background: #ffffff;
    border: 1px solid #e1e3ea;
    border-radius: 14px;
    padding: 18px 20px 16px;
    margin-bottom: 18px;
    position: relative;
}

    .header::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 5px;
        width: 100%;
        background: #2f3a4a; /* authoritative, not black */
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
    }

    .header h1 {
        margin: 0 0 6px 0;
        font-size: 30px;
        font-weight: 800;
    }

.sub {
    margin: 0;
    color: #555;
    font-size: 13px;
}

/* =====================================================
   CARDS
===================================================== */
.card {
    background: #ffffff;
    border: 1px solid #e1e3ea;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
}

/* =====================================================
   FORM ELEMENTS
===================================================== */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.input,
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cfd3e0;
    font-size: 14px;
    background: #ffffff;
}

    .input:focus,
    select:focus {
        outline: none;
        border-color: #2f3a4a;
    }

.hint {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

/* =====================================================
   GRID LAYOUT
===================================================== */
.grid4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.span2 {
    grid-column: span 2;
}

/* =====================================================
   ROW UTILITIES
===================================================== */
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.between {
    justify-content: space-between;
}

/* =====================================================
   BUTTONS
===================================================== */
.btn {
    padding: 9px 14px;
    border-radius: 8px;
    border: 1px solid #cfd3e0;
    background: #2f3a4a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .btn.secondary {
        background: #ffffff;
        color: #111;
    }

    .btn:disabled {
        background: #b8bcc7;
        cursor: not-allowed;
    }

/* =====================================================
   STATUS / TEXT
===================================================== */
.status {
    font-size: 13px;
    color: #555;
    margin-top: 10px;
}

/* =====================================================
   TABLE / GRIDVIEW
===================================================== */
.tableWrap {
    margin-top: 14px;
    border: 1px solid #e1e3ea;
    border-radius: 12px;
    overflow-x: auto;
}

.gridview {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .gridview th {
        background: #f0f2f7;
        font-weight: 700;
        padding: 10px;
        text-align: left;
        border-bottom: 1px solid #e1e3ea;
    }

    .gridview td {
        padding: 10px;
        border-bottom: 1px solid #eaecef;
    }

/* =====================================================
   PRINT STYLES (IMPORTANT FOR PUBLIC)
===================================================== */
@media print {
    body {
        background: #ffffff;
    }

    .btn,
    .hint {
        display: none !important;
    }

    .card,
    .header {
        box-shadow: none;
        border: 1px solid #000;
    }

    .wrap {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}
.officeCard {
    padding-top: 16px;
}

.officeTitle {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.officeDates {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e1e3ea;
    border-radius: 12px;
    background: #fafbff;
}

.dateItem {
    min-width: 0;
}

.dateLabel {
    font-size: 11px;
    color: #666;
    font-weight: 700;
}

.dateValue {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .officeDates {
        grid-template-columns: 1fr 1fr;
    }
}

.officeDates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #e1e3ea;
    border-radius: 12px;
    background: #fafbff;
}

/* Qualifying Period gets its own row */
.qualLine {
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

/* Container for Primary / General / Election */
.dateRow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

/* Date “pill” styling */
.datePill {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #d8dbe8;
    background: #ffffff;
    font-size: 13px;
    display: flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}

.datePillLabel {
    font-weight: 800;
    color: #2f3a4a;
}

.datePillValue {
    font-weight: 700;
    color: #111;
}
