:root {
    --ink: #2b1717;
    --ink-soft: #594a48;
    --navy: #8f151b;
    --navy-deep: #3d080c;
    --blue: #a61f25;
    --blue-light: #faebe9;
    --gold: #c49a4d;
    --gold-light: #f5ead3;
    --paper: #faf5ed;
    --white: #ffffff;
    --line: #e3d9d2;
    --line-dark: rgba(255, 255, 255, 0.14);
    --success: #26735b;
    --success-bg: #e8f4ef;
    --warning: #956316;
    --warning-bg: #fff5df;
    --danger: #8c1b20;
    --danger-bg: #fbe8e7;
    --muted: #827573;
    --shadow-sm: 0 8px 28px rgba(69, 19, 20, 0.07);
    --shadow-lg: 0 28px 75px rgba(51, 6, 10, 0.2);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 26px;
    --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
    --admin-sidebar: 252px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

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

img,
svg {
    display: block;
    max-width: 100%;
}

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

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

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

.skip-link {
    position: fixed;
    top: -60px;
    left: 20px;
    z-index: 1000;
    padding: 10px 16px;
    color: var(--white);
    background: var(--navy);
    border-radius: 8px;
}

.skip-link:focus {
    top: 12px;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: rgba(57, 7, 11, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    color: var(--gold);
    border: 1px solid rgba(189, 150, 81, 0.8);
    border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
    position: absolute;
    width: 22px;
    height: 1px;
    content: "";
    background: currentColor;
    opacity: 0.6;
}

.brand-mark::after {
    transform: rotate(90deg);
}

.brand-mark span {
    position: relative;
    z-index: 1;
    width: 9px;
    height: 9px;
    background: var(--gold);
    transform: rotate(45deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-text strong {
    font-family: var(--font-serif);
    font-size: 19px;
    letter-spacing: 0.08em;
}

.brand-text small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.53);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-right: 28px;
}

.public-nav a {
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
    transition: color 0.2s ease;
}

.public-nav a:hover {
    color: var(--white);
}

.nav-admin {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.nav-account {
    color: #f0d49a !important;
}

.nav-logout {
    margin: 0;
}

.nav-logout button {
    padding: 0;
    color: rgba(255, 255, 255, 0.74);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 14px;
}

.nav-login {
    color: #f0d49a !important;
    font-weight: 650;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 10px;
    color: var(--white);
    background: transparent;
    border: 0;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    margin: 5px 0;
    background: currentColor;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 690px;
    color: var(--white);
    background:
        radial-gradient(circle at 74% 22%, rgba(205, 116, 91, 0.22), transparent 27%),
        linear-gradient(130deg, #3f070b 0%, #741014 55%, #971b20 100%);
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.16;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 62px 62px;
    mask-image: linear-gradient(to right, black, transparent 79%);
}

.hero::after {
    position: absolute;
    right: -180px;
    bottom: -400px;
    width: 780px;
    height: 780px;
    content: "";
    border: 1px solid rgba(189, 150, 81, 0.18);
    border-radius: 50%;
    box-shadow:
        0 0 0 90px rgba(255, 255, 255, 0.018),
        0 0 0 190px rgba(255, 255, 255, 0.012);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    min-height: 690px;
    padding: 82px 0 100px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.eyebrow::before {
    width: 34px;
    height: 1px;
    content: "";
    background: currentColor;
}

.hero h1 {
    margin-bottom: 26px;
    font-family: var(--font-serif);
    font-size: clamp(46px, 5vw, 70px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.hero h1 em {
    color: #e7ca91;
    font-style: normal;
}

.hero-lead {
    max-width: 590px;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.69);
    font-size: 17px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 20px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(61, 13, 16, 0.12);
}

.btn:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.btn-primary {
    color: var(--white);
    background: var(--blue);
    border-color: var(--blue);
}

.btn-gold {
    color: #33240b;
    background: #d6b675;
    border-color: #d6b675;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.btn-dark {
    color: var(--white);
    background: var(--navy);
    border-color: var(--navy);
}

.btn-ghost {
    color: var(--ink);
    background: transparent;
    border-color: var(--line);
}

.btn-ghost-light {
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-danger {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #f2cecb;
}

.btn-sm {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 7px;
}

.btn-block {
    width: 100%;
}

.btn-arrow::after {
    content: "→";
    font-size: 17px;
    font-weight: 400;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 36px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

.trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.trust-row span::before {
    width: 5px;
    height: 5px;
    content: "";
    background: var(--gold);
    transform: rotate(45deg);
}

.hero-panel {
    position: relative;
    padding: 30px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
}

.hero-panel::before {
    position: absolute;
    top: 19px;
    right: 19px;
    width: 46px;
    height: 46px;
    content: "";
    border-top: 1px solid rgba(221, 188, 118, 0.44);
    border-right: 1px solid rgba(221, 188, 118, 0.44);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-head span:first-child {
    font-family: var(--font-serif);
    font-size: 18px;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.live-tag::before {
    width: 6px;
    height: 6px;
    content: "";
    background: #75c09d;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(117, 192, 157, 0.12);
}

.match-path {
    display: grid;
    gap: 0;
    padding: 15px 0 9px;
}

.match-step {
    position: relative;
    display: grid;
    grid-template-columns: 45px 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 73px;
}

.match-step:not(:last-child)::after {
    position: absolute;
    bottom: 0;
    left: 22px;
    width: 1px;
    height: 19px;
    content: "";
    background: rgba(255, 255, 255, 0.14);
}

.step-number {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #e8cf9e;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.match-step strong {
    display: block;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
}

.match-step small {
    color: rgba(255, 255, 255, 0.43);
    font-size: 11px;
}

.step-state {
    color: #a7ccbc;
    font-size: 11px;
}

.panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.panel-foot strong {
    color: #e4cc97;
    font-size: 17px;
    font-weight: 500;
}

.stats-band {
    position: relative;
    z-index: 2;
    margin-top: -42px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.stat-item {
    position: relative;
    padding: 24px 28px;
}

.stat-item:not(:last-child)::after {
    position: absolute;
    top: 26px;
    right: 0;
    bottom: 26px;
    width: 1px;
    content: "";
    background: var(--line);
}

.stat-item strong {
    display: block;
    margin-bottom: 1px;
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.stat-item span {
    color: var(--muted);
    font-size: 12px;
}

.section {
    padding: 108px 0;
}

.section-soft {
    background: var(--paper);
}

.section-kicker {
    color: var(--blue);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.2em;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 60px;
    align-items: end;
    margin-bottom: 48px;
}

.section-heading h2 {
    max-width: 650px;
    margin: 13px 0 0;
    font-family: var(--font-serif);
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.025em;
}

.section-heading p {
    margin: 0 0 3px;
    color: var(--muted);
    line-height: 1.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-card {
    position: relative;
    min-height: 290px;
    padding: 29px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.feature-index {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 13px;
    letter-spacing: 0.08em;
}

.feature-icon {
    display: grid;
    width: 50px;
    height: 50px;
    margin: 34px 0 22px;
    place-items: center;
    color: var(--blue);
    background: var(--blue-light);
    border-radius: 14px;
    font-family: var(--font-serif);
    font-size: 20px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 19px;
    font-weight: 700;
}

.feature-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
}

.feature-card::after {
    position: absolute;
    right: -35px;
    bottom: -50px;
    width: 130px;
    height: 130px;
    content: "";
    border: 1px solid rgba(143, 21, 27, 0.08);
    border-radius: 50%;
}

.process {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
}

.process-item {
    position: relative;
    padding: 34px 27px 0 0;
}

.process-item:not(:last-child)::after {
    position: absolute;
    top: 49px;
    right: 24px;
    color: #c4cbd1;
    content: "→";
}

.process-item small {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 13px;
}

.process-item h3 {
    margin: 12px 0 9px;
    font-size: 17px;
}

.process-item p {
    max-width: 220px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.notice-band {
    padding: 34px 0;
    color: rgba(255, 255, 255, 0.68);
    background: var(--navy);
}

.notice-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notice-inner strong {
    flex: 0 0 auto;
    color: #dfc48d;
    font-family: var(--font-serif);
    font-size: 18px;
}

.notice-inner p {
    margin: 0;
    font-size: 12px;
    line-height: 1.8;
}

.public-footer {
    padding: 48px 0;
    background: #f3eee7;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-serif);
    font-size: 19px;
}

.footer-brand p,
.footer-meta {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.footer-meta {
    text-align: right;
}

.footer-meta a {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: rgba(143, 21, 27, 0.35);
    text-underline-offset: 3px;
}

.footer-meta a:hover {
    color: #6f1015;
}

.page-hero {
    padding: 60px 0 42px;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(222, 139, 112, 0.18), transparent 34%),
        linear-gradient(120deg, #4f090e, #8f151b);
}

.page-hero h1 {
    margin-bottom: 10px;
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 600;
}

.page-hero p {
    max-width: 700px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.page-shell {
    min-height: calc(100vh - 390px);
    padding: 54px 0 90px;
    background: var(--paper);
}

.progress-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}

.progress-step span {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    background: #eee5df;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
}

.progress-step.is-active {
    color: var(--ink);
    font-weight: 650;
}

.progress-step.is-active span {
    color: var(--white);
    background: var(--blue);
}

.progress-step.is-done span {
    color: var(--white);
    background: var(--success);
}

.progress-line {
    width: 36px;
    height: 1px;
    background: #d9cbc4;
}

.upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.account-login-layout {
    display: grid;
    max-width: 920px;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 20px;
    margin: 0 auto;
    align-items: start;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-body {
    padding: 30px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 30px;
    border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
    margin: 0;
    font-size: 19px;
}

.card-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.upload-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    padding: 40px;
    text-align: center;
    background: #fbfcfc;
    border: 1.5px dashed #cdb9b1;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-box:hover,
.upload-box.is-dragging {
    background: var(--blue-light);
    border-color: var(--blue);
}

.upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.upload-symbol {
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    place-items: center;
    color: var(--blue);
    background: var(--blue-light);
    border-radius: 50%;
}

.upload-symbol::before {
    width: 21px;
    height: 26px;
    content: "";
    border: 1.5px solid currentColor;
    border-radius: 3px;
}

.upload-symbol::after {
    position: absolute;
    content: "↑";
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.upload-box h2 {
    margin-bottom: 8px;
    font-size: 20px;
}

.upload-box p {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 12px;
}

.file-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.file-type {
    padding: 4px 9px;
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.selected-file {
    display: none;
    width: min(440px, 100%);
    margin-top: 18px;
    padding: 11px 14px;
    color: var(--success);
    background: var(--success-bg);
    border-radius: 8px;
    font-size: 12px;
}

.selected-file.is-visible {
    display: block;
}

.side-card {
    padding: 26px;
}

.side-card h3 {
    margin-bottom: 18px;
    font-family: var(--font-serif);
    font-size: 18px;
}

.check-list {
    display: grid;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 26px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.75;
}

.check-list li::before {
    position: absolute;
    top: 3px;
    left: 0;
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    color: var(--success);
    content: "✓";
    background: var(--success-bg);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 750;
}

.privacy-note {
    padding: 16px;
    margin-top: 24px;
    color: var(--muted);
    background: var(--paper);
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.75;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
}

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

.field {
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
}

.field label .required {
    margin-left: 3px;
    color: var(--danger);
}

.field-hint {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #d9cbc5;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.7;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(143, 21, 27, 0.1);
}

.input::placeholder,
.textarea::placeholder {
    color: #ab9c99;
}

.form-section + .form-section {
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid var(--line);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-section-title span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    color: var(--blue);
    background: var(--blue-light);
    border-radius: 7px;
    font-family: var(--font-serif);
    font-size: 11px;
}

.parse-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    color: var(--ink-soft);
    background: var(--blue-light);
    border: 1px solid #eed0cd;
    border-radius: 10px;
    font-size: 12px;
}

.parse-info strong {
    flex: 0 0 auto;
    color: var(--blue);
}

.parse-info p {
    margin: 0;
}

.parse-warnings {
    padding-left: 19px;
    margin: 4px 0 0;
    color: var(--warning);
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    margin-top: 24px;
    background: var(--paper);
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.75;
}

.consent-row input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--blue);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid var(--line);
}

.form-actions .btn {
    min-width: 140px;
}

.form-error-note {
    color: var(--danger);
    font-size: 11px;
}

.flash-stack {
    position: fixed;
    top: 86px;
    right: 24px;
    z-index: 200;
    display: grid;
    width: min(400px, calc(100vw - 32px));
    gap: 10px;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 9px;
    box-shadow: var(--shadow-lg);
    font-size: 12px;
    animation: slide-in 0.25s ease both;
}

.flash.success {
    border-left-color: var(--success);
}

.flash.warning {
    border-left-color: var(--warning);
}

.flash.error {
    border-left-color: var(--danger);
}

.flash-message {
    flex: 1;
    line-height: 1.65;
}

.flash-close {
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.results-header h1 {
    margin-bottom: 8px;
    font-family: var(--font-serif);
    font-size: 33px;
    font-weight: 600;
}

.results-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

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

.candidate-brief {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
}

.brief-chip {
    padding: 5px 10px;
    color: var(--ink-soft);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 11px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 22px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.summary-item {
    padding: 19px 22px;
    border-right: 1px solid var(--line);
}

.summary-item:last-child {
    border-right: 0;
}

.summary-item strong {
    display: block;
    margin-bottom: 1px;
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
}

.summary-item span {
    color: var(--muted);
    font-size: 11px;
}

.summary-item.eligible strong {
    color: var(--success);
}

.summary-item.review strong {
    color: var(--warning);
}

.summary-item.ineligible strong {
    color: var(--danger);
}

.result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    margin-bottom: 15px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.filter-tab {
    padding: 7px 12px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.filter-tab.is-active {
    color: var(--white);
    background: var(--navy);
}

.result-search {
    width: 240px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: none;
    font-size: 12px;
}

.job-results {
    display: grid;
    gap: 12px;
}

.job-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 180px;
    gap: 22px;
    align-items: center;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.job-card:hover {
    border-color: #d2b9b2;
    box-shadow: var(--shadow-sm);
}

.job-card[hidden] {
    display: none;
}

.score-ring {
    --score: 0;
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--navy) calc(var(--score) * 1%), #f0e8e3 0);
}

.score-ring::before {
    position: absolute;
    inset: 6px;
    content: "";
    background: var(--white);
    border-radius: 50%;
}

.score-ring span {
    position: relative;
    z-index: 1;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
}

.job-main {
    min-width: 0;
}

.job-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 5px;
}

.job-title-row h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.job-code {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.04em;
}

.employer-line {
    margin-bottom: 12px;
    color: var(--ink-soft);
    font-size: 12px;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: 11px;
}

.job-meta span::before {
    margin-right: 5px;
    color: #b3a19d;
    content: "·";
}

.match-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.match-badge.eligible {
    color: var(--success);
    background: var(--success-bg);
}

.match-badge.review {
    color: var(--warning);
    background: var(--warning-bg);
}

.match-badge.ineligible {
    color: var(--danger);
    background: var(--danger-bg);
}

.job-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.details-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    color: var(--blue);
    background: transparent;
    border: 1px solid #e0cfc9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
}

.match-detail {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.match-detail[hidden] {
    display: none;
}

.checks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
    margin-bottom: 16px;
}

.check-item {
    padding: 12px;
    background: #fcfaf8;
    border: 1px solid #ebe1dc;
    border-radius: 8px;
}

.check-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.check-item p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
    line-height: 1.65;
}

.check-item.pass {
    border-left: 3px solid var(--success);
}

.check-item.warn {
    border-left: 3px solid var(--warning);
}

.check-item.fail {
    border-left: 3px solid var(--danger);
}

.job-requirements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.requirement {
    padding: 14px;
    color: var(--ink-soft);
    background: var(--paper);
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.75;
}

.requirement strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
}

.warning-list {
    padding-left: 18px;
    margin: 14px 0 0;
    color: var(--warning);
    font-size: 11px;
}

.empty-state {
    padding: 70px 30px;
    color: var(--muted);
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--ink);
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 12px;
}

.disclaimer {
    padding: 16px 18px;
    margin-top: 22px;
    color: var(--muted);
    background: #fffdf7;
    border: 1px solid #eadfc9;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.75;
}

/* Printable eligible-job report */
.report-body {
    min-height: 100vh;
    padding: 26px 20px 40px;
    color: #2d1516;
    background:
        linear-gradient(rgba(111, 32, 30, 0.035) 1px, transparent 1px),
        #e9e2da;
    background-size: 100% 30px;
}

.report-actions {
    display: flex;
    width: min(1080px, 100%);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto 14px;
}

.report-action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-action-group span {
    color: #7d6c69;
    font-size: 10px;
}

.report-sheet {
    width: min(1080px, 100%);
    min-height: 297mm;
    padding: 38px 42px 28px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ded2cb;
    box-shadow: 0 24px 70px rgba(66, 18, 20, 0.16);
}

.report-banner {
    position: relative;
    padding: 30px 32px 28px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 15%, rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(128deg, #b32127 0%, #8e151b 62%, #711015 100%);
}

.report-banner::after {
    position: absolute;
    right: -65px;
    bottom: -105px;
    width: 250px;
    height: 250px;
    content: "";
    border: 1px solid rgba(255, 226, 171, 0.24);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.035);
}

.report-banner-kicker {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.report-banner h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-family: var(--font-sans);
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.report-banner p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
}

.report-condition-card {
    padding: 17px 19px;
    margin-top: 20px;
    background: #fcfaf8;
    border: 1px solid #e0d9d5;
    border-radius: 7px;
}

.report-section-label {
    margin-bottom: 9px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 800;
}

.report-condition-main {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 7px;
    font-size: 12px;
}

.report-condition-main strong {
    color: var(--navy);
    font-size: 15px;
}

.report-condition-main span {
    display: inline-flex;
    align-items: center;
}

.report-condition-main span:not(:last-child)::after {
    width: 1px;
    height: 11px;
    margin-left: 10px;
    content: "";
    background: #d8cfca;
}

.report-condition-line {
    margin-top: 3px;
    color: #584a48;
    font-size: 11px;
    line-height: 1.75;
}

.report-total-card {
    padding: 15px 22px;
    margin-top: 18px;
    color: #2f5e4b;
    text-align: center;
    background: #f1f9f4;
    border: 1.5px solid #4c856e;
    border-radius: 8px;
}

.report-total-number {
    font-size: 16px;
    font-weight: 700;
}

.report-total-number strong {
    margin: 0 3px;
    color: #1f704f;
    font-family: var(--font-serif);
    font-size: 27px;
    line-height: 1;
}

.report-total-locations {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 750;
}

.report-total-card p {
    margin: 5px 0 0;
    color: #4f7566;
    font-size: 10px;
}

.report-list-heading {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 24px 0 10px;
}

.report-list-heading h2 {
    margin: 0;
    color: #2c1717;
    font-size: 19px;
    font-weight: 800;
}

.report-list-heading span {
    color: #685b58;
    font-size: 12px;
}

.report-job-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 10px;
}

.report-job-table .report-col-code {
    width: 13%;
}

.report-job-table .report-col-employer {
    width: 12%;
}

.report-job-table .report-col-position {
    width: 30%;
}

.report-job-table .report-col-location {
    width: 17%;
}

.report-job-table .report-col-exam {
    width: 28%;
}

.report-job-table th {
    padding: 9px 10px;
    color: #fff;
    background: #3f1217;
    border: 1px solid #3f1217;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
}

.report-job-table td {
    padding: 9px 10px;
    color: #3f3432;
    background: #fff;
    border-bottom: 1px solid #e8e2de;
    line-height: 1.55;
    vertical-align: middle;
    word-break: break-word;
}

.report-job-table tbody tr:nth-child(even) td {
    background: #fbf8f5;
}

.report-job-table td strong,
.report-job-table td span {
    display: block;
}

.report-job-table td strong {
    color: #2d1c1b;
    font-size: 10.5px;
    font-weight: 700;
}

.report-job-table td span {
    margin-top: 1px;
    color: #71635f;
    font-size: 9px;
}

.report-job-table .report-code {
    color: #29201e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.report-empty {
    padding: 35px;
    color: #725e5a;
    text-align: center;
    background: #fcf7f3;
    border: 1px dashed #d8c4bd;
}

.report-empty strong {
    display: block;
    margin-bottom: 5px;
    color: var(--navy);
    font-size: 16px;
}

.report-empty p {
    margin: 0;
    font-size: 11px;
}

.report-tips {
    padding: 14px 18px 13px;
    margin-top: 20px;
    background: #fffbf0;
    border: 1px solid #e6d5a7;
    border-radius: 7px;
}

.report-tips h3 {
    margin: 0 0 8px;
    color: #8c2b21;
    font-size: 14px;
    font-weight: 800;
}

.report-tips ol {
    padding-left: 18px;
    margin: 0;
    color: #66584a;
}

.report-tips li {
    padding-left: 2px;
    margin: 3px 0;
    font-size: 9.5px;
    line-height: 1.65;
}

.report-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-top: 14px;
    margin-top: 14px;
    color: #8b7c78;
    border-top: 1px solid #e2d9d4;
    font-size: 8.5px;
}

.report-footer-alert {
    flex: 0 0 auto;
    color: #a61f25;
    font-weight: 800;
}

.report-screen-foot {
    margin: 16px 0 0;
    color: #8b7a76;
    font-size: 9px;
    text-align: center;
}

/* Admin */
.admin-body {
    min-height: 100vh;
    background: #f6f2ed;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    display: flex;
    width: var(--admin-sidebar);
    flex-direction: column;
    color: var(--white);
    background:
        radial-gradient(circle at 20% 0%, rgba(197, 91, 75, 0.2), transparent 35%),
        linear-gradient(180deg, #43090d, #30070a);
    transition: transform 0.25s ease;
}

.admin-sidebar-head {
    padding: 28px 23px 25px;
    border-bottom: 1px solid var(--line-dark);
}

.admin-sidebar .brand {
    margin: 0;
}

.admin-sidebar .brand-mark {
    width: 35px;
    height: 35px;
}

.admin-sidebar .brand-text strong {
    font-size: 17px;
}

.admin-nav {
    flex: 1;
    padding: 20px 13px;
    overflow-y: auto;
}

.nav-group-label {
    padding: 13px 11px 7px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.admin-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding: 10px 12px;
    margin: 2px 0;
    color: rgba(255, 255, 255, 0.58);
    border-radius: 8px;
    font-size: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-nav-link:hover {
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.05);
}

.admin-nav-link.is-active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.09);
}

.admin-nav-link.is-active::before {
    position: absolute;
    left: -13px;
    width: 3px;
    height: 22px;
    content: "";
    background: var(--gold);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: #dfb3ac;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 5px;
    font-size: 9px;
    letter-spacing: -0.04em;
}

.admin-sidebar-foot {
    padding: 18px 20px;
    border-top: 1px solid var(--line-dark);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.28);
}

.admin-main {
    min-height: 100vh;
    margin-left: var(--admin-sidebar);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 32px;
    background: rgba(255, 252, 248, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-left h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.admin-mobile-toggle {
    display: none;
    width: 34px;
    height: 34px;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--blue);
    background: var(--blue-light);
    border-radius: 50%;
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.user-meta strong {
    font-size: 11px;
}

.user-meta span {
    color: var(--muted);
    font-size: 9px;
}

.logout-form button {
    padding: 5px 8px;
    color: var(--muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 10px;
}

.admin-content {
    padding: 30px 32px 54px;
}

.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 23px;
}

.admin-page-head h1 {
    margin-bottom: 4px;
    font-family: var(--font-serif);
    font-size: 27px;
    font-weight: 600;
}

.admin-page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.metric-card {
    padding: 21px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.metric-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
}

.metric-card strong {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
}

.metric-card small {
    margin-left: 5px;
    color: var(--muted);
    font-size: 9px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
    gap: 18px;
}

.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    margin: 0;
    font-size: 14px;
}

.panel-head a {
    color: var(--blue);
    font-size: 10px;
}

.panel-body {
    padding: 20px;
}

.panel-body.flush {
    padding: 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th {
    padding: 11px 14px;
    color: var(--muted);
    background: #fbf8f4;
    border-bottom: 1px solid var(--line);
    font-size: 9px;
    font-weight: 650;
    text-align: left;
}

.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #eee5df;
    font-size: 11px;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tr:hover td {
    background: #fcfaf8;
}

.table-title {
    display: block;
    color: var(--ink);
    font-size: 11px;
    font-weight: 650;
}

.table-sub {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 650;
}

.status-tag::before {
    width: 4px;
    height: 4px;
    content: "";
    background: currentColor;
    border-radius: 50%;
}

.status-active,
.status-enabled {
    color: var(--success);
    background: var(--success-bg);
}

.status-archived,
.status-disabled {
    color: var(--muted);
    background: #eee5df;
}

.status-warning {
    color: var(--warning);
    background: var(--warning-bg);
}

.timeline {
    display: grid;
    gap: 0;
}

.timeline-item {
    position: relative;
    padding: 0 0 17px 20px;
}

.timeline-item::before {
    position: absolute;
    top: 6px;
    left: 1px;
    width: 6px;
    height: 6px;
    content: "";
    background: var(--blue);
    border: 2px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px #d9b9b4;
}

.timeline-item:not(:last-child)::after {
    position: absolute;
    top: 14px;
    bottom: 4px;
    left: 4px;
    width: 1px;
    content: "";
    background: #e4d5cf;
}

.timeline-item p {
    margin: 0;
    font-size: 10px;
    line-height: 1.6;
}

.timeline-item small {
    color: var(--muted);
    font-size: 9px;
}

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

.bar-item {
    display: grid;
    grid-template-columns: 48px 1fr 40px;
    gap: 10px;
    align-items: center;
    font-size: 10px;
}

.bar-track {
    height: 5px;
    overflow: hidden;
    background: #eee5df;
    border-radius: 99px;
}

.bar-fill {
    height: 100%;
    background: var(--blue);
    border-radius: inherit;
}

.toolbar-card {
    padding: 17px 19px;
    margin-bottom: 15px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.filter-form .field {
    min-width: 140px;
}

.filter-form .field-grow {
    flex: 1;
    min-width: 220px;
}

.filter-form .input,
.filter-form .select {
    min-height: 37px;
    padding: 7px 10px;
    font-size: 11px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

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

.pagination-links a,
.pagination-links span {
    display: grid;
    min-width: 29px;
    height: 29px;
    padding: 0 8px;
    place-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 5px;
}

.pagination-links .current {
    color: var(--white);
    background: var(--navy);
    border-color: var(--navy);
}

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

.compact-upload {
    min-height: 215px;
    padding: 30px;
}

.compact-upload .upload-symbol {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
}

.compact-upload h2 {
    font-size: 16px;
}

.info-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee5df;
    font-size: 10px;
}

.info-list li:last-child {
    border-bottom: 0;
}

.info-list span {
    color: var(--muted);
}

.mapping-table td,
.mapping-table th {
    white-space: normal;
}

.mapping-table .select {
    min-width: 160px;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
}

.sample-table {
    max-width: 100%;
    max-height: 310px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.sample-table table {
    min-width: 800px;
}

.callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    color: var(--ink-soft);
    background: var(--warning-bg);
    border: 1px solid #ecddbb;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.7;
}

.callout.info {
    background: var(--blue-light);
    border-color: #eed0cd;
}

.callout.danger {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #f0d0ce;
}

.switch-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    margin-top: 15px;
    background: #fbf8f4;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 11px;
}

.switch-row input {
    margin-top: 4px;
    accent-color: var(--blue);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.admin-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field-help {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.6;
}

.snapshot-note {
    padding: 12px 14px;
    margin-top: 12px;
    color: var(--muted);
    background: var(--paper);
    border-radius: 7px;
    font-size: 9px;
    line-height: 1.7;
}

.json-box {
    max-height: 260px;
    padding: 12px;
    overflow: auto;
    color: #5d4643;
    background: #fbf8f4;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

details summary {
    color: var(--blue);
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
}

.log-detail {
    max-width: 420px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.front-log-image-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 8px 7px 0;
    color: var(--navy);
    font-size: 9px;
    font-weight: 650;
    vertical-align: middle;
}

.front-log-thumb {
    width: 74px;
    height: 50px;
    object-fit: cover;
    object-position: top;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.alias-state {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.inline-form {
    display: inline;
}

/* Authentication / setup */
.guest-body,
.setup-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(201, 87, 69, 0.24), transparent 30%),
        linear-gradient(135deg, #34070a, #5b0b10);
}

.guest-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1.1fr 0.9fr;
}

.guest-visual {
    position: relative;
    display: flex;
    padding: 64px;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    color: var(--white);
}

.guest-visual::before {
    position: absolute;
    right: -200px;
    bottom: -320px;
    width: 700px;
    height: 700px;
    content: "";
    border: 1px solid rgba(193, 157, 91, 0.22);
    border-radius: 50%;
    box-shadow:
        0 0 0 90px rgba(255, 255, 255, 0.02),
        0 0 0 190px rgba(255, 255, 255, 0.012);
}

.guest-visual .brand {
    position: relative;
    z-index: 1;
}

.guest-quote {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.guest-quote span {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 0.18em;
}

.guest-quote h2 {
    margin: 18px 0 20px;
    font-family: var(--font-serif);
    font-size: clamp(38px, 4vw, 56px);
    font-weight: 500;
    line-height: 1.35;
}

.guest-quote p {
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
}

.guest-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px;
    background: var(--white);
}

.guest-form {
    width: min(390px, 100%);
}

.guest-form h1 {
    margin-bottom: 8px;
    font-family: var(--font-serif);
    font-size: 31px;
    font-weight: 600;
}

.guest-form > p {
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 12px;
}

.guest-form .field + .field {
    margin-top: 17px;
}

.guest-form .btn {
    min-height: 46px;
    margin-top: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 11px;
}

.setup-shell {
    width: min(980px, calc(100% - 40px));
    padding: 48px 0 70px;
    margin: 0 auto;
}

.setup-head {
    color: var(--white);
    margin-bottom: 30px;
}

.setup-head .brand {
    margin-bottom: 32px;
}

.setup-head h1 {
    margin-bottom: 8px;
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 500;
}

.setup-head p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

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

.readiness-list {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border-radius: 8px;
}

.readiness-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fbf8f4;
    font-size: 10px;
}

.readiness-item span:last-child {
    color: var(--success);
}

.readiness-item.is-failed span:last-child {
    color: var(--danger);
}

.error-shell {
    display: grid;
    min-height: calc(100vh - 74px);
    padding: 70px 20px;
    place-items: center;
    background: var(--paper);
}

.error-card {
    max-width: 560px;
    text-align: center;
}

.error-code {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 80px;
    line-height: 1;
}

.error-card h1 {
    margin: 18px 0 10px;
    font-family: var(--font-serif);
    font-size: 31px;
}

.error-card p {
    margin-bottom: 24px;
    color: var(--muted);
}

@media (max-width: 1100px) {
    .hero-grid {
        gap: 40px;
    }

    .feature-card {
        min-height: 320px;
    }

    .dashboard-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {
    .public-nav {
        position: fixed;
        top: 74px;
        right: 0;
        left: 0;
        display: none;
        padding: 18px 24px 24px;
        margin: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        background: var(--navy-deep);
        border-top: 1px solid var(--line-dark);
    }

    .public-nav.is-open {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding: 70px 0 90px;
    }

    .hero {
        min-height: auto;
    }

    .hero-panel {
        max-width: 560px;
    }

    .stats-grid,
    .result-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(2)::after {
        display: none;
    }

    .stat-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

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

    .section-heading {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .process-item:nth-child(2)::after {
        display: none;
    }

    .upload-layout,
    .account-login-layout,
    .import-upload-layout,
    .setup-grid {
        grid-template-columns: 1fr;
    }

    .job-card {
        grid-template-columns: 65px minmax(0, 1fr);
    }

    .job-side {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

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

    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 30px 0 70px rgba(43, 5, 8, 0.3);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-mobile-toggle {
        display: block;
    }

    .guest-layout {
        grid-template-columns: 1fr;
    }

    .guest-visual {
        display: none;
    }

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

@media (max-width: 680px) {
    .container {
        width: min(100% - 30px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .header-inner {
        min-height: 64px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-lead {
        font-size: 15px;
    }

    .hero-panel {
        padding: 22px;
    }

    .stats-band {
        margin-top: -30px;
    }

    .stat-item {
        padding: 18px;
    }

    .stat-item strong {
        font-size: 23px;
    }

    .section {
        padding: 72px 0;
    }

    .feature-grid,
    .process {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 260px;
    }

    .process-item {
        padding: 26px 0 0;
        border-bottom: 1px solid var(--line);
    }

    .process-item::after {
        display: none;
    }

    .footer-inner,
    .admin-page-head,
    .results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .results-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .results-header-actions .btn {
        flex: 1;
    }

    .footer-meta {
        text-align: left;
    }

    .page-hero {
        padding: 45px 0 35px;
    }

    .page-hero h1 {
        font-size: 30px;
    }

    .page-shell {
        padding: 34px 0 60px;
    }

    .progress-steps {
        gap: 7px;
    }

    .progress-step {
        font-size: 10px;
    }

    .progress-step span {
        width: 23px;
        height: 23px;
    }

    .progress-line {
        width: 13px;
    }

    .card-body,
    .card-head {
        padding: 20px;
    }

    .form-grid,
    .form-grid.cols-3,
    .admin-two-col {
        grid-template-columns: 1fr;
    }

    .upload-box {
        min-height: 290px;
        padding: 26px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .stats-grid,
    .result-summary {
        grid-template-columns: 1fr 1fr;
    }

    .summary-item {
        padding: 15px;
    }

    .result-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .result-search {
        width: 100%;
    }

    .job-card {
        grid-template-columns: 1fr;
        padding: 19px;
    }

    .score-ring {
        width: 58px;
        height: 58px;
    }

    .job-side {
        grid-column: auto;
    }

    .checks-grid,
    .job-requirements {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        padding: 0 16px;
    }

    .user-meta {
        display: none;
    }

    .admin-content {
        padding: 21px 15px 42px;
    }

    .metric-grid {
        gap: 9px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-card strong {
        font-size: 23px;
    }

    .filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-form .field,
    .filter-form .btn {
        width: 100%;
    }

    .rule-grid {
        grid-template-columns: 1fr;
    }

    .guest-form-wrap {
        padding: 26px 20px;
    }

    .setup-shell {
        width: calc(100% - 24px);
        padding-top: 28px;
    }

    .setup-head h1 {
        font-size: 29px;
    }

    .flash-stack {
        top: 72px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .report-body {
        padding: 12px 8px 28px;
    }

    .report-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .report-action-group {
        justify-content: space-between;
    }

    .report-action-group span {
        display: none;
    }

    .report-sheet {
        min-height: 0;
        padding: 15px;
    }

    .report-banner {
        padding: 22px 20px;
    }

    .report-banner h1 {
        font-size: 23px;
    }

    .report-total-number {
        font-size: 14px;
    }

    .report-total-number strong {
        font-size: 23px;
    }

    .report-job-table {
        min-width: 760px;
    }

    .report-sheet {
        overflow-x: auto;
    }

    .report-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .public-header,
    .public-footer,
    .result-toolbar,
    .results-header .btn,
    .flash-stack {
        display: none !important;
    }

    .page-hero {
        padding: 24px 0;
        color: var(--ink);
        background: none;
    }

    .page-hero p {
        color: var(--muted);
    }

    .page-shell {
        padding: 20px 0;
        background: var(--white);
    }

    .job-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .match-detail {
        display: block !important;
    }

    .report-actions,
    .report-screen-foot,
    .report-body > .skip-link {
        display: none !important;
    }

    .report-body {
        min-height: 0;
        padding: 0;
        background: #fff;
    }

    .report-sheet {
        width: auto;
        min-height: 0;
        padding: 0;
        overflow: visible;
        border: 0;
        box-shadow: none;
    }

    .report-banner {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .report-job-table {
        min-width: 0;
    }

    .report-job-table thead {
        display: table-header-group;
    }

    .report-job-table tr,
    .report-condition-card,
    .report-total-card,
    .report-tips {
        break-inside: avoid;
    }
}

