/* Mobile-first; gold / warm accents aligned with Akshaya Tritiya poster */

:root {
    --bg: #1a0f08;
    --bg-card: #2d1a0e;
    --gold: #e8c547;
    --gold-dim: #b8922e;
    --red: #c41e3a;
    --text: #fdf6e3;
    --text-muted: #c9b896;
    --error: #ff8a80;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    color: var(--text);
    background: radial-gradient(ellipse 120% 80% at 50% 0%, #3d2414 0%, var(--bg) 55%);
    line-height: 1.45;
}

.page {
    max-width: 32rem;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Report / data tables: use most of the screen on desktop, still responsive on small devices */
.page--wide {
    max-width: 75rem;
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.site-header {
    text-align: center;
    padding: 0.75rem 0 1rem;
    border-bottom: 1px solid rgba(232, 197, 71, 0.25);
}

.brand {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold);
    font-size: 1rem;
}

.tagline {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.content {
    flex: 1;
    padding-top: 1rem;
}

.site-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.site-footer__site {
    margin: 0.65rem 0 0;
}

/* Override default blue :link / :visited so the URL stays readable on dark background */
a.site-footer__link,
a.site-footer__link:link,
a.site-footer__link:visited {
    color: #f0d875;
    text-decoration: underline;
    text-decoration-color: rgba(232, 197, 71, 0.55);
    text-underline-offset: 0.2em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

a.site-footer__link:hover {
    color: #fff3c4;
    text-decoration-color: rgba(255, 243, 196, 0.85);
}

a.site-footer__link:focus-visible {
    color: #fff3c4;
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

a.site-footer__link:active {
    color: var(--gold);
}

.step-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    min-height: 2.5rem;
}

.step-row .step-label {
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.2;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
}

.step-label {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.referral-entry {
    scroll-margin-top: 0.75rem;
}

/* Pill aligned with step label; explicit :link/:visited so default blue link never wins */
a.btn.step-jump,
a.btn.step-jump:link,
a.btn.step-jump:visited {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 2.5rem;
    padding: 0 1.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(232, 197, 71, 0.55);
    border-radius: 999px;
    box-shadow: none;
}

a.btn.step-jump:hover {
    color: var(--gold);
    border-color: rgba(232, 197, 71, 0.85);
}

a.btn.step-jump:focus-visible {
    outline: 2px solid var(--gold-dim);
    outline-offset: 2px;
}

a.btn.step-jump:active {
    transform: translateY(1px);
}

.page-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.25;
}

.form-note {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.form-note strong {
    color: var(--gold);
    font-weight: 600;
}

.form-card--minimal {
    padding-top: 1rem;
}

.actions--split {
    justify-content: space-between;
    width: 100%;
    margin-top: 0;
}

.poster-wrap {
    margin: 0 -0.25rem 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(232, 197, 71, 0.35);
}

.poster {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid rgba(232, 197, 71, 0.2);
    box-shadow: var(--shadow);
}

.form-card--report-edit {
    max-width: 40rem;
    margin: 0 auto 1.5rem;
}

.form-section-title {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
    color: var(--gold-dim);
    font-weight: 600;
}

.form-section-title:first-of-type {
    margin-top: 0;
}

.field {
    display: block;
    margin-bottom: 1rem;
}

.field .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font: inherit;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: 2px solid var(--gold-dim);
    outline-offset: 0;
}

.field textarea {
    resize: vertical;
    min-height: 6rem;
}

.error {
    background: rgba(196, 30, 58, 0.25);
    border: 1px solid rgba(255, 138, 128, 0.5);
    color: var(--error);
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    min-height: 44px;
    line-height: 1.2;
}

.btn.primary {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
    color: #1a0f08;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn.primary:active {
    transform: translateY(1px);
}

.btn.secondary {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(232, 197, 71, 0.5);
}

.thank-you {
    text-align: center;
    padding: 1rem 0;
}

.thank-you .lead {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    font-size: 1rem;
}

/* Report tables */
.report-intro {
    margin-bottom: 1rem;
}

.report-breadcrumb {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.report-breadcrumb__sep {
    margin: 0 0.35rem;
    opacity: 0.7;
}

.table-back {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.table-back:hover {
    text-decoration: underline;
}

.report-logout {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.85rem;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.table-wrap--wide {
    max-width: 100%;
}

/* report_detail: table uses at least 80% of the content area width */
.table-wrap--report-detail {
    width: 100%;
}

.table-wrap--report-detail .data-table {
    width: 100%;
    min-width: 80%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--bg-card);
    border: 1px solid rgba(232, 197, 71, 0.2);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table thead {
    background: rgba(0, 0, 0, 0.35);
}

.data-table th,
.data-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

.data-table th {
    color: var(--gold-dim);
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table--dense td,
.data-table--dense th {
    font-size: 0.8125rem;
    padding: 0.5rem 0.55rem;
}

.data-table__click-row:hover {
    background: rgba(232, 197, 71, 0.06);
}

.empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 1.25rem !important;
}

.table-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.table-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge--partial {
    background: rgba(196, 30, 58, 0.35);
    color: var(--error);
    border: 1px solid rgba(255, 138, 128, 0.35);
}

.status-badge--full {
    background: rgba(80, 160, 80, 0.25);
    color: #a8e6a8;
    border: 1px solid rgba(120, 200, 120, 0.35);
}

a.status-badge--action {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: filter 0.12s ease, box-shadow 0.12s ease;
}

a.status-badge--action:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.45);
}

a.status-badge--action:focus-visible {
    outline: 2px solid var(--gold-dim);
    outline-offset: 2px;
}

.cell-clamp {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-nowrap {
    white-space: nowrap;
}

.recorded-label {
    color: var(--text-muted);
    font-size: 0.9em;
}

@media (min-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
}
