:root {
    --teal: #0b6e6e;
    --teal-dark: #084f4f;
    --gold: #c9971c;
    --bg: #f4f6f7;
    --card-bg: #ffffff;
    --text: #1f2a2e;
    --muted: #6b7a80;
    --border: #e2e8ea;
    --danger: #c0392b;
    --success: #1e8449;
    --faint-green: #eef7f0;
}

* { box-sizing: border-box; }

.req { color: var(--danger); }

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Auth pages ---------- */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 380px;
    border-radius: 10px;
    padding: 36px 32px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.auth-card h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--teal-dark);
}

.auth-card p.subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.auth-card .field label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .05em;
    color: var(--muted);
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--teal);
    pointer-events: none;
    display: flex;
}

.input-icon-wrap select,
.input-icon-wrap input {
    padding-left: 38px !important;
}

.input-icon-wrap .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
}

.input-icon-wrap .password-toggle:hover {
    color: var(--teal);
}

.field { margin-bottom: 16px; }

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

.field input,
.field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: var(--card-bg);
}

.field input[type="file"] {
    border: 1px dashed var(--border);
    padding: 8px 10px;
    background: var(--bg);
}

.field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(11,110,110,0.15);
}

.field input:read-only,
.field input:disabled,
.field select:disabled {
    background: var(--bg);
    color: var(--muted);
    cursor: not-allowed;
}

.radio-inline,
.checkbox-inline {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 10px;
    flex-wrap: wrap;
}

.radio-inline label,
.checkbox-inline label {
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 0;
}

.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.field textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(11,110,110,0.15);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 760px) {
    .field-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .field-row { grid-template-columns: 1fr; }
}

.step-caption {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
    margin: 0 0 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--teal);
    color: #fff;
}

.btn:hover { background: var(--teal-dark); }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #a67a14; }
.btn-outline { background: transparent; color: var(--teal); border: 1px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; text-decoration: none; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #922b21; }

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c0; }
.alert-success { background: #eafaf1; color: var(--success); border: 1px solid #b7ebc6; }

/* ---------- Dashboard shell ---------- */

.shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background: var(--teal-dark);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    font-size: 17px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 16px;
}

.sidebar .brand small {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #cfe6e6;
    margin-top: 2px;
}

.brand-logo {
    height: 36px;
    width: 36px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}

.brand-logo-lg {
    display: block;
    height: 56px;
    margin: 0 auto 16px;
}

.sidebar nav a {
    display: block;
    padding: 12px 20px;
    color: #dff0f0;
    font-size: 14px;
}

.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

.sidebar nav.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 8px;
    padding-top: 8px;
}

.sidebar nav.sidebar-footer a {
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar nav.sidebar-footer a:last-child {
    border-bottom: none;
}

/* ---------- Applicant profile timeline nav ---------- */

.timeline-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 12px;
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.timeline-nav-head .chevron {
    color: var(--gold);
    font-size: 10px;
    transition: transform .15s ease;
}

.timeline-nav-head.collapsed .chevron { transform: rotate(-90deg); }

.timeline-nav {
    list-style: none;
    margin: 0;
    padding: 4px 20px 16px 38px;
    position: relative;
}

.timeline-nav.collapsed { display: none; }

.timeline-nav::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 4px;
    bottom: 16px;
    width: 2px;
    background: rgba(255,255,255,0.22);
}

.timeline-nav li { position: relative; }

.timeline-nav li::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
}

.timeline-nav li.done::before { background: var(--gold); }

.timeline-nav li.current::before {
    background: var(--gold);
    width: 11px;
    height: 11px;
    left: -30.5px;
    top: 11.5px;
    box-shadow: 0 0 0 3px rgba(201,151,28,0.32);
}

.timeline-nav a {
    display: block;
    padding: 9px 10px 9px 6px;
    color: rgba(255,255,255,0.78);
    font-size: 13.5px;
    line-height: 1.3;
    text-decoration: none;
    border-radius: 0 6px 6px 0;
}

.timeline-nav a:hover {
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
}

.timeline-nav li.done a { color: rgba(255,255,255,0.6); }

.timeline-nav li.current a {
    color: #fff;
    font-weight: 700;
    background: rgba(201,151,28,0.18);
}

.main { flex: 1; padding: 28px 36px; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.topbar h1 { font-size: 22px; margin: 0; color: var(--teal-dark); }
.topbar .user { font-size: 13px; color: var(--muted); }

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

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
}

.stat-card .value { font-size: 26px; font-weight: 700; color: var(--teal-dark); }
.stat-card .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.event-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -16px rgba(7, 62, 62, 0.35);
}
.event-media {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}
.event-card h3 { margin: 0; font-size: 15.5px; }
.event-card p { margin: 0; font-size: 13px; color: var(--muted); }

.event-type-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 10px;
    border-radius: 999px;
}
.event-type-badge.announcement { background: #eaf5f4; color: var(--teal-dark); }
.event-type-badge.registration { background: #fbf1dc; color: var(--gold); }
.event-type-badge.appointment { background: #e6f2fb; color: #1b5c8a; }

.event-status-line { font-size: 12px; font-weight: 600; }
.event-status-line.status-paid, .event-status-line.status-booked { color: var(--success); }
.event-status-line.status-pending { color: var(--gold); }
.event-status-line.status-failed { color: var(--danger); }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    overflow-x: auto;
}

.profile-card {
    background: var(--faint-green);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.card-header h2 { font-size: 16px; margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-invited { background: #fdf3d9; color: #8a6d1a; }
.badge-active { background: #eafaf1; color: var(--success); }
.badge-disabled { background: #f2f2f2; color: #777; }
.badge-danger { background: #fbeae7; color: var(--danger); }

.color-muted { color: var(--muted); font-weight: 600; }
.color-success { color: var(--success); font-weight: 600; }
.color-danger { color: var(--danger); font-weight: 600; }
.color-warning { color: #8a6d1a; font-weight: 600; }

.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 40px 0; color: var(--muted); }

form.inline { display: inline; }

/* ---------- Small-screen layout ---------- */

@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar { width: 100%; padding: 16px 0; }
    .main { padding: 20px; }
    .stat-card .value { font-size: 22px; }
}

@media (max-width: 480px) {
    .main { padding: 14px; }
    .card { padding: 16px; }
    .auth-card { padding: 24px 20px; }
    .topbar h1 { font-size: 19px; }
    .btn { padding: 10px 14px; }
}
