:root {
    --blue: #0064A4;
    --blue-dark: #00508a;
    --gold: #FFD200;
    --bg: #eef2f7;
    --card: #fff;
    --text: #1c2b3a;
    --muted: #637080;
    --border: #ccd8e4;
    --green: #1a7a3c;
    --green-bg: #eaf4ee;
    --red: #c0392b;
    --red-bg: #fdecea;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Header ── */
header {
    background: var(--blue);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.6rem 2rem 1rem;
    gap: 0.3rem;
}

.header-logo {
    height: 46px;
    width: auto;
    margin-bottom: 0.35rem;
    display: block;
}

.header-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.15;
}

.header-subtitle {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 2px;
}

/* ── Tab bar ── */
.tab-bar {
    display: flex;
    justify-content: center;
    margin-top: 0.9rem;
}

.tab {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 0.6rem 1.75rem;
    border-bottom: 2.5px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.tab.active {
    color: white;
    border-bottom-color: var(--gold);
}

/* ── Main content ── */
main {
    flex: 1;
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Section label ── */
.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ── Fundraiser list ── */
#fundraiserList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── State messages ── */
.state-msg {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px 24px;
    text-align: center;
    color: var(--muted);
}

.state-msg strong {
    display: block;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 6px;
}

.state-msg p {
    font-size: 13px;
}

/* ── Cards ── */
.card {
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.15s, transform 0.15s;
}

.card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
    transform: translateY(-1px);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 3px;
}

.card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.status-tag {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding-top: 2px;
    flex-shrink: 0;
}

.status-active {
    color: var(--green);
}

.status-upcoming {
    color: var(--muted);
}

.card-org {
    font-size: 13px;
    color: var(--blue);
    font-weight: 500;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-row {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    align-items: flex-start;
}

.meta-label {
    color: var(--muted);
    min-width: 48px;
    font-size: 12px;
    flex-shrink: 0;
    padding-top: 1px;
}

.card-desc {
    font-size: 13px;
    color: var(--muted);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    line-height: 1.5;
}

.card-flyer-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--blue);
    font-weight: 500;
    text-decoration: none;
}

.card-flyer-link:hover {
    text-decoration: underline;
}

/* ── Form ── */
.form-box {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    max-width: 560px;
    margin: 0 auto;
}

.form-field {
    margin-bottom: 14px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 5px;
}

.form-field .req {
    color: var(--red);
    margin-left: 1px;
}

.optional-tag {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 3px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    background: #fafcfe;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 100, 164, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #aab4c0;
}

.form-field textarea {
    resize: vertical;
    min-height: 76px;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin: 18px 0 14px;
}

/* Form feedback messages */
.form-msg {
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 13px;
    margin-bottom: 14px;
    border-left: 3px solid;
}

.form-msg-success {
    background: var(--green-bg);
    color: #145a2e;
    border-color: var(--green);
}

.form-msg-error {
    background: var(--red-bg);
    color: #922b21;
    border-color: var(--red);
}

.submit-btn {
    width: 100%;
    padding: 11px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s;
}

.submit-btn:hover {
    background: var(--blue-dark);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Footer ── */
footer {
    background: #1a2636;
    color: rgba(255, 255, 255, 0.42);
    text-align: center;
    padding: 1rem 2rem;
    font-size: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    margin-left: 1.25rem;
    transition: color 0.15s;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .header-main {
        padding: 1.1rem 1rem 0.75rem;
    }

    .header-logo {
        height: 34px;
    }

    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .tab {
        padding: 0.55rem 1.1rem;
        font-size: 13.5px;
    }

    main {
        padding: 1.25rem 1rem;
    }

    .form-box {
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
