:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #eef2f5;
    --text: #17202a;
    --muted: #65717e;
    --line: #dce2e8;
    --primary: #235c67;
    --primary-dark: #17464f;
    --danger: #a33a36;
    --success: #2f6d45;
    --focus: #e2b84b;
    --radius: 8px;
    font-family: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.45;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(100%, 420px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 16px 40px rgba(23, 32, 42, 0.08);
}

.brand-block {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 6px;
    font-size: 24px;
    line-height: 1.2;
}

h2 {
    margin-bottom: 4px;
    font-size: 18px;
    line-height: 1.25;
}

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

.stack-form,
.update-form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: #fff;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(226, 184, 75, 0.45);
    outline-offset: 2px;
}

.primary-button,
.secondary-button,
.ghost-button,
.call-button,
.mail-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid transparent;
    padding: 10px 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: var(--primary);
    color: #fff;
}

.primary-button:hover {
    background: var(--primary-dark);
}

.secondary-button,
.mail-button {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.ghost-button {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.call-button {
    background: #153f47;
    color: #fff;
}

.flash {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    font-weight: 700;
}

.flash-success {
    color: var(--success);
    border-color: rgba(47, 109, 69, 0.28);
    background: #edf7f0;
}

.flash-error {
    color: var(--danger);
    border-color: rgba(163, 58, 54, 0.28);
    background: #fbefef;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.app-header h1 {
    margin-bottom: 2px;
    font-size: 18px;
}

.app-header p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

.content-shell {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 14px 12px 28px;
}

.toolbar {
    margin-bottom: 10px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.filter-strip {
    display: flex;
    gap: 8px;
    margin: 0 -12px 10px;
    padding: 0 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex: 0 0 auto;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.filter-chip.active {
    background: #173f47;
    color: #fff;
    border-color: #173f47;
}

.filter-chip strong {
    min-width: 24px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(101, 113, 126, 0.14);
    text-align: center;
    font-size: 13px;
}

.filter-chip.active strong {
    background: rgba(255, 255, 255, 0.18);
}

.list-meta {
    margin: 8px 2px 12px;
    color: var(--muted);
    font-size: 14px;
}

.list-meta a {
    margin-left: 8px;
    color: var(--primary);
    font-weight: 700;
}

.candidate-list {
    display: grid;
    gap: 12px;
}

.candidate-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

.status-will_attend {
    border-left-color: #2f6d45;
}

.status-wont_attend,
.status-wrong_number {
    border-left-color: #a33a36;
}

.status-maybe,
.status-call_later {
    border-left-color: #b9821f;
}

.status-unreachable {
    border-left-color: #6b7280;
}

.candidate-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
}

.candidate-main p {
    margin-bottom: 0;
}

.status-badge {
    max-width: 130px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 12px 0;
}

.candidate-details {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px;
    border-radius: var(--radius);
    background: #f8fafb;
}

.candidate-details div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
}

.candidate-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.candidate-details dd {
    margin: 0;
    min-width: 0;
}

.audit-line {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    padding: 28px 16px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.empty-state h2 {
    margin-bottom: 6px;
}

.empty-state p {
    margin-bottom: 0;
    color: var(--muted);
}

@media (min-width: 620px) {
    .content-shell {
        padding-inline: 18px;
    }

    .quick-actions {
        grid-template-columns: max-content max-content;
    }

    .update-form {
        grid-template-columns: 210px 1fr auto;
        align-items: end;
    }
}

