:root {
    --brand: #1358d0;
    --brand-dark: #0b3f9d;
    --brand-soft: #eaf1ff;
    --ink: #172033;
    --muted: #667085;
    --line: #e4e8ef;
    --surface: #ffffff;
    --canvas: #f4f6fa;
    --success: #15803d;
    --success-soft: #eaf8ef;
    --warning: #b45309;
    --warning-soft: #fff6e5;
    --danger: #c62828;
    --danger-soft: #fff0f0;
    --sidebar: #101a2d;
    --sidebar-muted: #9cabc2;
    --radius: 14px;
    --shadow: 0 8px 28px rgba(20, 35, 60, .07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
body.menu-open { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 15px; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; transition: .18s ease; }
button:hover, .button:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(19, 88, 208, .22); outline-offset: 2px; }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); border-color: #cfd6e2; }
button.secondary:hover, .button.secondary:hover { background: #f8fafc; border-color: #aeb8c8; color: var(--ink); }
button.danger, .button.danger { background: var(--danger); }
button[disabled], .button[disabled] { cursor: not-allowed; opacity: .55; transform: none; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 24px 18px 18px; display: flex; flex-direction: column; background: var(--sidebar); color: #fff; z-index: 30; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 23px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand img { display: block; width: 134px; max-height: 40px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.product-mark { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.2); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c9d5e8; white-space: nowrap; }
.nav-section { margin-top: 22px; }
.nav-label { margin: 0 11px 8px; color: var(--sidebar-muted); font-size: .69rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 42px; margin: 3px 0; padding: 9px 11px; border-radius: 9px; color: #dbe5f5; font-weight: 650; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: #2467d7; color: #fff; box-shadow: inset 3px 0 0 #83adff; }
.nav-icon { width: 21px; text-align: center; font-size: 1.05rem; opacity: .92; }
.sidebar-user { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-name { font-weight: 750; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 3px 0 12px; }
.user-role { color: var(--sidebar-muted); font-size: .82rem; }
.logout-button { width: 100%; min-height: 38px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #fff; }
.logout-button:hover { background: rgba(255,255,255,.13); }
.main-panel { min-height: 100vh; margin-left: 260px; }
.mobile-topbar { display: none; position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 18px; align-items: center; justify-content: space-between; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.mobile-topbar img { width: 126px; max-height: 38px; object-fit: contain; filter: brightness(0) saturate(100%) invert(12%) sepia(18%) saturate(1850%) hue-rotate(180deg) brightness(90%) contrast(96%); }
.menu-toggle { width: 42px; padding: 0; background: var(--surface); color: var(--ink); border-color: var(--line); font-size: 1.3rem; }
.menu-backdrop { display: none; position: fixed; inset: 0; z-index: 25; background: rgba(9, 17, 31, .55); }
.content { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 56px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: clamp(1.65rem, 2.8vw, 2.15rem); line-height: 1.15; letter-spacing: -.025em; }
.page-header p { max-width: 720px; margin: 7px 0 0; color: var(--muted); }
.eyebrow { margin-bottom: 5px; color: var(--brand); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading h2, .card h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.01em; }
.section-heading p { margin: 4px 0 0; }
.card { margin-bottom: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(20,35,60,.025); }
.card-elevated { box-shadow: var(--shadow); }
.card-compact { padding: 16px 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 132px; padding: 20px; }
.metric-card::after { content: ""; position: absolute; width: 86px; height: 86px; right: -25px; top: -25px; border-radius: 50%; background: var(--brand-soft); }
.metric-label { color: var(--muted); font-size: .84rem; font-weight: 650; }
.metric { margin-top: 7px; font-size: 2rem; line-height: 1; font-weight: 820; letter-spacing: -.035em; }
.metric-detail { margin-top: 9px; color: var(--muted); font-size: .8rem; }
.metric-card.warning::after { background: var(--warning-soft); }
.metric-card.success::after { background: var(--success-soft); }
.metric-card.danger::after { background: var(--danger-soft); }
.score-hero { background: linear-gradient(135deg, #0d4dbc, #2467d7); color: #fff; border: 0; box-shadow: 0 16px 40px rgba(19,88,208,.2); }
.score-hero .metric-label, .score-hero .metric-detail { color: #d9e7ff; }
.score-hero .metric { font-size: 3rem; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-group { min-width: 0; }
label { display: block; margin-bottom: 6px; color: #344054; font-size: .88rem; font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; min-height: 43px; padding: 10px 12px; background: #fff; color: var(--ink); border: 1px solid #cfd6e2; border-radius: 9px; transition: .18s ease; }
input:hover, select:hover, textarea:hover { border-color: #aeb8c8; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(19,88,208,.1); outline: none; }
textarea { min-height: 112px; resize: vertical; }
.help-text { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
.checkbox-row { display: inline-flex; align-items: center; gap: 9px; margin: 16px 0 0; cursor: pointer; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--brand); }
.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 13px 15px; text-align: left; vertical-align: middle; border-bottom: 1px solid #edf0f4; }
th { background: #f8fafc; color: #596579; font-size: .73rem; font-weight: 820; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.table-title { font-weight: 730; color: var(--ink); }
.table-subtitle { margin-top: 2px; color: var(--muted); font-size: .82rem; }
.table-action { white-space: nowrap; font-weight: 700; }
.nowrap { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 4px 9px; border-radius: 999px; background: #eef1f5; color: #4b5565; font-size: .75rem; line-height: 1.2; font-weight: 780; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--brand-soft); color: var(--brand); }
.muted { color: var(--muted); }
.success, .error { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 13px 15px; border-radius: 10px; border: 1px solid; }
.success { background: var(--success-soft); border-color: #bce8c9; color: #116530; }
.error { background: var(--danger-soft); border-color: #fac7c7; color: #9f1f1f; }
.error ul { margin: 6px 0 0; padding-left: 20px; }
.empty-state { padding: 38px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); }
.progress-block { margin-top: 16px; }
.progress-meta { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 7px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.progress-track { height: 9px; overflow: hidden; background: #e8edf5; border-radius: 999px; }
.progress-bar { height: 100%; width: var(--progress, 0%); background: linear-gradient(90deg, var(--brand), #4b85e8); border-radius: inherit; transition: width .25s ease; }
.list-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.list-card:first-child { padding-top: 0; }
.list-card:last-child { padding-bottom: 0; border-bottom: 0; }
.list-main { min-width: 0; }
.list-title { font-weight: 760; color: var(--ink); }
.list-meta { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: .84rem; }
.evaluation-card { position: relative; padding: 20px; transition: border-color .2s ease, box-shadow .2s ease; }
.evaluation-card:focus-within { border-color: #b8cdf4; box-shadow: 0 0 0 3px rgba(19,88,208,.06); }
.evaluation-card.needs-evidence { border-color: #efb45e; background: #fffdf8; }
.question-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 17px; }
.question-number { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: .78rem; font-weight: 850; }
.question-meta { margin: 0 0 3px; color: var(--muted); font-size: .77rem; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.question-title { margin: 0; font-size: 1rem; line-height: 1.42; }
.score-picker { display: grid; grid-template-columns: repeat(10, minmax(36px, 1fr)); gap: 7px; }
.score-choice { position: relative; margin: 0; }
.score-choice input { position: absolute; opacity: 0; pointer-events: none; }
.score-choice span { min-height: 40px; display: grid; place-items: center; background: #f8fafc; color: #475467; border: 1px solid #d9dfe8; border-radius: 8px; font-weight: 760; cursor: pointer; transition: .16s ease; }
.score-choice input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(19,88,208,.2); }
.score-choice input:focus-visible + span { outline: 3px solid rgba(19,88,208,.22); outline-offset: 2px; }
.score-choice input:disabled + span { cursor: default; opacity: .65; }
.scale-legend { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .73rem; }
.evidence-hint { margin: 6px 0 0; color: var(--muted); font-size: .78rem; }
.needs-evidence .evidence-hint { color: var(--warning); font-weight: 700; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 16px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 35px rgba(20,35,60,.13); backdrop-filter: blur(10px); }
.score-bar { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.score-bar-track { flex: 1; height: 8px; overflow: hidden; background: #e8edf5; border-radius: 999px; }
.score-bar-fill { height: 100%; width: var(--score, 0%); background: var(--brand); border-radius: inherit; }
.score-bar-value { width: 36px; text-align: right; font-weight: 780; }
.comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.comparison-item { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.comparison-label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.comparison-value { margin-top: 3px; font-size: 1.45rem; font-weight: 820; }
.insight { padding: 13px 15px; border-radius: 10px; background: var(--brand-soft); color: #244a87; font-weight: 650; }
.question-result { padding: 18px 0; border-bottom: 1px solid var(--line); }
.question-result:last-child { padding-bottom: 0; border-bottom: 0; }
.question-result:first-child { padding-top: 0; }
.comment-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 13px; }
.comment-box { padding: 12px; border-radius: 9px; background: #f7f9fc; color: #475467; font-size: .85rem; }
.comment-box strong { display: block; margin-bottom: 3px; color: var(--ink); }
.history-list { display: grid; gap: 10px; }
.history-item { display: grid; grid-template-columns: 85px 1fr 50px auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.filter-card { padding: 18px; }
.filter-actions { flex: 0 0 auto !important; min-width: auto !important; }
.inline-form { display: contents; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.1fr); background: #fff; }
.login-panel { display: grid; place-items: center; padding: 42px; }
.login-card { width: min(420px, 100%); }
.login-brand { width: 100%; min-height: 84px; display: flex; align-items: center; justify-content: center; padding: 16px 22px; background: linear-gradient(135deg, #101a2d, #182a49); border: 1px solid #263a5d; border-radius: 14px; box-shadow: 0 12px 28px rgba(16,26,45,.14); }
.login-brand img { width: 220px; max-width: 82%; max-height: 48px; object-fit: contain; object-position: center; }
.login-card h1 { margin: 34px 0 7px; font-size: 2rem; letter-spacing: -.03em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); }
.login-card label { margin-top: 16px; }
.login-card button { width: 100%; margin-top: 22px; }
.login-visual { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 54px; background: linear-gradient(145deg, #0c2558 0%, #1358d0 52%, #6b9bea 100%); color: #fff; }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.login-visual::before { width: 430px; height: 430px; right: -100px; top: -130px; }
.login-visual::after { width: 270px; height: 270px; right: 90px; top: 80px; }
.login-message { position: relative; z-index: 1; max-width: 520px; }
.login-message small { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #dbe8ff; }
.login-message h2 { margin: 12px 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.04em; }
.login-message p { max-width: 440px; color: #e0eaff; font-size: 1.05rem; }
@media (max-width: 1050px) {
    .sidebar { width: 238px; }
    .main-panel { margin-left: 238px; }
    .content { width: min(100% - 34px, 1220px); }
    .score-picker { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 16px 0 45px rgba(7,15,28,.25); }
    .menu-open .sidebar { transform: translateX(0); }
    .menu-open .menu-backdrop { display: block; }
    .main-panel { margin-left: 0; }
    .mobile-topbar { display: flex; }
    .content { width: min(100% - 28px, 1220px); padding: 24px 0 45px; }
    .page-header { align-items: stretch; flex-direction: column; }
    .grid-2, .form-grid { grid-template-columns: 1fr; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { padding: 34px 24px; }
}
@media (max-width: 620px) {
    .card { padding: 17px; border-radius: 12px; }
    .grid { grid-template-columns: 1fr 1fr; gap: 11px; }
    .metric-card { min-height: 116px; }
    .metric { font-size: 1.65rem; }
    .row { align-items: stretch; flex-direction: column; }
    .row > div { width: 100%; min-width: 0; }
    .filter-actions { width: 100%; }
    .filter-actions .button, .filter-actions button { flex: 1; }
    .list-card { align-items: flex-start; flex-direction: column; }
    .list-card .button { width: 100%; }
    .comparison-grid, .comment-grid { grid-template-columns: 1fr; }
    .history-item { grid-template-columns: 72px 1fr 42px; }
    .history-item .table-action { grid-column: 1 / -1; }
    .sticky-actions { align-items: stretch; flex-direction: column; bottom: 8px; }
    .sticky-actions .actions, .sticky-actions button { width: 100%; }
    .sticky-actions button { flex: 1; }
    .score-picker { grid-template-columns: repeat(5, 1fr); }
    .table-wrap { border: 0; border-radius: 0; margin: 0 -17px; width: calc(100% + 34px); }
    th, td { padding: 12px; }
}
@media (max-width: 420px) {
    .grid { grid-template-columns: 1fr; }
    .product-mark { display: none; }
}
