:root {
    --kni-navy: #002d62;
    --kni-navy-deep: #001f45;
    --kni-blue: #0093d0;
    --kni-cyan: #40c8f4;
    --kni-slate: #3a5786;
    --kni-ice: #eef8fc;
    --kni-cloud: #f5f8fc;
    --ink: #142c47;
    --muted: #65778c;
    --line: #dbe5ef;
    --surface: #ffffff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--kni-cloud);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--kni-cloud); }
a { color: #0078ad; text-decoration: none; }
a:hover { color: var(--kni-navy); text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .btn {
    display: inline-block;
    padding: .68rem 1rem;
    border: 0;
    border-radius: 9px;
    background: var(--kni-navy);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
button:hover, .btn:hover {
    background: #004b91;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px #002d6226;
}
.btn.secondary, button.secondary { background: #e6f3fa; color: var(--kni-navy); }
.btn.secondary:hover, button.secondary:hover { background: #d3ebf7; }
.btn.danger, button.danger { background: #a73535; }
.btn.small, button.small { padding: .4rem .7rem; font-size: .85rem; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    width: 240px;
    height: 100vh;
    overflow: auto;
    padding: 1.25rem 1rem;
    background: linear-gradient(180deg, var(--kni-navy) 0%, var(--kni-navy-deep) 100%);
    color: #edf7ff;
    box-shadow: 8px 0 30px #002d6212;
}
.brand { padding: .25rem .6rem 1.55rem; }
.brand-logo-frame {
    display: flex;
    align-items: center;
    min-height: 62px;
    padding: .65rem .75rem;
    border: 1px solid #ffffffb8;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 8px 25px #00152e38;
}
.brand-logo-frame img { display: block; width: 100%; height: auto; }
.brand > span {
    display: block;
    margin-top: .65rem;
    color: #a9dff4;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-align: center;
    text-transform: uppercase;
}
.sidebar nav { display: grid; gap: .18rem; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: .72rem;
    padding: .72rem .8rem;
    border-left: 3px solid transparent;
    border-radius: 7px;
    color: #dbeefa;
    font-size: .9rem;
    font-weight: 600;
}
.nav-icon {
    width: 1.22rem;
    height: 1.22rem;
    flex: 0 0 1.22rem;
    color: #78d4f4;
    transition: color .18s ease, transform .18s ease;
}
.sidebar a:hover .nav-icon, .sidebar a.active .nav-icon { color: #fff; transform: translateX(1px); }
.sidebar a:hover, .sidebar a.active {
    border-left-color: var(--kni-cyan);
    background: #ffffff16;
    color: #fff;
    text-decoration: none;
}
.sidebar .group {
    margin: 1.35rem .8rem .4rem;
    color: #72c9ed;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.sidebar .who {
    display: grid;
    gap: .18rem;
    margin: 1.6rem .7rem .7rem;
    padding-top: 1rem;
    border-top: 1px solid #ffffff24;
}
.sidebar .who strong { color: #fff; font-size: .86rem; }
.sidebar .who span { color: #9fc7db; font-size: .74rem; line-height: 1.35; }
.sidebar form button {
    display: flex;
    align-items: center;
    gap: .72rem;
    width: 100%;
    border: 1px solid #75a2bd66;
    background: transparent;
    text-align: left;
}
.sidebar form button:hover { background: #ffffff16; box-shadow: none; }

.main { flex: 1; min-width: 0; max-width: 1500px; margin: auto; padding: 1.8rem 2.25rem 4.5rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.45rem; }
.top h1 { margin: 0; color: var(--kni-navy); font-size: 1.85rem; letter-spacing: -.035em; }
.top p { margin: .25rem 0; color: var(--muted); }
.card {
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 4px 18px #002d6209;
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.stat { position: relative; overflow: hidden; }
.stat::after { position: absolute; right: 0; bottom: 0; width: 54px; height: 4px; background: var(--kni-cyan); content: ""; }
.stat strong { display: block; color: var(--kni-navy); font-size: 1.75rem; }
.stat span { color: var(--muted); font-size: .82rem; }
.muted { color: var(--muted); }
.small { font-size: .83rem; }
.badge {
    display: inline-block;
    padding: .28rem .58rem;
    border-radius: 30px;
    background: #e8f2f8;
    color: var(--kni-slate);
    font-size: .73rem;
    font-weight: 800;
    white-space: nowrap;
}
.badge.good { background: #dff5ed; color: #17654b; }
.badge.warn { background: #fff0d7; color: #8b550c; }
.badge.bad { background: #fce4e3; color: #8c292a; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .58rem; border-bottom: 1px solid #e5ecf3; text-align: left; vertical-align: top; }
th { color: var(--kni-slate); font-size: .75rem; letter-spacing: .045em; text-transform: uppercase; }
td { font-size: .9rem; }
tbody tr:hover { background: #f7fbfe; }
.table-wrap { overflow: auto; }
label { display: block; margin-bottom: .38rem; color: #3e5770; font-size: .83rem; font-weight: 750; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%;
    padding: .67rem .72rem;
    border: 1px solid #cbd9e6;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
    border-color: var(--kni-blue);
    box-shadow: 0 0 0 3px #0093d01c;
}
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 1rem; }
.field small { display: block; margin-top: .25rem; color: #718399; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.alert { margin-bottom: 1rem; padding: .78rem 1rem; border-left: 4px solid #2ca67a; border-radius: 8px; background: #e7f7f1; color: #176448; }
.alert.error { border-left-color: #c34747; background: #ffe9e7; color: #922e2e; }
.tabs { display: flex; flex-wrap: wrap; gap: .42rem; margin-bottom: 1rem; }
.tabs a { padding: .57rem .78rem; border: 1px solid #d7e6ef; border-radius: 8px; background: #edf6fb; color: var(--kni-navy); font-size: .84rem; font-weight: 700; }
.tabs a:hover { border-color: #a8d7eb; background: #dff1fa; text-decoration: none; }
.contract-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .45rem; margin-bottom: 1.2rem; padding: .45rem; border: 1px solid #d9e6ef; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(0, 45, 98, .06); }
.contract-tabs a { display: flex; align-items: center; justify-content: center; gap: .45rem; min-width: 0; padding: .72rem .65rem; border-radius: 10px; color: #405b73; font-size: .78rem; font-weight: 800; line-height: 1.2; text-align: center; }
.contract-tabs a:hover { background: #edf7fb; color: var(--kni-navy); text-decoration: none; }
.contract-tabs a.active { background: linear-gradient(135deg, var(--kni-navy), #075c9e); color: #fff; box-shadow: 0 7px 16px rgba(0, 58, 112, .2); }
.contract-tabs .nav-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.section-title { margin: 0 0 1rem; color: var(--kni-navy); font-size: 1.1rem; }
.divider { margin: 1.3rem 0; border: 0; border-top: 1px solid #e2eaf1; }
.print-only { display: none; }

/* Simplified workflow */
.workflow-status {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: .42rem .72rem;
    border-radius: 999px;
    background: var(--kni-ice);
    color: var(--kni-blue);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .055em;
}
.workflow-stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: .8rem;
    padding: 1.15rem 1rem .95rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.workflow-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: .45rem;
    color: var(--muted);
    font-size: .72rem;
    text-align: center;
}
.workflow-step::after {
    position: absolute;
    top: .9rem;
    left: calc(50% + 1.2rem);
    width: calc(100% - 2.4rem);
    height: 2px;
    background: var(--line);
    content: "";
}
.workflow-step:last-child::after { display: none; }
.workflow-step.done::after { background: var(--kni-blue); }
.workflow-step-dot {
    position: relative;
    z-index: 1;
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--kni-cloud);
    font-size: .72rem;
    font-weight: 850;
}
.workflow-step.done .workflow-step-dot { border-color: var(--kni-blue); background: var(--kni-blue); color: #fff; }
.workflow-step.current { color: var(--ink); font-weight: 750; }
.workflow-step.current .workflow-step-dot { border-color: var(--kni-blue); background: #fff; color: var(--kni-blue); box-shadow: 0 0 0 4px #0093d019; }
.contract-quick-links { display: flex; gap: .35rem; margin-bottom: 1rem; overflow-x: auto; scrollbar-width: thin; }
.contract-quick-links a { flex: 0 0 auto; padding: .45rem .68rem; border-radius: 7px; color: var(--kni-slate); font-size: .76rem; font-weight: 700; }
.contract-quick-links a:hover { background: var(--kni-ice); color: var(--kni-navy); text-decoration: none; }
.next-task-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.05rem 1.15rem;
    border-radius: 14px;
    background: linear-gradient(110deg, var(--kni-navy), #076296);
    color: #fff;
}
.next-task-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 10px; background: #ffffff18; }
.next-task-icon .nav-icon { color: #fff; }
.next-task-card small { color: #9ee3fa; font-size: .66rem; font-weight: 850; letter-spacing: .11em; }
.next-task-card h2 { margin: .2rem 0; font-size: 1rem; }
.next-task-card p { margin: 0; color: #d2eaf5; font-size: .82rem; }
.next-task-action { background: #fff; color: var(--kni-navy); white-space: nowrap; }
.next-task-action:hover { background: #e8f7fc; color: var(--kni-navy); }
.overview-metrics, .dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.dashboard-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.overview-metric { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 12px #002d6208; }
.overview-metric > div { display: flex; align-items: center; justify-content: space-between; gap: .6rem; color: var(--muted); font-size: .74rem; }
.overview-metric .nav-icon { color: var(--kni-blue); }
.overview-metric strong { display: block; margin-top: .45rem; color: var(--kni-navy); font-size: 1.45rem; }
.overview-metric small { display: block; margin-top: .2rem; color: var(--muted); font-size: .69rem; }
.overview-work-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr); gap: .85rem; margin-bottom: 1rem; }
.overview-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 12px #002d6208; }
.overview-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.05rem; border-bottom: 1px solid var(--line); }
.overview-panel > header h2 { margin: 0; color: var(--kni-navy); font-size: .95rem; }
.overview-panel > header a, .overview-panel > header span { color: var(--muted); font-size: .72rem; }
.readiness-table th { background: var(--kni-ice); }
.person-cell { display: flex; align-items: center; gap: .65rem; min-width: 170px; }
.person-cell:hover { text-decoration: none; }
.person-avatar { display: grid; flex: 0 0 2rem; width: 2rem; height: 2rem; place-items: center; border-radius: 9px; background: var(--kni-ice); color: var(--kni-navy); font-size: .65rem; font-weight: 850; }
.person-cell strong, .person-cell small { display: block; }
.person-cell strong { color: var(--ink); font-size: .82rem; }
.person-cell small { margin-top: .1rem; color: var(--muted); font-size: .68rem; }
.readiness-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.readiness-status::before { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; content: ""; }
.readiness-status.ready { color: #16805b; }
.readiness-status.pending { color: #b66b0b; }
.review-queue-item { display: grid; grid-template-columns: 2.15rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .85rem .95rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.review-queue-item:last-child { border-bottom: 0; }
.review-queue-item:hover { background: #f7fbfe; text-decoration: none; }
.review-queue-icon { display: grid; width: 2.15rem; height: 2.15rem; place-items: center; border-radius: 9px; background: var(--kni-ice); }
.review-queue-icon .nav-icon { color: var(--kni-blue); }
.review-queue-item strong, .review-queue-item small { display: block; }
.review-queue-item strong { font-size: .79rem; }
.review-queue-item small { margin-top: .15rem; color: var(--muted); font-size: .67rem; }
.review-queue-item b { color: #b66b0b; font-size: .78rem; }
.review-queue-item b.complete { color: #16805b; }
.contract-summary-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1.2rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.contract-summary-strip div strong, .contract-summary-strip div span { display: block; }
.contract-summary-strip div strong { color: var(--kni-slate); font-size: .68rem; text-transform: uppercase; }
.contract-summary-strip div span { margin-top: .18rem; font-size: .78rem; }
.contract-summary-strip a { font-size: .78rem; font-weight: 750; white-space: nowrap; }
.task-list { display: grid; gap: .75rem; }
.task-list-item { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 3px 12px #002d6208; }
.task-list-status span { display: inline-flex; padding: .38rem .58rem; border-radius: 999px; background: var(--kni-ice); color: var(--kni-blue); font-size: .66rem; font-weight: 850; }
.task-list-main h2 { margin: .15rem 0; color: var(--kni-navy); font-size: 1rem; }
.task-list-main p { margin: 0; color: var(--muted); font-size: .8rem; }
.task-list-main .task-list-contract { color: var(--kni-blue); font-size: .7rem; font-weight: 750; }
.task-list-main small { display: block; margin-top: .45rem; color: var(--muted); font-size: .67rem; }
.empty-state { display: grid; justify-items: center; gap: .5rem; padding: 3rem; text-align: center; }
.empty-state .nav-icon { width: 2rem; height: 2rem; color: var(--kni-blue); }
.empty-state h2, .empty-state p { margin: 0; }
.admin-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.admin-menu-card { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: center; gap: .9rem; min-height: 105px; padding: 1.1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); box-shadow: 0 3px 12px #002d6208; }
.admin-menu-card:hover { border-color: #aad7e9; background: #f9fdff; text-decoration: none; transform: translateY(-1px); }
.admin-menu-icon { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: 10px; background: var(--kni-ice); }
.admin-menu-icon .nav-icon { color: var(--kni-blue); }
.admin-menu-card strong, .admin-menu-card small { display: block; }
.admin-menu-card strong { color: var(--kni-navy); }
.admin-menu-card small { margin-top: .3rem; color: var(--muted); line-height: 1.4; }
.admin-menu-arrow { color: var(--kni-blue); font-size: 1.2rem; }
.dashboard-recent > header > div span { display: block; margin-top: .2rem; }

/* Login */
.auth-page { width: 100%; height: 100vh; height: 100dvh; padding: clamp(.75rem, 2.2vh, 1.5rem); overflow: hidden; background: #eaf2f8; }
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
    width: min(1180px, 100%);
    height: 100%;
    margin: auto;
    overflow: hidden;
    border: 1px solid #ccdae7;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px #002d6221;
}
.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4rem);
    background: linear-gradient(145deg, #001e43 0%, var(--kni-navy) 58%, #00558f 100%);
    color: #fff;
}
.auth-hero::before {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(to bottom right, #000, transparent 78%);
}
.auth-hero-decoration { position: absolute; border-radius: 50%; opacity: .45; filter: blur(1px); }
.auth-hero-decoration-one { top: -110px; right: -90px; width: 340px; height: 340px; border: 52px solid var(--kni-blue); }
.auth-hero-decoration-two { right: 80px; bottom: -155px; width: 310px; height: 310px; border: 42px solid var(--kni-cyan); opacity: .17; }
.auth-product-mark { position: relative; z-index: 1; display: flex; align-items: center; gap: .5rem; width: fit-content; padding: .42rem .7rem; border: 1px solid #ffffff3d; border-radius: 8px; background: #ffffff12; font-size: .8rem; letter-spacing: .08em; }
.auth-product-mark span { color: var(--kni-cyan); font-weight: 900; }
.auth-product-mark strong { font-weight: 800; }
.auth-hero-copy { position: relative; z-index: 1; max-width: 610px; margin: auto 0; padding: clamp(1.5rem, 5vh, 3rem) 0; }
.auth-eyebrow { color: var(--kni-cyan); font-size: .7rem; font-weight: 850; letter-spacing: .16em; }
.auth-eyebrow.blue { color: var(--kni-blue); }
.auth-hero-copy h1 { max-width: 590px; margin: .9rem 0 1rem; font-size: clamp(2.1rem, 4.2vw, 3.65rem); line-height: 1.06; letter-spacing: -.045em; }
.auth-hero-copy p { max-width: 570px; margin: 0; color: #c7deec; font-size: 1.02rem; line-height: 1.7; }
.auth-capabilities { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.auth-capabilities > div { padding-top: .9rem; border-top: 1px solid #ffffff30; }
.auth-capabilities span { color: var(--kni-cyan); font-size: .68rem; font-weight: 850; }
.auth-capabilities p { margin: .4rem 0 0; color: #b9d1df; font-size: .75rem; line-height: 1.45; }
.auth-capabilities strong { display: block; color: #fff; font-size: .82rem; }
.auth-copyright { position: relative; z-index: 1; margin: 1.5rem 0 0; color: #82a8bd; font-size: .72rem; }
.auth-form-panel { display: grid; min-height: 0; place-items: center; padding: clamp(1.5rem, 4vw, 3.5rem); background: #fff; }
.auth-form-wrap { width: min(410px, 100%); }
.auth-company-logo { display: block; width: 210px; max-width: 70%; height: auto; margin-bottom: clamp(1.5rem, 4vh, 3rem); }
.auth-heading h2 { margin: .55rem 0 .4rem; color: var(--kni-navy); font-size: 2rem; letter-spacing: -.035em; }
.auth-heading p { margin: 0 0 1.8rem; color: var(--muted); line-height: 1.55; }
.auth-form .field { margin-bottom: 1.15rem; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > span { position: absolute; top: 50%; left: .85rem; color: var(--kni-blue); font-size: .76rem; font-weight: 900; transform: translateY(-50%); }
.auth-input-wrap input { min-height: 48px; padding-left: 2.35rem !important; background: #fbfdff !important; }
.auth-password-wrap input { padding-right: 3.2rem !important; }
.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: .55rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--kni-blue);
    transform: translateY(-50%);
}
.auth-password-toggle:hover { background: #e8f5fb; color: var(--kni-navy); box-shadow: none; }
.auth-password-toggle svg { width: 1.18rem; height: 1.18rem; }
.auth-password-toggle svg[hidden] { display: none; }
.auth-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 49px; margin-top: .35rem; padding: .75rem 1rem; background: linear-gradient(90deg, var(--kni-navy), #005a9c); }
.auth-submit span { font-size: 1.2rem; }
.auth-submit:hover { background: linear-gradient(90deg, #003c79, #0073b7); }
.auth-security-note { display: grid; grid-template-columns: 1.5rem 1fr; gap: .7rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e2eaf1; }
.auth-security-note > span { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #e4f6fb; color: #007caa; font-size: .72rem; font-weight: 900; }
.auth-security-note p { margin: .05rem 0 0; color: #748598; font-size: .75rem; line-height: 1.45; }
.auth-error { margin-bottom: 1.25rem; }

/* Guidance */
.guidance-trigger { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 40; display: flex; align-items: center; gap: .55rem; padding: .7rem 1rem; border: 1px solid #abdff1; border-radius: 999px; background: #fff; color: var(--kni-navy); box-shadow: 0 10px 30px #002d6230; }
.guidance-trigger:hover { background: var(--kni-ice); color: var(--kni-navy); }
.guidance-trigger-icon { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--kni-blue); color: #fff; font-weight: 800; }
.guidance-dialog { width: min(680px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 0; overflow: hidden; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 22px 70px #001b3b66; }
.guidance-dialog::backdrop { background: #001c3db8; backdrop-filter: blur(3px); }
.guidance-panel { display: flex; max-height: calc(100vh - 2rem); flex-direction: column; background: #fff; }
.guidance-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem; background: linear-gradient(100deg, var(--kni-navy-deep), var(--kni-navy)); color: #fff; }
.guidance-header h2 { margin: .18rem 0 0; font-size: 1.45rem; }
.guidance-eyebrow { color: var(--kni-cyan); font-size: .68rem; font-weight: 800; letter-spacing: .15em; }
.guidance-close { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid #ffffff4d; border-radius: 50%; background: transparent; font-size: 1.45rem; line-height: 1; }
.guidance-close:hover { background: #ffffff1f; box-shadow: none; }
.guidance-body { overflow: auto; padding: 1.35rem 1.5rem; }
.guidance-purpose { margin: 0 0 1.15rem; color: #435c75; font-size: 1rem; line-height: 1.55; }
.guidance-body h3 { margin: 1.25rem 0 .75rem; color: var(--kni-navy); font-size: 1rem; }
.guidance-context, .guidance-condition, .guidance-note { display: flex; gap: .75rem; padding: .9rem 1rem; border-radius: 10px; }
.guidance-context { border: 1px solid #c9e8f3; background: #eaf7fc; }
.guidance-context-icon { display: grid; place-items: center; flex: 0 0 auto; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--kni-blue); color: #fff; font-weight: 800; }
.guidance-context p, .guidance-condition p, .guidance-note p { margin: .2rem 0 0; line-height: 1.45; }
.guidance-condition { display: block; margin-top: .75rem; border: 1px solid #d5dfeb; background: #f0f4f9; }
.guidance-note { display: block; margin-top: 1rem; border: 1px solid #f4d99e; background: #fff6e6; color: #6f4a0d; }
.guidance-steps { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.guidance-steps li { display: grid; grid-template-columns: 1.75rem 1fr; align-items: start; gap: .7rem; }
.guidance-steps span { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #dff3fb; color: var(--kni-navy); font-size: .78rem; font-weight: 800; }
.guidance-steps p { margin: .18rem 0 0; line-height: 1.45; }
.guidance-footer { display: flex; justify-content: flex-end; padding: 1rem 1.5rem; border-top: 1px solid #e1e9f0; background: #f8fbfd; }

/* Master data editors and bilingual General Checklist */
.inline-editor { position: relative; }
.inline-editor summary { list-style: none; cursor: pointer; }
.inline-editor summary::-webkit-details-marker { display: none; }
.inline-editor[open]::before { content: ''; position: fixed; inset: 0; z-index: 80; background: rgba(0, 31, 68, .42); }
.inline-editor-panel { position: fixed; z-index: 81; top: 50%; left: 50%; width: min(620px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; transform: translate(-50%, -50%); padding: 1.25rem; border: 1px solid #d5e2ed; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(0, 35, 72, .24); }
.setup-combined-form { display: grid; grid-template-columns: .85fr .85fr 1.3fr; gap: 1rem; }
.setup-form-section { min-width: 0; padding: 1rem; border: 1px solid #dce7ef; border-radius: 14px; background: #f9fcfe; }
.setup-form-section h3 { margin: 0 0 1rem; color: var(--kni-navy); font-size: 1rem; }
.setup-form-section .field:last-child { margin-bottom: 0; }
.setup-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dce7ef; }
.setup-combined-table td { vertical-align: top; }
.setup-combined-table td > strong, .setup-combined-table td > small { display: block; }
.setup-combined-table td > small { margin-top: .3rem; color: #607487; line-height: 1.4; }

@media (min-width: 761px) and (max-width: 1100px) {
    .setup-combined-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .setup-form-section:last-child { grid-column: 1 / -1; }
}
.checklist-table-card { padding: 1.1rem; }
.general-checklist-table { min-width: 1240px; }
.general-checklist-table th { vertical-align: bottom; }
.general-checklist-table td { vertical-align: top; }
.general-checklist-table td:first-child { width: 48px; color: var(--kni-navy); font-size: 1.05rem; }
.general-checklist-table td:nth-child(2) { min-width: 300px; }
.general-checklist-table td:nth-child(3) { min-width: 130px; }
.general-checklist-table td:nth-child(4) { min-width: 250px; }
.general-checklist-table td:nth-child(5) { min-width: 220px; }
.general-checklist-table textarea { min-height: 74px; }
.general-checklist-table input, .general-checklist-table select, .general-checklist-table textarea { width: 100%; }
.checklist-question { display: grid; gap: .25rem; line-height: 1.4; }
.checklist-question > span { color: #334e68; }
.checklist-question > small { margin-top: .35rem; color: var(--kni-navy); font-weight: 750; }
.checklist-question > em { color: #687d90; font-size: .82rem; }
.checklist-document-field { display: grid; gap: .35rem; margin-bottom: .55rem; padding: .6rem; border-radius: 10px; background: #eef8fc; }
.document-link { display: block; margin-top: .3rem; font-size: .78rem; overflow-wrap: anywhere; }
.general-checklist-table form button { margin-top: .55rem; }
.general-checklist-table tr { scroll-margin-top: 1rem; }

.document-preview-dialog { width: min(1100px, calc(100vw - 2rem)); max-width: none; height: min(820px, calc(100vh - 2rem)); padding: 0; border: 0; border-radius: 18px; background: transparent; box-shadow: 0 28px 80px rgba(0, 30, 65, .3); }
.document-preview-dialog::backdrop { background: rgba(0, 28, 61, .62); backdrop-filter: blur(3px); }
.document-preview-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; overflow: hidden; border-radius: 18px; background: #fff; }
.document-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #dfe8f0; }
.document-preview-header h2 { margin: .2rem 0 0; color: var(--kni-navy); font-size: 1.05rem; overflow-wrap: anywhere; }
.document-preview-close { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; padding: 0; border-radius: 50%; background: #edf4f8; color: var(--kni-navy); font-size: 1.45rem; }
.document-preview-body { min-height: 0; background: #e9f0f5; }
.document-preview-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.document-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; border-top: 1px solid #dfe8f0; }
.general-checklist-multi { width: 100%; min-width: 0; }
.general-checklist-multi td:nth-child(2) { width: auto; min-width: 0; }
.checklist-point-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding-bottom: .65rem; border-bottom: 1px solid #dce7ef; color: var(--kni-navy); }
.checklist-point-heading span { color: #687d90; font-size: .78rem; font-weight: 700; }
.checklist-subquestions { display: grid; gap: .75rem; }
.checklist-subquestion { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 1rem; padding: .85rem; border: 1px solid #e0e9f0; border-radius: 12px; background: #fbfdfe; }
.checklist-subquestion[hidden] { display: none; }
.checklist-subquestion-prompt { min-width: 0; }
.checklist-subquestion-prompt > strong { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 .4rem; border-radius: 999px; background: #dff3fb; color: var(--kni-navy); font-size: .72rem; }
.checklist-subquestion-prompt p { margin: .55rem 0 .35rem; color: #263f56; line-height: 1.48; }
.checklist-subquestion-prompt em { display: block; color: #687d90; font-size: .82rem; line-height: 1.45; }
.checklist-subquestion-response { display: grid; align-content: start; gap: .55rem; min-width: 0; }
.checklist-subquestion-response .field { margin: 0; }
.checklist-subquestion-response textarea { min-height: 68px; }
.question-approval-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-top: .3rem; padding-top: .65rem; border-top: 1px solid #dfe8ef; }
.question-approval-column { display: grid; align-content: start; justify-items: start; gap: .25rem; min-width: 0; padding: .55rem; border: 1px solid #dfe8ef; border-radius: 9px; background: #fff; font-size: .72rem; line-height: 1.3; }
.question-approval-heading { color: #263f56; overflow-wrap: anywhere; }
.question-approval-state { display: flex; align-items: center; gap: .3rem; color: #607487; }
.question-approval-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; font-size: .68rem; font-weight: 900; }
.question-approval-column.is-approved { border-color: #b9dfcf; background: #f5fbf8; }
.question-approval-column.is-approved .question-approval-icon { color: #fff; background: #16845b; }
.question-approval-column.is-pending .question-approval-icon { color: #855c00; background: #fff0bd; }
.question-approval-person { color: #263f56; font-weight: 750; overflow-wrap: anywhere; }
.question-approval-column time { color: #607487; }
.question-approval-button { margin: 0; padding: .3rem .55rem; font-size: .7rem; }
.shes-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: linear-gradient(135deg, #f4fbfe, #fff); }
.shes-summary h2 { margin: .3rem 0; color: var(--kni-navy); font-size: 1.25rem; }
.shes-summary p { margin: 0; color: #607487; }
.shes-checklist-card { overflow: hidden; }
.shes-checklist-table { width: 100%; table-layout: fixed; }
.shes-checklist-table th:nth-child(1) { width: 48px; }
.shes-checklist-table th:nth-child(2) { width: 19%; }
.shes-checklist-table th:nth-child(3) { width: 29%; }
.shes-checklist-table th:nth-child(4) { width: 20%; }
.shes-checklist-table th:nth-child(5), .shes-checklist-table th:nth-child(6) { width: 14%; }
.shes-checklist-table td { vertical-align: top; overflow-wrap: anywhere; }
.shes-checklist-table td p { margin: 0; color: #4f6579; font-size: .82rem; line-height: 1.5; }
.shes-answer-form { display: grid; gap: .45rem; }
.shes-answer-form textarea { min-height: 64px; }
.shes-answer-form button { margin: 0; }
.shes-signoff { display: grid; justify-items: start; gap: .25rem; font-size: .72rem; }
.shes-signoff > span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: #fff0bd; color: #855c00; font-weight: 900; }
.shes-signoff.approved > span { background: #16845b; color: #fff; }
.shes-signoff small, .shes-signoff time { color: #607487; overflow-wrap: anywhere; }
.shes-signoff form, .shes-signoff button { width: 100%; margin: 0; }
.legacy-documents { margin-top: .8rem; padding: .7rem; border-radius: 10px; background: #f1f5f8; }
.mandatory-reader-card { padding: 1rem; }
.mandatory-reader-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.mandatory-reader-header p { margin: 0; color: #607487; }
.mandatory-page-frame { width: 100%; height: calc(100dvh - 245px); min-height: 700px; overflow: hidden; border: 1px solid #cadce8; border-radius: 12px; background: #e8eef3; }
.mandatory-page-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.dashboard-attention { margin-bottom: 1.25rem; }
.dashboard-attention > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.attention-total { padding: .35rem .65rem; border-radius: 999px; background: #e7f6fc; color: var(--kni-navy); font-size: .76rem; font-weight: 850; }
.dashboard-action-list { display: grid; max-height: 470px; overflow-y: auto; border-top: 1px solid #e1eaf1; }
.dashboard-action-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid #e7eef3; color: inherit; text-decoration: none; }
.dashboard-action-item:hover { background: #f7fbfd; }
.dashboard-action-item > span:nth-child(2) { display: grid; gap: .2rem; min-width: 0; }
.dashboard-action-item strong { color: var(--kni-navy); }
.dashboard-action-item small { color: #607487; font-weight: 700; }
.dashboard-action-item em { overflow: hidden; color: #4e6579; font-size: .8rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-action-item > b { color: #087dae; font-size: .8rem; white-space: nowrap; }
.action-state { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff0d2; color: #915c00; font-weight: 900; }
.action-state.is-review { background: #e3f4fb; color: #087dae; font-size: .7rem; }
.dashboard-empty-state { display: grid; gap: .3rem; justify-items: center; padding: 2rem; color: #607487; text-align: center; }
.dashboard-empty-state strong { color: #16845b; }
.dashboard-charts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.chart-card { min-width: 0; padding: 1rem; border: 1px solid #dce7ef; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0, 45, 98, .05); }
.chart-card > header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-bottom: 1rem; }
.chart-card h2 { margin: 0; color: var(--kni-navy); font-size: .95rem; }
.chart-card header small { display: block; margin-top: .2rem; color: #607487; font-size: .7rem; }
.chart-curve-card { grid-column: 1 / -1; }
.activity-curve { min-width: 0; }
.activity-curve svg { display: block; width: 100%; height: 180px; overflow: visible; }
.curve-axis { stroke: #cbd9e3; stroke-width: 1.5; }
.curve-grid { stroke: #e4edf3; stroke-dasharray: 5 7; stroke-width: 1; }
.curve-area { fill: rgba(22, 169, 218, .12); }
.curve-line { fill: none; stroke: #087dae; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.curve-point { fill: #fff; stroke: #087dae; stroke-width: 3; transition: .15s ease; }
.curve-point:hover { fill: #16a9da; r: 7px; }
.curve-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; margin-top: -.25rem; }
.curve-labels span { display: grid; justify-items: center; color: #6a7e90; font-size: .65rem; }
.curve-labels b { color: var(--kni-navy); font-size: .75rem; }
.chart-data-tooltip { position: relative; cursor: help; }
.chart-data-tooltip::after { position: absolute; z-index: 30; left: 50%; bottom: calc(100% + .7rem); width: max-content; max-width: 240px; padding: .55rem .7rem; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; background: #073769; color: #fff; box-shadow: 0 10px 28px rgba(0, 29, 61, .24); content: attr(data-tooltip); font-size: .7rem; font-weight: 600; line-height: 1.4; opacity: 0; pointer-events: none; text-align: left; transform: translate(-50%, 5px); transition: opacity .15s ease, transform .15s ease; white-space: normal; }
.chart-data-tooltip::before { position: absolute; z-index: 31; left: 50%; bottom: calc(100% + .35rem); border: 6px solid transparent; border-top-color: #073769; content: ''; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .15s ease; }
.chart-data-tooltip:hover::after, .chart-data-tooltip:hover::before { opacity: 1; }
.chart-data-tooltip:hover::after { transform: translate(-50%, 0); }
.curve-labels .chart-data-tooltip:first-child::after { left: 0; transform: translate(0, 5px); }
.curve-labels .chart-data-tooltip:first-child:hover::after { transform: translate(0, 0); }
.curve-labels .chart-data-tooltip:first-child::before { left: .7rem; }
.curve-labels .chart-data-tooltip:last-child::after { right: 0; left: auto; transform: translate(0, 5px); }
.curve-labels .chart-data-tooltip:last-child:hover::after { transform: translate(0, 0); }
.curve-labels .chart-data-tooltip:last-child::before { right: .7rem; left: auto; }
.chart-bars { display: grid; gap: .55rem; }
.chart-bar-row { display: grid; grid-template-columns: minmax(90px, .9fr) 1.3fr 24px; align-items: center; gap: .55rem; font-size: .7rem; }
.chart-bar-row > span { overflow: hidden; color: #526a7e; text-overflow: ellipsis; white-space: nowrap; }
.chart-bar-row > div { height: 8px; overflow: hidden; border-radius: 999px; background: #e7eef3; }
.chart-bar-row i { display: block; height: 100%; min-width: 5px; border-radius: inherit; background: linear-gradient(90deg, #06629e, #1bb4e6); }
.chart-bar-row strong { color: var(--kni-navy); text-align: right; }
.chart-score-card { display: grid; grid-template-rows: auto 1fr; }
.chart-score { display: grid; align-content: center; justify-items: center; width: 130px; height: 130px; margin: auto; border-radius: 50%; background: radial-gradient(circle at center, #fff 55%, transparent 57%), conic-gradient(#12a9dc calc(var(--score) * 1%), #e5edf3 0); }
.chart-score strong { color: var(--kni-navy); font-size: 1.7rem; }
.chart-score span { color: #607487; font-size: .68rem; }
.chart-split { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.chart-split > div, .approval-counts > div { display: grid; gap: .25rem; padding: .85rem; border-radius: 10px; background: #f2f7fa; }
.chart-split strong, .approval-counts strong { color: var(--kni-navy); font-size: 1.45rem; }
.chart-split span, .approval-counts span { color: #607487; font-size: .7rem; }
.chart-split .is-ready { background: #edf9f4; }
.chart-split .is-pending { background: #fff7e8; }
.approval-counts { display: grid; gap: .65rem; }

@media (max-width: 1500px) {
    .shes-checklist-table, .shes-checklist-table tbody { display: grid; width: 100%; min-width: 0; gap: .8rem; }
    .shes-checklist-table thead { display: none; }
    .shes-checklist-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dce6ef; border-radius: 12px; background: #fff; }
    .shes-checklist-table td { display: block; width: auto !important; min-width: 0; padding: .75rem; border: 0; border-bottom: 1px solid #e5edf3; }
    .shes-checklist-table td::before { content: attr(data-label); display: block; margin-bottom: .4rem; color: #6a7f91; font-size: .66rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
    .shes-checklist-table td:first-child, .shes-checklist-table td:nth-child(4) { grid-column: 1 / -1; }
    .shes-checklist-table td:first-child { padding: .5rem .75rem; background: #eef8fc; }
}
.checklist-point-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; padding-top: .85rem; border-top: 1px solid #dfe8ef; }
.checklist-point-status { display: flex; align-items: center; gap: .55rem; }
.checklist-point-status > span { color: #607487; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.checklist-point-footer > button { min-width: 220px; margin: 0; }

@media (max-width: 1600px) {
    .checklist-table-card { overflow: visible; background: transparent; border: 0; box-shadow: none; padding: 0; }
    .checklist-table-card .section-heading { padding: 1rem; border: 1px solid #dfe8f0; border-radius: 14px; background: #fff; }
    .general-checklist-table, .general-checklist-table tbody { display: grid; width: 100%; min-width: 0; gap: 1rem; }
    .general-checklist-table thead { display: none; }
    .general-checklist-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); overflow: hidden; border: 1px solid #dce6ef; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0, 45, 98, .06); }
    .general-checklist-table td { display: block; width: auto !important; min-width: 0 !important; padding: .85rem 1rem; border: 0; border-bottom: 1px solid #e5edf3; }
    .general-checklist-table td::before { content: attr(data-label); display: block; margin-bottom: .45rem; color: #6a7f91; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
    .general-checklist-table td:first-child { grid-column: 1 / -1; padding: .65rem 1rem; border-bottom-color: #cde2ee; background: #eef8fc; }
    .general-checklist-table td:first-child::before { display: inline; margin-right: .4rem; }
    .general-checklist-table .checklist-question { grid-row: span 2; }
    .general-checklist-table td:last-child { border-bottom: 0; }
    .general-checklist-table input, .general-checklist-table select, .general-checklist-table textarea { max-width: 100%; }
    .general-checklist-multi { min-width: 0; }
    .general-checklist-multi td:nth-child(2) { grid-column: 1 / -1; width: auto; min-width: 0; }
}

@media (max-width: 760px) {
    .contract-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contract-tabs a { justify-content: flex-start; text-align: left; }
    .mandatory-reader-header { align-items: flex-start; flex-direction: column; }
    .mandatory-page-frame { height: calc(100dvh - 210px); min-height: 560px; }
    .dashboard-action-item { grid-template-columns: auto minmax(0, 1fr); }
    .dashboard-action-item > b { grid-column: 2; }
    .dashboard-action-item em { white-space: normal; }
    .dashboard-charts { grid-template-columns: minmax(0, 1fr); }
    .chart-curve-card { grid-column: auto; }
    .activity-curve svg { height: 150px; }
    .shes-summary { align-items: flex-start; flex-direction: column; }
    .shes-checklist-card { padding: .75rem; }
    .shes-checklist-table tr { grid-template-columns: minmax(0, 1fr); }
    .shes-checklist-table td, .shes-checklist-table td:first-child, .shes-checklist-table td:nth-child(4) { grid-column: 1; }
    .setup-combined-form { grid-template-columns: minmax(0, 1fr); }
    .setup-form-footer { align-items: stretch; flex-direction: column; }
    .setup-form-footer button { width: 100%; }
    .general-checklist-table tr { grid-template-columns: minmax(0, 1fr); }
    .general-checklist-table .checklist-question { grid-row: auto; }
    .general-checklist-table td { padding: .8rem; }
    .checklist-table-card .section-heading { align-items: flex-start; flex-direction: column; gap: .7rem; }
    .checklist-point-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
    .checklist-subquestion { grid-template-columns: minmax(0, 1fr); }
    .checklist-point-footer { align-items: stretch; flex-direction: column; }
    .checklist-point-footer > button { width: 100%; min-width: 0; }
    .document-preview-dialog { width: calc(100vw - 1rem); height: calc(100vh - 1rem); }
    .document-preview-footer { align-items: stretch; flex-direction: column; }
    .document-preview-footer .btn { text-align: center; }
}

@media (max-width: 1050px) {
    .stats { grid-template-columns: repeat(3, 1fr); }
    .grid.three { grid-template-columns: repeat(2, 1fr); }
    .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-work-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr 420px; }
    .auth-capabilities { grid-template-columns: 1fr; }
    .auth-capabilities > div { display: none; }
    .auth-capabilities > div:first-child { display: block; }
}

@media (max-width: 820px) {
    .auth-page { padding: 0; }
    .auth-shell { grid-template-rows: minmax(160px, .72fr) minmax(0, 1.28fr); grid-template-columns: 1fr; height: 100dvh; border: 0; border-radius: 0; }
    .auth-hero { min-height: 0; padding: 1.25rem 1.5rem; }
    .auth-hero-copy { margin: auto 0; padding: 1rem 0 0; }
    .auth-hero-copy h1 { margin: .45rem 0 0; font-size: clamp(1.45rem, 6vw, 2rem); line-height: 1.08; }
    .auth-hero-copy p { display: none; }
    .auth-capabilities, .auth-copyright { display: none; }
    .auth-form-panel { align-items: center; padding: 1.25rem 1.5rem; overflow: hidden; }
    .auth-company-logo { width: 180px; margin-bottom: 1rem; }
    .auth-heading h2 { margin-top: .35rem; font-size: 1.65rem; }
    .auth-heading p { margin-bottom: 1.1rem; font-size: .86rem; }
    .auth-form .field { margin-bottom: .8rem; }
    .auth-security-note { margin-top: 1rem; padding-top: .9rem; }
}

@media (max-height: 700px) and (min-width: 821px) {
    .auth-hero-copy h1 { font-size: clamp(2rem, 6vh, 3rem); }
    .auth-hero-copy p { font-size: .9rem; line-height: 1.5; }
    .auth-company-logo { width: 185px; margin-bottom: 1.2rem; }
    .auth-heading h2 { margin-top: .3rem; font-size: 1.7rem; }
    .auth-heading p { margin-bottom: 1rem; font-size: .85rem; }
    .auth-form .field { margin-bottom: .75rem; }
    .auth-security-note { margin-top: .9rem; padding-top: .75rem; }
}

@media (max-height: 620px) {
    .auth-product-mark { display: none; }
    .auth-hero-copy { padding: 0; }
    .auth-hero-copy h1 { font-size: 1.35rem; }
    .auth-company-logo { width: 155px; margin-bottom: .6rem; }
    .auth-heading .auth-eyebrow, .auth-security-note { display: none; }
    .auth-heading h2 { margin: 0 0 .2rem; font-size: 1.4rem; }
    .auth-heading p { margin-bottom: .65rem; font-size: .78rem; }
    .auth-form-panel { padding: .75rem 1.25rem; }
    .auth-form .field { margin-bottom: .55rem; }
    .auth-input-wrap input, .auth-submit { min-height: 42px; }
}

@media (max-width: 820px) and (max-height: 620px) {
    .auth-shell { grid-template-rows: minmax(105px, .4fr) minmax(0, 1.6fr); }
}

@media (max-width: 760px) {
    .shell { display: block; }
    .sidebar { position: relative; width: 100%; height: auto; padding: .7rem; }
    .brand { display: flex; align-items: center; gap: .8rem; padding: .3rem .3rem .8rem; }
    .brand-logo-frame { width: 170px; min-height: 48px; padding: .42rem .55rem; }
    .brand > span { margin: 0; text-align: left; }
    .sidebar nav { display: flex; overflow: auto; gap: .2rem; }
    .sidebar a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
    .sidebar a:hover, .sidebar a.active { border-left: 0; border-bottom-color: var(--kni-cyan); }
    .sidebar .group, .sidebar .who, .sidebar form { display: none; }
    .main { padding: 1rem 1rem 4.5rem; }
    .grid, .grid.three, .stats { grid-template-columns: 1fr; }
    .dashboard-metrics, .overview-metrics, .admin-menu-grid { grid-template-columns: 1fr; }
    .dashboard-charts { grid-template-columns: minmax(0, 1fr); }
    .top { align-items: flex-start; flex-direction: column; }
    .card { padding: 1rem; }
    .workflow-stepper { padding-right: .45rem; padding-left: .45rem; }
    .workflow-step > span:last-child { font-size: .64rem; }
    .workflow-step::after { left: calc(50% + 1rem); width: calc(100% - 2rem); }
    .next-task-card { grid-template-columns: auto minmax(0, 1fr); }
    .next-task-action { grid-column: 1 / -1; text-align: center; }
    .task-list-item { grid-template-columns: 1fr; }
    .task-list-status { order: -1; }
    .contract-summary-strip { grid-template-columns: 1fr; }
    .guidance-trigger { right: 1rem; bottom: 1rem; }
    .guidance-dialog { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); }
    .guidance-panel { max-height: calc(100vh - 1rem); }
    .guidance-header, .guidance-body, .guidance-footer { padding-right: 1rem; padding-left: 1rem; }
}

@media print {
    body { background: #fff; }
    .sidebar, .actions, .no-print, .tabs, .contract-tabs, button { display: none !important; }
    .main { padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    .print-only { display: block; }
}
