:root {
    --navy: #0b2545;
    --navy-dark: #071a33;
    --navy-light: #13355e;
    --gold: #d4a017;
    --gold-light: #f0c85a;
    --bg: #f3f5f9;
    --card: #ffffff;
    --border: #e2e5ec;
    --text: #1c2333;
    --muted: #667085;
    --green: #1a7f37;
    --red: #c0392b;
    --shadow: 0 2px 10px rgba(11,37,69,0.08);
    --shadow-lg: 0 6px 24px rgba(11,37,69,0.12);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 22px 16px 60px; }
.center-wrap { max-width: 440px; margin: 30px auto; padding: 0 16px; }

/* Persistent ticker — shown on every screen */
.ticker {
    background: linear-gradient(90deg, var(--navy-dark), var(--navy));
    color: #fdf6e3;
    font-size: 0.82rem;
    padding: 7px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 2px solid var(--gold);
}
.ticker span { display: inline-block; padding-left: 100%; animation: scroll-left 24s linear infinite; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Header / branding */
.topbar {
    background: linear-gradient(120deg, #ffffff, #f6f8fc);
    border-bottom: 1px solid var(--border);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 44px; }
.brand h1 { font-size: 1.2rem; margin: 0; color: var(--navy); letter-spacing: 0.2px; }
.brand .tagline { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.team-badge {
    font-size: 0.9rem; color: #fff; font-weight: 600;
    background: var(--navy); padding: 6px 14px; border-radius: 20px;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
h2 { color: var(--navy); margin-top: 0; }
h3 { color: var(--navy); font-size: 1.08rem; }

/* Nav tabs (quick-jump) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.tabs a {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.83rem;
    background: #eef1f7;
    color: var(--navy);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}
.tabs a:hover { background: #e2e9f7; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tabs a.locked { opacity: 0.45; pointer-events: none; }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 2px 6px rgba(11,37,69,0.25);
}
.btn:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(120deg, var(--gold), var(--gold-light)); color: #1c2333; box-shadow: 0 2px 8px rgba(212,160,23,0.4); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid var(--navy); box-shadow: none; }
.btn-outline:hover { background: #eef3fb; }
.btn-danger { background: var(--red); }
.btn-sm { padding: 6px 13px; font-size: 0.8rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Forms */
input[type=text], input[type=password], input[type=number] {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 6px;
    transition: border-color 0.15s ease;
}
input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,37,69,0.1); }
label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field { margin-bottom: 16px; }

/* Progress / stepper */
.progress-wrap { margin: 4px 0 22px; }
.progress-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.progress-track { background: #e2e7f0; border-radius: 20px; height: 8px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--gold), var(--navy)); height: 100%; border-radius: 20px; transition: width 0.3s ease; }

/* Decision blocks */
.decision {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 20px;
    background: #fcfcfe;
    box-shadow: var(--shadow);
}
.decision .tag {
    display: inline-block; font-size: 0.75rem; background: #eef1f7;
    padding: 4px 11px; border-radius: 12px; color: var(--navy); margin-bottom: 10px; font-weight: 600;
}
.decision h3 { font-size: 1.25rem; margin-bottom: 14px; }
.decision p.situation { font-size: 1.02rem; line-height: 1.7; color: #333d4f; margin-bottom: 20px; }

.option-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 15px; border-radius: 9px; margin-bottom: 9px;
    border: 1.5px solid var(--border); cursor: pointer;
    transition: all 0.15s ease;
}
.option-row:hover { background: #f0f3f9; border-color: #b7c6e0; }
.option-row.selected { background: #eaf3ff; border-color: var(--navy); }
.option-row input[type=radio] { margin-top: 3px; transform: scale(1.15); }

.candidate-card { border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.candidate-card b { color: var(--navy); }
.candidate-card .ctc { float: right; color: var(--green); font-weight: 700; background: #eaf7ee; padding: 2px 10px; border-radius: 12px; font-size: 0.85rem; }
.slider-value { font-weight: 700; color: var(--navy); font-size: 1.2rem; }
input[type=range] { accent-color: var(--navy); height: 6px; }

.nav-buttons { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.nav-buttons .spacer { flex: 1; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9rem; }
th, td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; }
th { background: #eef1f7; color: var(--navy); }

.msg-success { background: #eaf7ee; border: 1px solid #b9e3c6; color: var(--green); padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.msg-error { background: #fdecea; border: 1px solid #f3b8b2; color: var(--red); padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.msg-wait { background: #fff8e6; border: 1px solid #f0dca0; color: #8a6d1a; padding: 18px; border-radius: 10px; text-align: center; font-size: 1.02rem; }

/* Admin table */
.admin-table td, .admin-table th { font-size: 0.85rem; }
.status-open { color: var(--green); font-weight: 700; }
.status-closed { color: var(--muted); }
.status-locked { color: var(--red); font-weight: 700; }

footer.small-note { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 30px; }

@media (max-width: 600px) {
    .card, .decision { padding: 18px 18px; }
    .brand h1 { font-size: 1rem; }
}
