:root {
    color-scheme: light;
    --bg: #f4efe7;
    --panel: #fffaf4;
    --panel-strong: #fffefc;
    --text: #241b14;
    --muted: #6c5a4d;
    --line: rgba(72, 49, 31, 0.16);
    --accent: #a44921;
    --accent-deep: #6d2e12;
    --accent-soft: rgba(164, 73, 33, 0.12);
    --danger-bg: #ffe3df;
    --danger-text: #7e2418;
    --success-bg: #e0f4e8;
    --success-text: #215c3a;
    --warning-bg: #fff1d6;
    --warning-text: #8b5a10;
    --shadow: 0 24px 70px rgba(74, 52, 35, 0.12);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --font-body: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --safe-bottom-space: calc(env(safe-area-inset-bottom, 0px) + 24px);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--text);
        background: #dcf6f8;

}

body {
    line-height: 1.5;
}

img,
svg,
video {
    max-width: 100%;
}

a {
    color: inherit;
}

.page-shell {
    display: grid;
    place-items: center;
    padding: 24px 24px var(--safe-bottom-space);
}

.auth-card,
.dashboard-card {
    width: min(100%, 520px);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 32px;
}

.dashboard-card {
    width: min(100%, 920px);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
}

h2 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

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

.auth-header {
    margin-bottom: 22px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    font-weight: 600;
}

.field input {
    width: 100%;
    border: 1px solid rgba(72, 49, 31, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.84);
    padding: 14px 16px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(164, 73, 33, 0.12);
    transform: translateY(-1px);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    border: none;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.button {
    background: #216153;
    color: #fff;
    box-shadow: 0 14px 32px rgba(109, 46, 18, 0.24);
}

.ghost-button {
    background: transparent;
    border: 1px solid rgba(72, 49, 31, 0.18);
    color: var(--text);
}

.button:hover,
.ghost-button:hover,
.secondary-link:hover {
    transform: translateY(-1px);
}

.secondary-link {
    color: var(--accent-deep);
    text-decoration: none;
    font-weight: 600;
}

.flash {
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-weight: 600;
}

.flash-error {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.flash-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.flash-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.help-block,
.note-block {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--accent-soft);
    color: var(--muted);
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.dashboard-topbar > * {
    min-width: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-card,
.dashboard-note {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    padding: 18px;
}

.dashboard-card h1,
.dashboard-card h2,
.dashboard-card p,
.dashboard-card li,
.dashboard-card strong,
.dashboard-card a {
    overflow-wrap: anywhere;
}

.info-card .label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-note ul {
    margin: 0;
    padding-left: 18px;
}

.inline-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(72, 49, 31, 0.12);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    white-space: normal;
}

@media (max-width: 640px) {
    .page-shell {
        padding: 14px;
    }

    .auth-card,
    .dashboard-card {
        padding: 24px 20px;
    }

    .dashboard-topbar {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button,
    .ghost-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .auth-card,
    .dashboard-card {
        padding: 20px 16px;
        border-radius: 20px;
    }
}
.select-church {
    margin-top: 16px;
}

.button-secondary {
    display: inline-block;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.button-secondary:hover {
    background: #f2f2f2;
}