@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f8fafc;
    --bg-accent: #edf3ff;
    --surface: #ffffff;
    --surface-muted: #f7f9fe;
    --surface-strong: #edf3ff;
    --sidebar: #10244f;
    --sidebar-elevated: #163061;
    --sidebar-text: #f4f7ff;
    --sidebar-muted: #9eb0d8;
    --text: #0f265c;
    --text-soft: #7282a3;
    --line: #e6edf8;
    --accent: #4f79ff;
    --accent-strong: #335edf;
    --accent-soft: #d9e4ff;
    --accent-soft-strong: #bfd0ff;
    --danger-soft: #fde9e7;
    --danger-text: #a1423a;
    --warning-soft: #e9efff;
    --warning-text: #4269c7;
    --success-soft: #e8f0ff;
    --success-text: #315edb;
    --shadow: 0 18px 38px rgba(15, 38, 92, 0.06);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-width: 320px;
    font-family: "Montserrat", "Segoe UI", "SF Pro Text", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(79, 121, 255, 0.08), transparent 28%),
        linear-gradient(180deg, var(--bg) 0%, #f3f7ff 100%);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-strong);
}

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

svg {
    display: block;
}

.app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 180ms ease;
}

.app-shell[data-sidebar="collapsed"] {
    grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100px),
        linear-gradient(180deg, var(--sidebar) 0%, #0b1a3a 100%);
    color: var(--sidebar-text);
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.brand {
    min-width: 0;
}

.brand-title {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: var(--sidebar-text);
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(3, 12, 32, 0.24);
    flex: 0 0 auto;
    overflow: hidden;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
}

.brand-wordmark {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

.brand-wordmark img {
    display: block;
    width: auto;
    height: 72px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 14px;
    min-width: 0;
}

.sidebar-toggle {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--sidebar-text);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 18px;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.app-shell[data-sidebar="collapsed"] .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-toggle-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a {
    min-height: 50px;
    color: var(--sidebar-muted);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    transition: background 160ms ease, color 160ms ease;
}

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

.nav-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 22px;
    height: 22px;
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.app-shell[data-sidebar="collapsed"] .brand-wordmark,
.app-shell[data-sidebar="collapsed"] .nav-label,
.app-shell[data-sidebar="collapsed"] .sidebar-toggle-label {
    display: none;
}

.app-shell[data-sidebar="collapsed"] .brand-mark {
    display: inline-flex;
}

.app-shell[data-sidebar="collapsed"] .sidebar-header {
    flex-direction: column;
}

.app-shell[data-sidebar="collapsed"] .sidebar-nav a {
    justify-content: center;
    padding-inline: 0;
}

.app-shell[data-sidebar="collapsed"] .sidebar-toggle {
    width: 56px;
    min-height: 56px;
    padding: 0;
    justify-content: center;
}

.sidebar-admin-card {
    width: 100%;
    min-width: 0;
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 10px;
    overflow: hidden;
}

.sidebar-admin-meta {
    min-width: 0;
    width: 100%;
}

.sidebar-admin-email {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--sidebar-text);
}

.sidebar-admin-logout {
    width: 100%;
    min-height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease;
}

.sidebar-admin-logout:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.sidebar-admin-logout svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.app-shell[data-sidebar="collapsed"] .sidebar-admin-card {
    display: none;
}

.main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.content {
    padding: 24px 24px 28px;
    display: grid;
    gap: 16px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-stat-card {
    background: var(--surface);
    border: 1px solid rgba(15, 38, 92, 0.06);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 6px;
}

.dashboard-stat-card span,
.dashboard-stat-card small {
    color: var(--text-soft);
}

.dashboard-stat-card strong {
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.dashboard-stat-card.accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #f6f8ff;
    border-color: transparent;
}

.dashboard-stat-card.accent span,
.dashboard-stat-card.accent small {
    color: rgba(245, 250, 248, 0.82);
}

.dashboard-progress-figure {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.04em;
}

.progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: var(--surface-strong);
    overflow: hidden;
}

.progress-track.small {
    height: 9px;
    min-width: 140px;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent) 0%, #7fa0ff 100%);
}

.dashboard-metrics-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.dashboard-buckets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bucket {
    border-radius: 16px;
    padding: 15px;
    display: grid;
    gap: 4px;
}

.bucket strong {
    font-size: 26px;
    letter-spacing: -0.03em;
}

.bucket.success {
    background: var(--success-soft);
    color: var(--success-text);
}

.bucket.warning {
    background: var(--warning-soft);
    color: var(--warning-text);
}

.bucket.danger {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.progress-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(79, 121, 255, 0.14), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

.public-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(79, 121, 255, 0.10), transparent 26%),
        linear-gradient(180deg, #f8fafc 0%, #f2f6ff 100%);
}

.public-shell .content {
    width: min(100%, 1540px);
    margin: 0 auto;
    padding-top: 26px;
    padding-bottom: 42px;
}

.not-found-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 12% 10%, rgba(79, 121, 255, 0.12), transparent 30%),
        #f4f7fd;
}

.not-found-card {
    width: min(100%, 760px);
    overflow: hidden;
    border: 1px solid #e0e8f7;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(15, 38, 92, 0.1);
}

.not-found-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 48px 58px;
    text-align: center;
}

.not-found-card__code {
    margin-bottom: 18px;
    color: #4f79ff;
    font-size: clamp(64px, 12vw, 108px);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.07em;
}

.not-found-card h1 {
    max-width: 620px;
    margin: 0;
    color: #0f265c;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.not-found-card p {
    max-width: 520px;
    margin: 18px 0 30px;
    color: #68799c;
    font-size: 16px;
    line-height: 1.6;
}

.not-found-card__button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid #315edb;
    border-radius: 16px;
    background: #315edb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(49, 94, 219, 0.2);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.not-found-card__button:hover {
    background: #244fc7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(49, 94, 219, 0.25);
}

@media (max-width: 640px) {
    .not-found-page {
        padding: 16px;
    }

    .not-found-card {
        border-radius: 22px;
    }

    .not-found-card__content {
        padding: 48px 22px 42px;
    }

    .not-found-card p {
        margin-bottom: 26px;
        font-size: 15px;
    }

    .not-found-card__button {
        width: 100%;
    }
}

.auth-card {
    width: min(100%, 460px);
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 26px 50px rgba(15, 38, 92, 0.10);
    padding: 30px;
    border: 1px solid rgba(15, 38, 92, 0.06);
}

.auth-kicker {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.auth-title {
    margin: 10px 0 8px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.auth-text {
    margin: 0 0 20px;
    color: var(--text-soft);
    line-height: 1.5;
}

.auth-alert {
    margin-bottom: 18px;
    background: var(--danger-soft);
    border: 1px solid rgba(154, 63, 54, 0.16);
    color: var(--danger-text);
    padding: 12px 14px;
    border-radius: 14px;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form label {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.auth-submit {
    margin-top: 8px;
}

.flash-banner {
    border-radius: 14px;
    padding: 13px 15px;
    font-weight: 600;
    border: 1px solid transparent;
}

.flash-banner.success {
    background: var(--success-soft);
    color: var(--success-text);
    border-color: rgba(31, 106, 79, 0.12);
}

.flash-banner.error {
    background: var(--danger-soft);
    color: var(--danger-text);
    border-color: rgba(154, 63, 54, 0.12);
}

.card {
    background: var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(15, 38, 92, 0.05);
}

.card-header,
.card-footer,
.card-body {
    padding: 16px 18px;
}

.card-header {
    border-bottom: 1px solid var(--line);
}

.card-header.card-header-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.card-header p,
.readonly-note {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 13px;
}

.table-search-bar {
    margin-top: 12px;
}

.table-search-input {
    max-width: 320px;
    background: var(--surface);
}

.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.table th,
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf2fb;
    vertical-align: top;
    text-align: left;
}

.table thead th {
    background: var(--surface-muted);
    color: var(--text-soft);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #f8fbff;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover {
    background: var(--accent-strong);
    color: #fff;
}

.btn.btn-secondary {
    background: var(--surface-muted);
    color: var(--text);
    border-color: rgba(15, 38, 92, 0.08);
}

.btn.btn-secondary:hover {
    background: var(--surface-strong);
    color: var(--text);
}

.btn.btn-danger {
    background: #b45249;
    color: #fffaf8;
    border-color: transparent;
}

.btn.btn-danger:hover {
    background: #983d35;
    color: #fff;
}

.btn.btn-sm {
    padding: 7px 11px;
    font-size: 12px;
}

.btn.btn-block {
    width: 100%;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.input {
    width: 100%;
    border: 1px solid rgba(15, 38, 92, 0.12);
    border-radius: 12px;
    padding: 11px 13px;
    background: #ffffff;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.input:focus {
    border-color: rgba(79, 121, 255, 0.42);
    box-shadow: 0 0 0 3px rgba(79, 121, 255, 0.10);
}

.criteria-head,
.meta-pills {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 12px;
}

.criteria-list,
.field-map-grid,
.form-stack,
.nomination-buttons {
    display: grid;
    gap: 12px;
}

.form-stack.compact {
    gap: 6px;
}

.criteria-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    align-items: center;
}

.criteria-counter {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.field-map-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: #f7faff;
}

.settings-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-muted);
}

.settings-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-section-head strong {
    font-size: 15px;
    color: var(--text);
}

.settings-grid,
.settings-inline-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-alert {
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
}

.integration-alert.warning {
    background: var(--warning-soft);
    color: var(--warning-text);
}

.event-access-note {
    display: grid;
    gap: 10px;
}

.event-access-note strong {
    color: var(--text);
}

.event-access-note span {
    line-height: 1.5;
}

.service-account-copy {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(79, 121, 255, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    display: grid;
    gap: 4px;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.service-account-copy:hover {
    border-color: rgba(79, 121, 255, 0.34);
    background: #ffffff;
    transform: translateY(-1px);
}

.service-account-copy:disabled {
    cursor: default;
    opacity: 0.72;
    transform: none;
}

.service-account-copy-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-soft);
}

.service-account-copy-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-strong);
    word-break: break-word;
}

.service-account-copy-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
}

.field-map-key {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.field-map-value {
    margin-top: 8px;
    color: var(--text-soft);
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 13px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.pill.success {
    background: var(--success-soft);
    color: var(--success-text);
}

.pill.warning {
    background: var(--warning-soft);
    color: var(--warning-text);
}

.pill.danger {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.pill.muted {
    background: var(--surface-strong);
    color: var(--text-soft);
}

.pill.status-new {
    background: #f3e8ff;
    color: #6b21a8;
}

.pill.status-approved {
    background: #dcfce7;
    color: #166534;
}

.pill.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.pill.status-needs-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.pill.confidence-pill {
    border: 1px solid transparent;
}

.pill.confidence-0 {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.pill.confidence-25 {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fed7aa;
}

.pill.confidence-50 {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.pill.confidence-75,
.pill.confidence-100 {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.pill.confidence-neutral {
    background: var(--surface-strong);
    color: var(--text-soft);
    border-color: transparent;
}

.pill.copyable-pill {
    cursor: pointer;
    user-select: none;
}

.pill.copyable-pill:focus-visible {
    outline: 2px solid rgba(47, 111, 237, 0.45);
    outline-offset: 2px;
}

.badge-success {
    background: var(--success-soft);
    color: var(--success-text);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning-text);
}

.badge-danger {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.badge-muted {
    background: var(--surface-strong);
    color: var(--text-soft);
}

.json-box {
    margin-top: 18px;
    border-radius: 16px;
    background: #1b2320;
    color: #eff5f2;
    padding: 18px;
    overflow: auto;
}

.json-box pre {
    margin: 0;
    font-size: 13px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-top: 1px solid var(--line);
}

.pagination-info {
    color: var(--text-soft);
    font-size: 14px;
}

.pagination-links {
    display: flex;
    gap: 8px;
}

.page-link {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--accent-strong);
    border: 1px solid rgba(15, 38, 92, 0.06);
}

.page-link.active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

.page-link.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.detail-list {
    display: grid;
    gap: 14px;
}

.detail-list div {
    display: grid;
    gap: 4px;
}

.detail-list label,
.form-stack label {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-label-row a {
    font-size: 12px;
    font-weight: 700;
}

.form-accordion {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-muted);
    overflow: hidden;
}

.form-accordion summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.form-accordion summary::-webkit-details-marker {
    display: none;
}

.form-accordion summary::after {
    content: "+";
    font-size: 20px;
    line-height: 1;
    color: var(--accent-strong);
}

.form-accordion[open] summary::after {
    content: "-";
}

.form-accordion-body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.request-edit-card {
    display: grid;
    gap: 12px;
}

.request-edit-form {
    margin: 0;
}

.request-edit-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.request-edit-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.request-edit-btn-block {
    display: inline-flex;
    width: 100%;
}

.nomination-button {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: var(--surface-muted);
    color: var(--text-soft);
}

.nomination-button.selected {
    background: var(--accent-soft);
    border-color: rgba(79, 121, 255, 0.35);
    color: var(--accent-strong);
}

.jury-nomination-grid {
    display: grid;
    gap: 10px;
}

.jury-nomination-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7faff;
    color: var(--text);
    cursor: pointer;
}

.jury-nomination-option input {
    margin-top: 2px;
    accent-color: var(--accent);
}

.jury-nomination-option span {
    line-height: 1.4;
}

.total-score {
    font-size: 28px;
    font-weight: 700;
    text-align: right;
    letter-spacing: -0.03em;
}

.rates-nominations {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rates-nominations .nomination-button {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 420px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.rates-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.rates-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rates-actions {
    align-items: center;
}

.rates-search {
    min-width: 220px;
}

.rates-table {
    min-width: 1680px;
}

.requests-table {
    min-width: 1480px;
}

.rates-table th,
.rates-table td,
.requests-table th,
.requests-table td {
    white-space: nowrap;
}

.rates-table td:nth-child(2),
.rates-table td:nth-child(6),
.requests-table td:nth-child(2),
.requests-table td:nth-child(9) {
    white-space: normal;
    min-width: 220px;
}

.rates-link-cell a {
    word-break: break-all;
}

.rates-score-cell,
.rates-sum-cell {
    text-align: center;
    font-weight: 700;
}

.rates-sum-cell {
    background: var(--surface-muted);
    color: var(--accent-strong);
}

.results-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.results-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.results-search-input {
    min-width: 280px;
    flex: 1 1 280px;
}

.results-filter-select {
    min-width: 220px;
    flex: 0 1 260px;
}

.results-public-shell {
    display: grid;
    gap: 14px;
    min-width: 0;
    min-height: calc(100dvh - 44px);
    grid-template-rows: auto minmax(0, 1fr);
}

.results-public-shell > * {
    min-width: 0;
}

.results-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    background:
        linear-gradient(135deg, rgba(0, 86, 179, 0.08), rgba(255, 255, 255, 0.92) 58%, rgba(121, 160, 255, 0.12)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 245, 255, 0.94));
    border: 1px solid rgba(16, 46, 76, 0.08);
    border-radius: 28px;
    box-shadow: 0 22px 48px rgba(32, 43, 36, 0.08);
    padding: 20px 22px 18px;
    position: relative;
    overflow: hidden;
}

.results-hero::before,
.results-hero::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 14px;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(164, 18, 32, 0.95) 0 10px,
            rgba(245, 241, 232, 0) 10px 16px,
            rgba(25, 36, 29, 0.92) 16px 26px,
            rgba(245, 241, 232, 0) 26px 32px
        );
    opacity: 0.82;
}

.results-hero::after {
    inset: 0 0 0 auto;
}

.results-hero h1 {
    margin: 0;
    padding-inline: 12px;
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1.04;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
    color: #1d2d2b;
}

.results-public-search {
    display: grid;
    gap: 8px;
    width: 100%;
    padding-inline: 12px;
}

.results-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px;
}

.results-filter-toggle {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(16, 46, 76, 0.10);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff, #eaf1ff);
    color: #184f8c;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 180ms ease, box-shadow 180ms ease;
    position: relative;
    box-shadow: 0 8px 20px rgba(23, 42, 57, 0.08);
}

.results-filter-toggle:hover {
    background: linear-gradient(180deg, #ffffff, #e1ebff);
    border-color: rgba(24, 79, 140, 0.22);
    transform: translateY(-1px);
}

.results-filter-toggle.is-active::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #c11d2c;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.results-filter-toggle svg {
    width: 20px;
    height: 20px;
    margin: 0 auto;
}

.results-filters-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border: 1px solid rgba(16, 46, 76, 0.08);
    border-radius: 18px;
    background: rgba(247, 250, 255, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    padding: 12px;
}

.results-filters-panel.is-open {
    display: grid;
    animation: resultsFiltersReveal 180ms ease;
}

.results-public-card {
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.98));
    border: 1px solid rgba(16, 46, 76, 0.08);
    box-shadow: 0 22px 46px rgba(25, 36, 29, 0.08);
}

.results-table-wrap {
    overflow: auto;
    max-width: 100%;
    min-height: 0;
    height: 100%;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    isolation: isolate;
}

.results-table {
    min-width: 1320px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.results-table th,
.results-table td {
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    line-height: 1.25;
}

.results-table th:nth-child(1),
.results-table td:nth-child(1) {
    width: 92px;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    width: 264px;
}

.results-table th:nth-child(3),
.results-table td:nth-child(3) {
    width: 136px;
}

.results-table .results-project-cell {
    max-width: 280px;
}

.results-table .results-link-cell {
    max-width: 240px;
}

.results-group-body {
    position: relative;
}

.results-group-title-row th {
    position: sticky;
    top: 0;
    z-index: 7;
    background: rgba(247, 250, 255, 0.98);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 22px rgba(15, 38, 92, 0.08);
    transition: background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
    transform: translateZ(0);
}

.results-group-header-row th {
    position: sticky;
    top: 52px;
    z-index: 6;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow:
        inset 0 -1px 0 rgba(15, 38, 92, 0.05),
        0 6px 12px rgba(15, 38, 92, 0.04);
    transition: background 220ms ease, box-shadow 220ms ease;
}

.results-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.results-group-meta {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.results-score-cell,
.results-total-cell {
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.results-place-cell,
.results-grid-header-place {
    text-align: center;
}

.results-table .pill {
    padding: 5px 10px;
    font-size: 11px;
    white-space: nowrap;
}

.results-table .pill.award-first,
.results-grid-table .pill.award-first {
    border: 1px solid #6f8fd9;
    background: #8eabf2;
    color: #183a78;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 2px 6px rgba(49, 94, 219, 0.14);
}

.results-table .pill.award-second,
.results-grid-table .pill.award-second {
    border: 1px solid #9caabd;
    background: #bdc7d5;
    color: #243651;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 2px 6px rgba(61, 78, 104, 0.12);
}

.results-table .pill.award-third,
.results-grid-table .pill.award-third {
    border: 1px solid #9f5a35;
    background: #bd7448;
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 6px rgba(111, 55, 26, 0.16);
}

.results-table .pill.success,
.results-grid-table .pill.success {
    border: 1px solid var(--success-text);
    background: var(--success-soft);
    color: var(--success-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 2px 6px rgba(49, 94, 219, 0.12);
}

.results-table .pill.muted,
.results-grid-table .pill.muted {
    border: 1px solid var(--text-soft);
    background: var(--surface-strong);
    color: var(--text-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 2px 6px rgba(65, 82, 116, 0.1);
}

.results-total-cell {
    color: #113f73;
    background: linear-gradient(180deg, rgba(233, 243, 255, 0.92), rgba(223, 234, 255, 0.72));
}

.results-project-title {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
}

.results-participant-cell {
    overflow: hidden;
}

.results-participant-name {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-link-cell a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: #15579a;
}

.results-row-hidden {
    opacity: 0.72;
    background: rgba(251, 228, 224, 0.38);
}

.results-visibility-form {
    margin: 0;
}

.results-empty-state {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-soft);
}

@keyframes resultsFiltersReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1280px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .results-hero {
        grid-template-columns: 1fr;
    }

    .results-table {
        min-width: 1180px;
    }
}

@media (max-width: 520px) {
    .app-shell,
    .app-shell[data-sidebar="collapsed"] {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding-bottom: 12px;
    }

    .app-shell[data-sidebar="collapsed"] .sidebar-header {
        flex-direction: row;
    }

    .app-shell[data-sidebar="collapsed"] .sidebar-nav a {
        justify-content: flex-start;
        padding-inline: 12px;
    }

    .grid-2,
    .grid-3,
    .dashboard-buckets,
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .settings-grid,
    .settings-inline-meta {
        grid-template-columns: 1fr;
    }

    .card-header.card-header-split,
    .card-header-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .content {
        padding: 16px 18px 24px;
    }

    .rates-search {
        min-width: 100%;
    }

    .results-filter-form,
    .results-filters-panel,
    .results-admin-toolbar {
        grid-template-columns: 1fr;
    }

    .public-shell .content {
        padding: 12px;
        width: 100%;
        min-height: 100dvh;
    }

    .results-public-shell {
        gap: 10px;
        min-height: calc(100dvh - 24px);
    }

    .results-hero {
        padding: 14px 14px 12px;
        border-radius: 20px;
    }

    .results-hero h1 {
        padding-inline: 8px;
        font-size: 26px;
        line-height: 1.06;
    }

    .results-public-search {
        padding-inline: 8px;
    }

    .results-search-row {
        grid-template-columns: minmax(0, 1fr) 46px;
        gap: 6px;
    }

    .results-search-input,
    .results-filter-select {
        min-width: 0;
    }

    .results-filter-toggle {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .results-filters-panel {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .results-public-card {
        border-radius: 20px;
        height: min(68dvh, 720px);
    }

    .results-table {
        min-width: 980px;
    }

    .results-group-title-row th {
        top: 0;
    }

    .results-group-header-row th {
        top: 50px;
    }

    .results-group-title {
        font-size: 15px;
        gap: 10px;
    }

    .results-table th,
    .results-table td {
        padding: 11px 12px;
        font-size: 13px;
    }

    .results-table th:nth-child(2),
    .results-table td:nth-child(2) {
        width: 224px;
    }

    .results-table th:nth-child(3),
    .results-table td:nth-child(3) {
        width: 122px;
    }

    .results-table .pill {
        padding: 5px 9px;
        font-size: 10px;
    }

    .results-table .results-project-cell {
        max-width: 220px;
    }

    .results-table .results-link-cell {
        max-width: 180px;
    }

    .request-edit-actions {
        grid-template-columns: 1fr;
    }
}

.results-public-shell {
    display: grid;
    gap: 16px;
    min-width: 0;
    min-height: calc(100dvh - 24px);
    grid-template-rows: auto minmax(0, 1fr);
}

.results-public-shell > * {
    min-width: 0;
}

.results-hero {
    display: grid;
    gap: 14px;
    background:
        linear-gradient(135deg, rgba(11, 72, 138, 0.08), rgba(245, 249, 255, 0.96) 52%, rgba(121, 160, 255, 0.14)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 248, 255, 0.98));
    border: 1px solid rgba(25, 47, 76, 0.08);
    border-radius: 28px;
    box-shadow: 0 20px 44px rgba(34, 43, 37, 0.08);
    padding: 22px 24px 20px;
    position: relative;
    overflow: visible;
}

.results-hero::before,
.results-hero::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16px;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(170, 25, 44, 0.94) 0 10px,
            rgba(255, 255, 255, 0) 10px 15px,
            rgba(17, 42, 31, 0.92) 15px 25px,
            rgba(255, 255, 255, 0) 25px 31px
        );
    opacity: 0.88;
}

.results-hero::before {
    left: 0;
    border-radius: 28px 0 0 28px;
}

.results-hero::after {
    right: 0;
    border-radius: 0 28px 28px 0;
}

.results-hero-copy {
    padding-inline: 14px;
}

.results-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4.4vw, 44px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #1b2f2a;
    overflow-wrap: anywhere;
}

.results-public-search {
    position: relative;
    display: grid;
    gap: 10px;
    padding-inline: 14px;
}

.results-toolbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.results-toolbar-search {
    min-width: 0;
}

.results-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(25, 47, 76, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(34, 43, 37, 0.06);
    overflow: hidden;
}

.results-search-box .results-search-input {
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding-right: 10px;
}

.results-search-box .results-search-input:focus {
    box-shadow: none;
}

.results-search-submit {
    width: 52px;
    height: 52px;
    border: 0;
    border-left: 1px solid rgba(25, 47, 76, 0.08);
    background: linear-gradient(180deg, #f8fbff, #eaf1ff);
    color: #31507a;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.results-search-submit:hover {
    background: linear-gradient(180deg, #ffffff, #dde8ff);
    color: #163e72;
}

.results-search-submit svg {
    width: 20px;
    height: 20px;
}

.results-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 116px;
    justify-content: center;
    height: 52px;
    border: 1px solid rgba(25, 47, 76, 0.10);
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #e9f0ff);
    color: #1d466f;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    position: relative;
    box-shadow: 0 12px 28px rgba(34, 43, 37, 0.06);
}

.results-filter-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(29, 70, 111, 0.18);
}

.results-filter-toggle.is-active::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #bf2230;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92);
}

.results-filter-toggle svg {
    width: 18px;
    height: 18px;
}

.results-filter-strip {
    display: grid;
    gap: 8px;
}

.results-filter-strip:empty {
    display: none;
}

.results-filter-pill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.results-filter-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6c786d;
}

.results-filter-chip,
.results-filter-clear-all {
    border: 1px solid rgba(25, 47, 76, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #20312d;
    cursor: pointer;
    font-weight: 600;
    transition: border-color 180ms ease, transform 180ms ease;
}

.results-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.results-filter-clear-all {
    padding: 8px 12px;
}

.results-filter-chip:hover,
.results-filter-clear-all:hover {
    border-color: rgba(29, 70, 111, 0.18);
    transform: translateY(-1px);
}

.results-filters-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    z-index: 15;
    display: none;
    width: min(420px, calc(100% - 28px));
    gap: 12px;
    border: 1px solid rgba(25, 47, 76, 0.08);
    border-radius: 22px;
    background: rgba(247, 250, 255, 0.98);
    box-shadow: 0 24px 54px rgba(34, 43, 37, 0.16);
    padding: 16px;
}

.results-filters-panel.is-open {
    display: grid;
    animation: resultsFiltersReveal 180ms ease;
}

.results-filter-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.results-filter-panel-head strong {
    font-size: 15px;
    color: #1d2f2b;
}

.results-filter-panel-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(28, 45, 43, 0.08);
    color: #40514d;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.results-filter-fields {
    display: grid;
    gap: 10px;
}

.results-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.results-public-card {
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: min(72dvh, 920px);
    background: #ffffff;
    border: 1px solid rgba(25, 47, 76, 0.08);
    box-shadow: 0 20px 44px rgba(15, 38, 92, 0.08);
}

.results-dataset {
    display: grid;
    gap: 12px;
    min-height: 0;
    height: 100%;
    padding: 18px;
}

.results-dataset-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: #68756a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-desktop-view,
.results-mobile-view {
    min-height: 0;
}

.results-desktop-view {
    display: block;
}

.results-mobile-view {
    display: none;
}

.results-grid-wrap,
.results-mobile-shell {
    min-height: 0;
    height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.results-grid-wrap {
    border: 1px solid rgba(25, 47, 76, 0.06);
    border-radius: 22px;
    background: rgba(247, 250, 255, 0.9);
}

.results-grid-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.results-grid-table th,
.results-grid-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(25, 47, 76, 0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.25;
}

.results-grid-title-row th {
    position: sticky;
    top: 0;
    z-index: 7;
    background: rgba(247, 250, 255, 0.98);
    box-shadow: 0 12px 24px rgba(15, 38, 92, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.results-grid-header-row th {
    position: sticky;
    top: 53px;
    z-index: 6;
    background: rgba(247, 250, 255, 0.98);
    box-shadow: inset 0 -1px 0 rgba(25, 47, 76, 0.06);
    color: #637166;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-grid-group.is-current .results-grid-title-row th {
    transform: translateY(0);
    box-shadow: 0 16px 30px rgba(24, 63, 114, 0.12);
    background: rgba(237, 243, 255, 0.99);
}

.results-grid-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.results-grid-title strong {
    font-size: 17px;
    color: #1d2f2b;
}

.results-grid-title span {
    font-size: 12px;
    font-weight: 800;
    color: #6a786d;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-grid-code,
.results-grid-score,
.results-grid-total {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.results-grid-code {
    width: 96px;
}

.results-grid-participant {
    width: 250px;
}

.results-grid-project {
    width: 280px;
}

.results-grid-project span,
.results-grid-link a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-grid-link a,
.results-mobile-card-link {
    color: #145aa3;
    font-weight: 700;
    text-decoration: none;
}

.results-grid-link a:hover,
.results-mobile-card-link:hover {
    text-decoration: underline;
}

.results-grid-total {
    color: #123d74;
    background: rgba(237, 243, 255, 0.9);
}

.results-mobile-shell {
    display: grid;
    gap: 14px;
    align-content: start;
}

.results-mobile-group {
    display: grid;
    gap: 10px;
}

.results-mobile-group-header {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(25, 47, 76, 0.06);
    border-radius: 18px;
    background: rgba(247, 250, 255, 0.98);
    box-shadow: 0 12px 24px rgba(15, 38, 92, 0.08);
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.results-mobile-group.is-current .results-mobile-group-header {
    box-shadow: 0 16px 28px rgba(24, 63, 114, 0.12);
}

.results-mobile-group-header strong {
    font-size: 15px;
    line-height: 1.2;
    color: #1c2e2a;
}

.results-mobile-group-header span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #69766c;
    white-space: nowrap;
}

.results-mobile-cards {
    display: grid;
    gap: 10px;
}

.results-mobile-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(25, 47, 76, 0.06);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(34, 43, 37, 0.06);
}

.results-mobile-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.results-mobile-card-code {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6a766d;
}

.results-mobile-card-name {
    margin: 0;
    font-size: 18px;
    line-height: 1.15;
    color: #1c2e2a;
}

.results-mobile-card-project {
    font-size: 14px;
    line-height: 1.35;
    color: #40514d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.results-mobile-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.results-mobile-score-item {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(248, 244, 235, 0.88);
}

.results-mobile-score-item span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #69766c;
}

.results-mobile-score-item strong {
    font-size: 16px;
    line-height: 1;
    color: #1d2f2b;
    font-variant-numeric: tabular-nums;
}

.results-mobile-score-item.is-total {
    background: rgba(237, 243, 255, 0.94);
}

.results-mobile-card-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-empty-state {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 220px;
    padding: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #66756b;
}

@media (max-width: 1280px) {
    .results-public-card {
        height: min(74dvh, 860px);
    }

    .results-grid-table {
        min-width: 1080px;
    }
}

@media (max-width: 768px) {
    .public-shell .content {
        padding: 12px;
        min-height: 100dvh;
    }

    .results-public-shell {
        gap: 12px;
        min-height: calc(100dvh - 24px);
    }

    .results-hero {
        padding: 16px 16px 14px;
        border-radius: 22px;
    }

    .results-hero::before,
    .results-hero::after {
        width: 12px;
    }

    .results-hero-copy,
    .results-public-search {
        padding-inline: 8px;
    }

    .results-hero h1 {
        font-size: 29px;
        line-height: 1.04;
    }

    .results-toolbar-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .results-filter-toggle {
        width: 100%;
        min-width: 0;
    }

    .results-filters-panel {
        right: 8px;
        width: calc(100% - 16px);
        padding: 14px;
    }

    .results-public-card {
        height: min(74dvh, 760px);
        border-radius: 22px;
    }

    .results-dataset {
        padding: 14px;
    }

    .results-desktop-view {
        display: none;
    }

    .results-mobile-view {
        display: block;
    }

    .results-mobile-score-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .results-search-box {
        grid-template-columns: minmax(0, 1fr) 48px;
        border-radius: 16px;
    }

    .results-search-submit {
        width: 48px;
        height: 48px;
    }

    .results-search-box .results-search-input {
        padding-left: 14px;
        padding-right: 8px;
    }

    .results-filter-toggle {
        height: 48px;
        border-radius: 14px;
    }

    .results-filter-pill-row {
        align-items: flex-start;
    }

    .results-public-card {
        height: min(78dvh, 720px);
    }

    .results-mobile-group-header {
        top: 0;
        padding: 11px 12px;
    }

    .results-mobile-card {
        padding: 12px;
        border-radius: 18px;
    }

    .results-mobile-card-name {
        font-size: 17px;
    }

    .results-mobile-score-grid {
        grid-template-columns: 1fr;
    }
}

.results-hero,
.results-hero button,
.results-hero input,
.results-filters-panel,
.results-filters-panel button,
.results-filters-panel select {
    font-family: 'Montserrat', sans-serif;
}

.results-hero {
    background: #ffffff;
    border: 1px solid #e6edf8;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(15, 38, 92, 0.04);
    padding: 0;
    overflow: visible;
}

.results-hero::before,
.results-hero::after {
    display: none;
}

.results-hero__strip {
    height: 14px;
    width: 100%;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 42%, #4f79ff 42%, #4f79ff 52%, transparent 52%),
        linear-gradient(-45deg, transparent 42%, #4f79ff 42%, #4f79ff 52%, transparent 52%),
        linear-gradient(45deg, transparent 45%, #9cb8ff 45%, #9cb8ff 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, #9cb8ff 45%, #9cb8ff 55%, transparent 55%);
    background-position: 0 0, 9px 0, 4px 0, 13px 0;
    background-size: 18px 14px, 18px 14px, 36px 14px, 36px 14px;
    background-repeat: repeat-x;
    border-radius: 28px 28px 0 0;
}

.results-hero__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 26px 22px;
    width: 100%;
}

.results-hero .results-hero__title {
    margin: 0 0 30px;
    padding-inline: 0;
    max-width: 980px;
    font-size: clamp(26px, 2.7vw, 40px);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f265c;
}

.results-public-search {
    position: relative;
    display: block;
    padding: 0;
}

.results-hero__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 980px;
}

.search-field {
    flex: 1 1 auto;
    min-width: 0;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 18px;
    background: #fff;
    border: 2px solid #d9e4ff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 38, 92, 0.04);
    color: #4f79ff;
}

.search-field__icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.search-field__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: #0f265c;
    padding: 0;
    box-shadow: none;
}

.search-field__input::placeholder {
    color: #97a3bf;
}

.search-field__input:focus {
    box-shadow: none;
}

.filter-button {
    width: 56px;
    min-width: 0;
    max-width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d9e4ff;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 38, 92, 0.04);
    color: #4f79ff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.filter-button:hover {
    background: #edf3ff;
    transform: translateY(-1px);
    border-color: #a9c0ff;
    box-shadow: 0 12px 28px rgba(79, 121, 255, 0.14);
}

.filter-button.is-active {
    background: #edf3ff;
    border-color: #bfd0ff;
}

.filter-button.is-active::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #4f79ff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95);
}

.filter-button__icon {
    width: 22px;
    height: 22px;
}

.search-field:focus-within,
.filter-button:focus-visible {
    border-color: #a9c0ff;
    box-shadow: 0 0 0 4px rgba(79, 121, 255, 0.12);
    outline: none;
}

.results-filter-strip {
    margin-top: 14px;
}

.results-filters-panel {
    top: calc(100% + 10px);
    right: 28px;
    width: min(380px, calc(100% - 56px));
    grid-template-columns: 1fr;
    justify-items: stretch;
    border: 1px solid #e6edf8;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 36px rgba(15, 38, 92, 0.08);
    padding: 18px;
}

.results-filter-chip,
.results-filter-clear-all {
    border-color: #d9e4ff;
    background: #edf3ff;
    color: #0f265c;
}

.results-filter-chip:hover,
.results-filter-clear-all:hover {
    border-color: #bfd0ff;
}

.results-filter-label,
.results-filter-panel-head strong {
    color: #0f265c;
}

.results-filter-panel-head {
    margin-bottom: 4px;
}

.results-filter-panel-close {
    width: 38px;
    height: 38px;
    background: #edf3ff;
    color: #4f79ff;
}

.results-filter-fields {
    gap: 12px;
    width: 100%;
}

.results-filter-select {
    min-width: 0;
    border-radius: 18px;
    padding: 14px 16px;
    background: #ffffff;
}

.results-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 4px;
    width: 100%;
}

.results-filter-actions .btn {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
}

@media (max-width: 1100px) {
    .results-hero__inner {
        padding: 24px 20px 20px;
    }

    .results-hero__title {
        margin-bottom: 26px;
        max-width: 100%;
    }

    .search-field {
        height: 54px;
        padding: 0 18px;
        border-radius: 18px;
    }

    .filter-button {
        width: 54px;
        max-width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 18px;
    }

    .search-field__icon,
    .filter-button__icon {
        width: 21px;
        height: 21px;
    }

    .search-field__input {
        font-size: 17px;
    }

    .results-filters-panel {
        right: 22px;
        width: min(360px, calc(100% - 44px));
    }
}

@media (max-width: 768px) {
    .results-hero__inner {
        padding: 22px 16px 18px;
    }

    .results-hero__title {
        font-size: 23px;
        line-height: 1.2;
        margin-bottom: 22px;
    }

    .results-hero__controls {
        gap: 10px;
    }

    .search-field {
        height: 48px;
        padding: 0 14px;
        gap: 10px;
        border-radius: 16px;
    }

    .filter-button {
        width: 48px;
        max-width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 16px;
    }

    .search-field__icon,
    .filter-button__icon {
        width: 19px;
        height: 19px;
    }

    .search-field__input {
        font-size: 16px;
    }

    .filter-button.is-active::after {
        top: 10px;
        right: 10px;
        width: 8px;
        height: 8px;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95);
    }

    .results-filter-strip {
        margin-top: 10px;
    }

    .results-filters-panel {
        top: calc(100% + 6px);
        right: 0;
        width: 100%;
        border-radius: 20px;
        padding: 14px;
    }

    .results-filter-actions {
        grid-template-columns: 1fr;
    }
}

/* Public results use the same scrollable table on every viewport. */
.results-public-card {
    background: #ffffff;
    border: 0;
    box-shadow: 0 14px 34px rgba(15, 38, 92, 0.06);
}

.results-dataset {
    gap: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.results-desktop-view {
    display: block;
    height: 100%;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.results-grid-wrap {
    height: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    scrollbar-color: #b7c9ef #f2f6fd;
    scrollbar-width: thin;
}

.results-grid-table {
    --results-title-row-height: 48px;
    min-width: 1580px;
    background: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
}

.results-grid-table th,
.results-grid-table td {
    border-bottom-color: #e6edf8;
}

.results-grid-table td {
    padding: 11px 13px;
    background: #ffffff;
    color: #263a66;
}

.results-grid-group > tr:nth-child(even) > td {
    background: #f8faff;
}

.results-grid-group > tr:hover > td {
    background: #eef4ff;
}

.results-grid-title-row th,
.results-grid-header-row th,
.results-grid-group.is-current .results-grid-title-row th {
    background: #e8efff;
    box-shadow: none;
}

.results-grid-title-row th {
    height: var(--results-title-row-height);
    z-index: 11;
    padding: 12px 14px 8px;
    border-bottom: 0;
    transition: none;
}

.results-grid-header-row th {
    top: var(--results-title-row-height);
    z-index: 9;
    padding: 8px 13px 11px;
    border-top: 0;
    border-bottom: 1px solid #cbd9f5;
    color: #52668f;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.28;
    letter-spacing: 0.035em;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    box-shadow: none;
}

.results-grid-header-code {
    width: 96px;
}

.results-grid-header-participant {
    width: 190px;
}

.results-grid-header-place {
    width: 106px;
}

.results-grid-header-criterion {
    width: 130px;
}

.results-grid-header-total {
    width: 104px;
}

.results-grid-header-project {
    width: 190px;
}

.results-grid-header-link {
    width: 210px;
}

.results-col-code {
    width: 96px;
}

.results-col-participant {
    width: 190px;
}

.results-col-place {
    width: 106px;
}

.results-col-criterion {
    width: 130px;
}

.results-col-total {
    width: 104px;
}

.results-col-project {
    width: 190px;
}

.results-col-link {
    width: 210px;
}

.results-grid-table td.results-grid-link {
    overflow: visible;
    white-space: nowrap;
    text-overflow: clip;
}

.results-grid-link a {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
}

.results-grid-title strong {
    color: #0f265c;
    font-size: 16px;
}

.results-grid-title {
    position: static;
    width: max-content;
    max-width: calc(100vw - 72px);
    will-change: transform;
}

.results-grid-title strong {
    white-space: normal;
    overflow-wrap: break-word;
}

.results-grid-table td.results-grid-participant {
    width: 190px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.results-grid-participant-text {
    display: block;
    line-height: inherit;
}

.results-grid-table td.results-grid-project {
    white-space: normal;
}

.jobs-page,
.candidates-page {
    display: grid;
    gap: 18px;
}

.jobs-hero,
.candidates-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(15, 38, 92, 0.06);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
    box-shadow: var(--shadow);
}

.jobs-kicker {
    margin-bottom: 8px;
    color: #ff5252;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.jobs-hero h2,
.candidates-hero h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.055em;
    color: #212527;
}

.jobs-hero p,
.candidates-hero p {
    max-width: 720px;
    margin: 10px 0 0;
    color: #687e88;
    line-height: 1.55;
}

.jobs-list {
    display: grid;
    gap: 14px;
}

.job-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(5, 5, 6, 0.14);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.job-card:hover {
    transform: translateY(-1px);
    border-color: #c8d1d6;
    box-shadow: 0 8px 22px rgba(5, 5, 6, 0.16);
}

.job-card-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.job-card-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.job-card-title-row h3 {
    margin: 0;
    color: #212527;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.job-card-meta,
.candidate-meta,
.candidate-submeta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: #687e88;
    font-size: 13px;
    line-height: 1.35;
}

.job-card-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.job-card-stats span {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 13px;
    background: #f2f5f8;
    color: #687e88;
    font-size: 13px;
}

.job-card-stats strong {
    color: #212527;
    font-size: 18px;
}

.job-card-actions,
.candidate-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-state {
    padding: 34px;
    border: 1px dashed #c8d1d6;
    border-radius: 20px;
    background: #ffffff;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: #212527;
}

.empty-state p {
    max-width: 540px;
    margin: 0 auto 18px;
    color: #687e88;
    line-height: 1.5;
}

.candidate-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
    align-items: start;
}

.candidate-main,
.candidate-sidebar {
    display: grid;
    gap: 14px;
}

.candidate-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(5, 5, 6, 0.08);
}

.candidate-toolbar-count {
    color: #687e88;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

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

.candidate-row {
    width: 100%;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e0e7eb;
    border-radius: 18px;
    background: #ffffff;
    color: #212527;
    text-align: left;
    box-shadow: 0 2px 10px rgba(5, 5, 6, 0.12);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.candidate-row:hover {
    transform: translateY(-1px);
    border-color: #c8d1d6;
    box-shadow: 0 9px 24px rgba(5, 5, 6, 0.16);
}

.candidate-avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffe9e9;
    color: #d93a3b;
    font-size: 22px;
    font-weight: 800;
}

.candidate-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.candidate-name {
    overflow: hidden;
    color: #212527;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.candidate-right {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.candidate-filter-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e0e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(5, 5, 6, 0.08);
}

.candidate-filter-card h3 {
    margin: 0 0 6px;
    color: #212527;
    font-size: 17px;
}

.candidate-filter-card p {
    margin: 0;
    color: #687e88;
    font-size: 13px;
    line-height: 1.55;
}

.candidate-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #687e88;
    font-size: 14px;
    font-weight: 700;
}

.candidate-filter:hover,
.candidate-filter.active {
    color: #212527;
}

.candidate-filter:hover,
.candidate-filter.active {
    background: #f3f6f9;
}

.candidate-filter.status-new:hover,
.candidate-filter.status-new.active {
    background: #f3e8ff;
}

.candidate-filter.status-approved:hover,
.candidate-filter.status-approved.active {
    background: #dcfce7;
}

.candidate-filter.status-rejected:hover,
.candidate-filter.status-rejected.active {
    background: #fee2e2;
}

.candidate-filter.status-needs-info:hover,
.candidate-filter.status-needs-info.active {
    background: #dbeafe;
}

.candidate-filter strong {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ffffff;
    text-align: center;
}

.candidate-filter.status-new strong {
    color: #6b21a8;
}

.candidate-filter.status-approved strong {
    color: #166534;
}

.candidate-filter.status-rejected strong {
    color: #991b1b;
}

.candidate-filter.status-needs-info strong {
    color: #1d4ed8;
}

.modal-open {
    overflow: hidden;
}

.moderation-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
}

.moderation-modal[hidden] {
    display: none;
}

.moderation-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 6, 0.36);
    opacity: 0;
    transition: opacity 160ms ease;
}

.moderation-modal.open .moderation-modal-backdrop {
    opacity: 1;
}

.moderation-dialog {
    position: relative;
    width: 80vw;
    max-width: none;
    min-width: min(980px, 100vw);
    height: 100vh;
    max-height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 18px 0 0 18px;
    background: #ffffff;
    box-shadow: -24px 0 70px rgba(5, 5, 6, 0.28);
    transform: translateX(100%);
    opacity: 1;
    transition: transform 180ms ease, opacity 180ms ease;
}

.moderation-modal.open .moderation-dialog {
    transform: translateX(0);
    opacity: 1;
}

.moderation-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid #e0e7eb;
}

.moderation-title-block {
    min-width: 220px;
}

.moderation-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.moderation-dialog-head h3 {
    margin: 0;
    color: #212527;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.moderation-dialog-head p {
    margin: 6px 0 0;
    color: #687e88;
}

.moderation-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
}

.moderation-head-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.moderation-nav-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e2e8;
    border-radius: 999px;
    background: #ffffff;
    color: #212527;
    cursor: pointer;
}

.moderation-nav-button svg {
    width: 22px;
    height: 22px;
}

.moderation-nav-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.moderation-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f2f5f8;
    color: #212527;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.moderation-dialog-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
}

.moderation-document,
.moderation-details {
    min-height: 0;
    overflow: auto;
}

.moderation-document {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: #f2f5f8;
    border-right: 1px solid #e0e7eb;
}

.moderation-document-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e0e7eb;
}

.moderation-document-frame {
    min-height: 0;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 12px;
    color: #687e88;
}

.moderation-document-message {
    display: grid;
    gap: 10px;
    justify-items: center;
    max-width: 420px;
    padding: 28px;
    text-align: center;
    line-height: 1.5;
}

.moderation-document-message strong {
    color: #212527;
    font-size: 18px;
}

.moderation-document-message span {
    color: #687e88;
}

.moderation-document-message.is-error strong {
    color: #b42318;
}

.moderation-document-image,
.moderation-document-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
}

.moderation-document-image {
    min-height: auto;
    max-height: calc(100vh - 118px);
    object-fit: contain;
    box-shadow: 0 18px 44px rgba(15, 32, 61, 0.08);
}

.moderation-details {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 16px;
}

.moderation-actionbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.moderation-dialog-head .moderation-decision-form {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.moderation-decision-form.is-submitting {
    opacity: 0.72;
}

.moderation-primary-action,
.btn-success {
    background: #14853f;
    border-color: #14853f;
    color: #ffffff;
}

.moderation-primary-action:hover,
.btn-success:hover {
    background: #0f7034;
    border-color: #0f7034;
}

.reject-action-group {
    display: inline-flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(17, 19, 21, 0.12);
}

.reject-main {
    position: relative;
    z-index: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
    padding-right: 16px;
}

.reject-action-group .reject-main {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.reject-silent {
    min-width: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0 12px 12px 0;
    background: #1b1d20;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.reject-silent:hover {
    background: #111315;
}

.reject-action-group:focus-within {
    box-shadow: 0 0 0 3px rgba(180, 82, 73, 0.18), 0 10px 24px rgba(17, 19, 21, 0.12);
}

.detail-block,
.rejection-panel,
.moderation-decision-form {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e0e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.rejection-panel[hidden] {
    display: none;
}

.detail-block h4 {
    margin: 0;
    color: #212527;
    font-size: 16px;
}

.detail-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.application-identity-feedback {
    font-size: 12px;
    font-weight: 700;
    color: #687e88;
    text-align: right;
}

.application-identity-feedback[data-state="success"] {
    color: #14853f;
}

.application-identity-feedback[data-state="error"] {
    color: #b42318;
}

.application-identity-form {
    display: grid;
    gap: 12px;
}

.application-identity-form.is-submitting {
    opacity: 0.72;
}

.application-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.application-identity-field {
    display: grid;
    gap: 6px;
}

.application-identity-field span {
    color: #687e88;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-block dl,
.mapped-fields {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px 12px;
    margin: 0;
}

.detail-block dt,
.mapped-fields dt {
    color: #687e88;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-block dd,
.mapped-fields dd {
    min-width: 0;
    margin: 0;
    color: #212527;
    word-break: break-word;
}

.criteria-check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.criteria-check-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    background: #f4f7fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.moderation-load-state {
    padding: 14px 16px;
    color: #687e88;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.moderation-load-state[hidden] {
    display: none;
}

.criteria-check-list li.ok {
    background: linear-gradient(180deg, #eefaf2 0%, #e2f6e8 100%);
    border-color: rgba(20, 133, 63, 0.16);
    color: #116737;
}

.criteria-check-list li.fail {
    background: linear-gradient(180deg, #fff1f0 0%, #fde6e3 100%);
    border-color: rgba(180, 35, 24, 0.14);
    color: #a1352b;
}

.criteria-check-list li.warning {
    background: linear-gradient(180deg, #fff8e1 0%, #ffefb8 100%);
    border-color: rgba(180, 118, 0, 0.18);
    color: #8a5a00;
}

.criteria-status-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    flex: 0 0 38px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.criteria-check-list li.ok .criteria-status-icon {
    background: #1fa454;
}

.criteria-check-list li.fail .criteria-status-icon {
    background: #d34a3c;
}

.criteria-check-list li.warning .criteria-status-icon {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.criteria-status-icon::before,
.criteria-status-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #ffffff;
    border-radius: 999px;
    transform-origin: center;
}

.criteria-check-list li.ok .criteria-status-icon::before {
    width: 6px;
    height: 14px;
    transform: translate(-9px, -1px) rotate(-45deg);
}

.criteria-check-list li.ok .criteria-status-icon::after {
    width: 6px;
    height: 22px;
    transform: translate(-1px, -7px) rotate(45deg);
}

.criteria-check-list li.fail .criteria-status-icon::before {
    width: 6px;
    height: 22px;
    transform: translate(-3px, -11px) rotate(45deg);
}

.criteria-check-list li.fail .criteria-status-icon::after {
    width: 6px;
    height: 22px;
    transform: translate(-3px, -11px) rotate(-45deg);
}

.criteria-check-list li.warning .criteria-status-icon::before {
    width: 0;
    height: 0;
    border-left: 19px solid transparent;
    border-right: 19px solid transparent;
    border-bottom: 34px solid #d99000;
    border-radius: 4px;
    background: transparent;
    transform: translate(-50%, -50%);
}

.criteria-check-list li.warning .criteria-status-icon::after {
    width: 4px;
    height: 14px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 18px 0 #ffffff;
    transform: translate(-50%, -12px);
}

.criteria-card-content {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.criteria-card-content strong {
    color: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.criteria-card-content span {
    color: inherit;
    opacity: 0.78;
    font-size: 12px;
    line-height: 1.35;
}

.criteria-weight {
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.moderation-decision-form label,
.rejection-panel label {
    color: #687e88;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

@media (max-width: 1180px) {
    .candidate-board {
        grid-template-columns: 1fr;
    }

    .candidate-sidebar {
        order: -1;
    }
}

@media (max-width: 900px) {
    .moderation-dialog {
        width: 100vw;
        min-width: 0;
        border-radius: 0;
    }

    .moderation-dialog-head,
    .moderation-head-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .moderation-actionbar,
    .moderation-head-tools {
        justify-content: flex-start;
    }

    .moderation-dialog-grid {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .moderation-document {
        min-height: 52vh;
        border-right: 0;
        border-bottom: 1px solid #e0e7eb;
    }

    .application-identity-grid {
        grid-template-columns: 1fr;
    }

    .criteria-check-list {
        grid-template-columns: 1fr;
    }

    .moderation-details {
        overflow: visible;
    }
}

@media (max-width: 760px) {
    .jobs-hero,
    .candidates-hero,
    .job-card,
    .candidate-toolbar,
    .candidate-row {
        grid-template-columns: 1fr;
    }

    .jobs-hero,
    .candidates-hero {
        display: grid;
    }

    .job-card-actions,
    .candidate-hero-actions,
    .candidate-right {
        justify-content: flex-start;
    }

    .moderation-modal {
        padding: 0;
    }

    .moderation-dialog {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .moderation-document-frame,
    .moderation-document-frame iframe {
        min-height: 420px;
    }

    .detail-block dl,
    .mapped-fields {
        grid-template-columns: 1fr;
    }
}

.results-grid-project span {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--project-lines, 1);
    line-clamp: var(--project-lines, 1);
}

.results-grid-total {
    background: #ffffff;
    color: #173b78;
}

.results-grid-group > tr:nth-child(even) > td.results-grid-total {
    background: #f8faff;
}

.results-grid-group > tr:hover > td.results-grid-total {
    background: #eef4ff;
}

.results-grid-header-row th:first-child {
    left: 0;
    z-index: 10;
}

.results-grid-group > tr:not(.results-grid-title-row):not(.results-grid-header-row) > td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 1px 0 0 #e1e9f8;
}

.results-grid-group > tr:nth-child(even) > td:first-child {
    background: #f8faff;
}

.results-grid-group > tr:hover > td:first-child {
    background: #eef4ff;
}

@media (max-width: 1100px) {
    .results-grid-table {
        min-width: 1580px;
    }

    .results-grid-table th,
    .results-grid-table td {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .results-public-card {
        height: min(70dvh, 720px);
        border-radius: 18px;
    }

    .results-dataset {
        padding: 0;
    }

    .results-desktop-view {
        display: block;
    }

    .results-grid-wrap {
        border-radius: 0;
    }

    .results-grid-table {
        --results-title-row-height: 44px;
        min-width: 1580px;
    }

    .results-grid-table th,
    .results-grid-table td {
        padding: 9px 11px;
        font-size: 12px;
    }

    .results-grid-title-row th {
        padding: 10px 11px 7px;
    }

    .results-grid-header-row th {
        padding: 7px 11px 9px;
        font-size: 10px;
        line-height: 1.25;
    }

    .results-grid-title strong {
        font-size: 14px;
    }

    .results-grid-title {
        max-width: calc(100vw - 46px);
    }

    .results-grid-code {
        width: 96px;
    }
}

.code-block {
    margin: 0;
    padding: 16px;
    border-radius: var(--radius-md);
    background: #0f1d3b;
    color: #eef4ff;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}
