:root {
    --teal: #0b6e6e;
    --teal-dark: #084f4f;
    --gold: #c9971c;
    --orange: #f2711c;
    --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-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}
.field-inline > label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 700;
    color: var(--teal-dark);
}
.field-inline > label::after {
    content: ':';
}

.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;
    transition: color .12s ease, background-color .12s ease;
}

.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,0.08);
    color: var(--orange);
    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: var(--orange);
    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: var(--orange);
    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-left: 3px solid var(--teal);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(16, 38, 42, 0.04);
    transition: box-shadow .15s ease, transform .15s ease;
}

.stat-card:hover {
    box-shadow: 0 6px 16px rgba(16, 38, 42, 0.08);
    transform: translateY(-1px);
}

.stat-card .value { font-size: 26px; font-weight: 700; color: var(--teal-dark); line-height: 1.2; }
.stat-card .label { margin-top: 4px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

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

.event-card { display: flex; flex-direction: column; gap: 8px; }
.event-media {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}
.event-card h3 { margin: 0; font-size: 15px; }
.event-card p { margin: 0; font-size: 13px; color: var(--muted); }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(16, 38, 42, 0.05);
}

.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;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
    color: var(--teal-dark);
    letter-spacing: .01em;
}

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }

th, td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    white-space: nowrap;
}

th:last-child, td:last-child {
    border-right: none;
}

td { color: var(--text); }

thead th {
    color: var(--teal-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: .05em;
    background: rgba(11, 110, 110, 0.06);
}

thead th:first-child { border-top-left-radius: 8px; }
thead th:last-child { border-top-right-radius: 8px; }

tbody tr { background: var(--card-bg); transition: background-color .12s ease; }
.profile-card tbody tr { background: var(--card-bg); }
tbody tr:nth-child(even) { background: rgba(11, 110, 110, 0.025); }
.profile-card tbody tr:nth-child(even) { background: rgba(11, 110, 110, 0.05); }
tbody tr:hover { background: rgba(201, 151, 28, 0.08); }
tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.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); }

.nav-badge {
    display: inline-block;
    min-width: 16px;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 16px;
    vertical-align: middle;
}

.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; white-space: normal; }

.wrap-cell { white-space: normal; max-width: 240px; }

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

.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-item { padding: 14px 4px; border-bottom: 1px solid #eee; }
.notification-item:last-child { border-bottom: none; }
.notification-item.notification-unread { background: #fbfaf4; border-left: 3px solid var(--gold, #c9971c); padding-left: 12px; }
.notification-title { font-weight: 700; margin-bottom: 4px; }
.notification-message { color: #444; margin-bottom: 4px; }
.notification-meta { font-size: 12px; color: var(--muted); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }
.pagination-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.pagination .disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

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; }
}
