:root {
    --navy: #163754;
    --navy-dark: #0d293f;
    --blue: #286a91;
    --gold: #d7932f;
    --cream: #f6f1e7;
    --ink: #243442;
    --muted: #647381;
    --line: #dbe2e7;
    --success: #286846;
    --danger: #9b2f2f;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eee2dc; }
body { margin: 0; color: var(--ink); background: #eee2dc; font-family: Arial, Helvetica, sans-serif; }

/* Top Header Styling */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #ddd;
    z-index: 1000;
}

.header-logo {
    height: 30px;
}

.greeting {
    font-size: 16px;
    color: #333;
}


button, input, select, textarea { font: inherit; }
a { color: var(--blue); }

.page-shell { width: min(920px, 100%); margin: 0 auto; padding: 20px 16px 48px; }
.back-link { display: inline-block; margin: 0 0 16px; color: var(--navy); font-weight: 700; text-decoration: none; }
.hero { padding: clamp(28px, 6vw, 58px); border-radius: 18px; color: #fff; background: linear-gradient(125deg, #102f49, #225f80); box-shadow: 0 10px 30px rgba(22, 55, 84, .16); }
.eyebrow { margin: 0 0 12px !important; color: #f3c878 !important; font-size: 13px !important; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hero h1 { margin: 0; color: #fff; font: 700 clamp(38px, 8vw, 68px)/1 Georgia, serif; }
.hero p { max-width: 680px; margin: 18px 0 0; color: #eaf2f6; font-size: clamp(17px, 2.5vw, 20px); line-height: 1.6; }

.card { margin-top: 22px; padding: clamp(22px, 5vw, 38px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(22, 55, 84, .08); }
.card-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.card-heading h2 { margin: 0; color: var(--navy); font: 700 clamp(27px, 5vw, 36px)/1.1 Georgia, serif; }
.card-heading p { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.number-badge { display: grid; width: 52px; height: 52px; flex: none; place-items: center; border-radius: 50%; color: #fff; background: var(--gold); font: 700 30px Georgia, serif; }
.field-group { margin: 0 0 22px; }
.field-group label { display: block; margin-bottom: 8px; color: var(--navy); font-weight: 800; }
.optional { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="password"], select, textarea { width: 100%; border: 1px solid #aebdc7; border-radius: 9px; color: var(--ink); background: #fff; }
input[type="text"], input[type="password"], select { min-height: 48px; padding: 10px 13px; }
textarea { min-height: 160px; padding: 13px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 3px solid rgba(215, 147, 47, .34); outline-offset: 2px; }
.field-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 7px; color: var(--muted); font-size: 13px; }
.check-row { display: flex; align-items: center; gap: 10px; margin: -5px 0 24px; font-weight: 700; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--blue); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.primary-button, .secondary-button, .action-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 12px 19px; color: #fff !important; background: var(--blue); font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-button { width: 100%; min-height: 54px; font-size: 17px; }
.primary-button:hover, .action-button:hover { background: var(--navy); }
.secondary-button { color: var(--navy) !important; background: var(--cream); }
.privacy-note { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.message { margin: 0 0 22px; padding: 15px 17px; border-radius: 9px; line-height: 1.5; }
.message.success { border: 1px solid #a8d6bd; color: #174b31; background: #edf8f1; }
.message.error { border: 1px solid #e2b3b3; color: #762121; background: #fff1f1; }
.scripture-card { margin: 22px 0 0; padding: 26px; border-radius: 14px; color: var(--navy); background: var(--cream); text-align: center; }
.scripture-card p { margin: 0; font: italic 23px/1.45 Georgia, serif; }
.scripture-card span { display: block; margin-top: 8px; color: var(--gold); font-weight: 800; }
footer { padding: 25px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
footer a { color: var(--muted); }

.admin-shell { width: min(1180px, 100%); }
.admin-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 28px 32px; }
.admin-hero h1 { font-size: clamp(34px, 6vw, 54px); }
.admin-hero p { margin-top: 10px; font-size: 16px; }
.hero-actions { display: flex; flex: none; gap: 9px; }
.hero-actions .action-button { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); }
.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 18px 20px; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(22,55,84,.07); }
.toolbar label { display: block; margin-bottom: 6px; color: var(--navy); font-size: 13px; font-weight: 800; }
.toolbar select { min-width: 180px; }
.live-indicator { color: var(--success); font-size: 13px; font-weight: 800; }
.question-list { display: grid; gap: 16px; margin-top: 18px; }
.question-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(22,55,84,.07); }
.question-main { padding: 22px; }
.question-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; color: var(--muted); font-size: 13px; }
.status-pill { padding: 5px 9px; border-radius: 999px; color: #174b31; background: #e3f3e9; font-weight: 800; }
.question-text { margin: 16px 0 0; color: var(--navy-dark); font: 700 clamp(20px, 3vw, 26px)/1.4 Georgia, serif; white-space: pre-wrap; }
.ai-draft { margin-top: 19px; padding: 18px; border-left: 4px solid var(--gold); border-radius: 8px; background: #faf7f0; }
.ai-draft h3 { margin: 0 0 6px; color: var(--navy); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.ai-draft pre { margin: 12px 0 0; color: var(--ink); font: 15px/1.6 Arial, sans-serif; white-space: pre-wrap; }
.ai-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.question-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #f7f9fa; }
.question-actions .action-button { min-height: 39px; padding: 8px 13px; font-size: 13px; }
.question-actions .ai-button { background: var(--gold); }
.question-actions .muted-button { color: var(--navy) !important; background: #e7edf1; }
.question-actions .archive-button { color: #6c3030 !important; background: #f5e7e7; }
.empty-state { padding: 42px 20px; border: 1px dashed #b8c5cd; border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.66); text-align: center; }
.login-card { max-width: 520px; margin-inline: auto; }
.login-card .primary-button { margin-top: 4px; }
.config-note { padding: 15px; border-left: 4px solid var(--gold); background: #fff8e9; line-height: 1.5; }

/* Bottom Menu Bar Styling */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #ddd;
    z-index: 1000;
}

.bottom-menu .menu-item {
    flex: 1;
    text-align: center;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    padding: 10px;
}

.bottom-menu .menu-item:hover {
    background-color: #f0f0f0;
}


@media (max-width: 680px) {
    .page-shell { padding-inline: 10px; }
    .hero, .card { border-radius: 12px; }
    .admin-hero, .toolbar { display: block; }
    .hero-actions { margin-top: 18px; }
    .toolbar .primary-button { width: 100%; margin-top: 12px; }
    .field-meta { display: block; }
    #questionCount { display: block; margin-top: 4px; }
}
