:root {
  --navy-950: #0d1d32;
  --navy-900: #142944;
  --navy-800: #1c3a61;
  --navy-700: #285782;
  --blue-600: #2f75b5;
  --blue-100: #e7f0f8;
  --blue-50: #f4f8fc;
  --red-600: #b83232;
  --red-100: #fbe8e8;
  --green-700: #2d6a46;
  --green-100: #e6f3eb;
  --amber-700: #8a6415;
  --amber-100: #fff4d6;
  --ink: #17202c;
  --muted: #64707e;
  --line: #d8dee6;
  --line-strong: #bdc7d2;
  --surface: #ffffff;
  --canvas: #f3f5f7;
  --soft: #eef2f5;
  --shadow: 0 14px 34px rgba(13, 29, 50, .09);
  --sidebar-width: 278px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.noscript { padding: 16px; background: var(--red-100); color: var(--red-600); text-align: center; font-weight: 700; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #f8fbff;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  border-right: 1px solid rgba(255,255,255,.08);
  z-index: 20;
}
.sidebar-brand { min-height: 88px; padding: 20px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand-link { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.sidebar-logo { width: 40px; height: 40px; padding: 5px; object-fit: contain; background: #fff; border-radius: 10px; }
.sidebar-brand strong { display: block; font-size: 1.08rem; letter-spacing: -.01em; }
.sidebar-brand small { display: block; margin-top: 2px; color: #b9c8d9; font-size: .76rem; }
.workflow-nav { padding: 14px 10px; overflow-y: auto; flex: 1; }
.nav-item {
  width: 100%; min-height: 46px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px;
  margin: 2px 0; padding: 8px 10px; border: 0; border-radius: 8px; color: #cbd7e5; background: transparent;
  text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.075); }
.nav-item.active { color: #fff; background: rgba(91, 155, 213, .22); box-shadow: inset 3px 0 0 #75addc; }
.nav-index { font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: #8da5bf; }
.nav-item.active .nav-index { color: #b9ddff; }
.privacy-chip { margin: 12px; padding: 13px; display: grid; grid-template-columns: 12px 1fr; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.privacy-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #6bd18d; box-shadow: 0 0 0 4px rgba(107,209,141,.12); }
.privacy-chip strong { display: block; font-size: .78rem; }
.privacy-chip small { display: block; color: #adbdcf; font-size: .7rem; line-height: 1.35; margin-top: 2px; }

.main-column { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 12; min-height: 88px; padding: 14px clamp(18px, 3vw, 38px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-eyebrow { margin: 0 0 2px; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.75rem); letter-spacing: -.035em; line-height: 1.1; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.save-status { color: var(--muted); font-size: .76rem; margin-right: 4px; white-space: nowrap; }
.icon-button { border: 0; background: transparent; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; font-size: 1.25rem; }
.icon-button:hover { background: var(--soft); }
.menu-button { display: none; }
.mobile-only { display: none; color: #fff; }
.button {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px;
  border: 1px solid var(--navy-800); border-radius: 7px; background: var(--navy-800); color: #fff;
  font-weight: 720; font-size: .84rem; text-decoration: none; cursor: pointer; transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.button:hover { background: var(--navy-700); }
.button:active { transform: translateY(1px); }
.button.secondary { color: var(--navy-800); background: #fff; border-color: var(--line-strong); }
.button.secondary:hover, .button.ghost:hover { background: var(--blue-50); }
.button.ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button.danger { color: var(--red-600); background: #fff; border-color: #e5bcbc; }
.button.success { background: var(--green-700); border-color: var(--green-700); }
.button.small { min-height: 34px; padding: 0 11px; font-size: .76rem; }
.button[disabled] { cursor: not-allowed; opacity: .45; }

.workspace { flex: 1; width: min(100%, 1540px); margin: 0 auto; padding: clamp(22px, 3.4vw, 46px); }
.view { display: none; animation: fadeIn .18s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.page-intro { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; margin-bottom: 26px; }
.page-intro h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.4rem); letter-spacing: -.045em; line-height: 1.08; }
.page-intro p { max-width: 760px; margin: 10px 0 0; color: var(--muted); font-size: .98rem; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { margin: 0 0 8px; color: var(--blue-600); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }

.hero-panel { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 54px); color: #fff; background: linear-gradient(135deg, var(--navy-950), #214d78); border-radius: 16px; box-shadow: var(--shadow); }
.hero-panel::after { content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -150px; border-radius: 50%; border: 70px solid rgba(255,255,255,.05); }
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel .eyebrow { color: #9fc8ea; }
.hero-panel h2 { max-width: 870px; margin: 0; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.02; letter-spacing: -.055em; }
.hero-panel p { max-width: 760px; color: #c9d8e8; font-size: 1.04rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-panel .button.secondary { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.obs-stat-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
.stat-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.stat-card span { display: block; color: var(--muted); font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.stat-card strong { display: block; margin-top: 7px; font-size: 1.55rem; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 3px 12px rgba(13,29,50,.035); }
.card-header { padding: 19px 20px 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.card-header h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.02em; }
.card-header p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: #fbfcfd; border-radius: 0 0 11px 11px; }
.section-gap { margin-top: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .78rem; font-weight: 750; color: #354252; }
.field small { color: var(--muted); font-size: .72rem; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 7px; outline: none;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(47,117,181,.12); }
.input.invalid, .select.invalid { border-color: var(--red-600); background: #fff7f7; }
.input.readonly { background: var(--soft); color: var(--muted); }
.inline-fields { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-fields > .field { min-width: 120px; flex: 1; }
.toggle-row { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-copy strong { display: block; font-size: .88rem; }
.toggle-copy small { color: var(--muted); font-size: .74rem; }
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #c8cfd7; cursor: pointer; transition: .15s ease; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: .15s ease; }
.switch input:checked + span { background: var(--blue-600); }
.switch input:checked + span::after { transform: translateX(20px); }

.notice { padding: 14px 16px; display: flex; gap: 11px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: #fff; }
.notice.info { border-left-color: var(--blue-600); background: var(--blue-50); }
.notice.success { border-left-color: var(--green-700); background: var(--green-100); }
.notice.warning { border-left-color: var(--amber-700); background: var(--amber-100); }
.notice.danger { border-left-color: var(--red-600); background: var(--red-100); }
.notice strong { display: block; font-size: .84rem; }
.notice p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }

.status-list { margin: 0; padding: 0; list-style: none; }
.status-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.status-item:last-child { border-bottom: 0; }
.status-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: .68rem; font-weight: 900; }
.status-icon.ok { color: var(--green-700); background: var(--green-100); }
.status-icon.wait { color: var(--amber-700); background: var(--amber-100); }
.status-item strong { display: block; font-size: .83rem; }
.status-item small { color: var(--muted); font-size: .72rem; }
.status-item button { border: 0; background: none; color: var(--blue-600); font-size: .74rem; font-weight: 750; cursor: pointer; }

.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
.data-table th, .data-table td { padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table thead th { position: sticky; top: 0; z-index: 3; color: #fff; background: var(--navy-800); font-size: .73rem; letter-spacing: .02em; white-space: nowrap; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover { background: #edf4fa; }
.data-table .cell-input { width: 100%; min-width: 72px; min-height: 34px; padding: 6px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; text-align: center; }
.data-table .cell-input:hover { border-color: var(--line-strong); background: #fff; }
.data-table .cell-input:focus { outline: none; border-color: var(--blue-600); background: #fff; box-shadow: 0 0 0 2px rgba(47,117,181,.12); }
.data-table .cell-input.invalid { color: var(--red-600); background: var(--red-100); border-color: #dfadad; font-weight: 700; }
.data-table .sticky-col { position: sticky; left: 0; z-index: 2; background: inherit; }
.data-table .sticky-col-2 { position: sticky; left: 54px; z-index: 2; background: inherit; }
.data-table .name-col { min-width: 230px; }
.data-table .no-col { min-width: 130px; }
.data-table .result-cell { font-weight: 750; background: #edf4fa; text-align: center; }
.data-table .muted-cell { color: var(--muted); text-align: center; }
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.table-tools .search { max-width: 280px; }

.matrix-wrap { overflow: auto; max-height: 68vh; border: 1px solid var(--line); border-radius: 9px; }
.matrix-table { border-collapse: separate; border-spacing: 0; min-width: max-content; width: 100%; }
.matrix-table th, .matrix-table td { min-width: 62px; height: 46px; padding: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.matrix-table thead th { position: sticky; top: 0; z-index: 5; color: #fff; background: var(--navy-800); }
.matrix-table .matrix-doc { position: sticky; left: 0; z-index: 4; min-width: 96px; color: var(--navy-900); background: #e1eaf3; font-weight: 800; }
.matrix-table select { width: 50px; height: 32px; border: 1px solid var(--line-strong); border-radius: 15px; text-align: center; font-weight: 800; }
.matrix-table select.v0 { background: #fff; color: var(--muted); }
.matrix-table select.v1 { background: #dceeff; color: #1f4e78; }
.matrix-table select.v2 { background: #a9d2f5; color: #17365d; }
.matrix-table select.v3 { background: #ffd966; color: #6f5400; }
.matrix-table select.v4 { background: #f8c7c1; color: #8b1e1e; }
.matrix-table select.v5 { background: #e9908a; color: #641010; }
.legend { display: flex; gap: 7px; flex-wrap: wrap; }
.legend span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; font-size: .72rem; font-weight: 700; }

.paste-hint { padding: 10px 12px; color: var(--muted); background: var(--blue-50); border: 1px solid #cfe0ef; border-radius: 8px; font-size: .78rem; }
.paste-hint strong { color: var(--navy-800); }
kbd { display: inline-block; min-width: 22px; padding: 1px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: #fff; color: var(--navy-900); font-family: inherit; font-size: .72rem; font-weight: 800; text-align: center; }
.matrix-table select:focus { outline: 3px solid rgba(47,117,181,.22); outline-offset: 1px; }

.component-grid { display: grid; grid-template-columns: 1.35fr .65fr 1fr; gap: 10px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.component-grid:last-child { border-bottom: 0; }
.component-label { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.component-label strong { font-size: .85rem; }
.question-list { display: grid; gap: 8px; }
.question-row { display: grid; grid-template-columns: 58px minmax(90px,.5fr) minmax(150px,1fr) 38px; gap: 8px; align-items: center; }
.question-code { height: 42px; display: grid; place-items: center; border-radius: 7px; color: var(--navy-800); background: var(--blue-100); font-weight: 800; }
.weight-meter { display: flex; align-items: center; gap: 10px; }
.weight-track { height: 8px; flex: 1; overflow: hidden; border-radius: 99px; background: var(--soft); }
.weight-fill { height: 100%; width: 0; background: var(--blue-600); transition: width .15s ease; }
.weight-fill.invalid { background: var(--red-600); }
.weight-total { min-width: 74px; text-align: right; font-weight: 800; font-size: .8rem; }

.tabs { display: flex; gap: 4px; padding: 4px; width: fit-content; background: var(--soft); border-radius: 8px; margin-bottom: 16px; }
.tab { min-height: 34px; padding: 0 13px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: .76rem; font-weight: 760; cursor: pointer; }
.tab.active { color: var(--navy-900); background: #fff; box-shadow: 0 1px 4px rgba(13,29,50,.1); }

.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 2px 8px; border-radius: 99px; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.badge.ok { color: var(--green-700); background: var(--green-100); }
.badge.warn { color: var(--amber-700); background: var(--amber-100); }
.badge.bad { color: var(--red-600); background: var(--red-100); }
.badge.neutral { color: var(--muted); background: var(--soft); }
.grade-AA, .grade-BA, .grade-BB { color: #215e21; background: #dff0d8 !important; }
.grade-CB, .grade-CC { color: #1f4e78; background: #dcecf8 !important; }
.grade-DC { color: #5f497a; background: #ebe5f1 !important; }
.grade-DD { color: #7f6000; background: #fff2cc !important; }
.grade-FD { color: #9c5700; background: #fce4d6 !important; }
.grade-FF { color: #9c0006; background: #f4cccc !important; }
.grade-NA { color: #7a3e00; background: #ffe6b3 !important; }
.grade-DS, .grade-DZ { color: #fff; background: #595959 !important; }
.grade-GR { color: #595959; background: #d9d9d9 !important; }

.result-summary { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 10px; }
.metric { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.metric span { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 4px; font-size: 1.3rem; letter-spacing: -.04em; }
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.summary-dashboard { display: grid; gap: 18px; }
.summary-panel { overflow: hidden; }
.summary-panel-header { padding: 20px 22px 0; }
.summary-panel-header h3 { margin: 0; font-size: 1.03rem; letter-spacing: -.02em; }
.summary-panel-header p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.summary-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; padding: 18px 22px 22px; }
.summary-kpi { position: relative; min-width: 0; padding: 19px 18px 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, #fff, #f9fbfd); }
.summary-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--blue-600); }
.summary-kpi-label { display: block; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .075em; line-height: 1.35; text-transform: uppercase; }
.summary-kpi strong { display: block; margin-top: 9px; color: var(--navy-950); font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.summary-kpi small { display: block; margin-top: 8px; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.summary-kpi.tone-navy::before { background: var(--navy-700); }
.summary-kpi.tone-accent::before { background: #7357a5; }
.summary-kpi.tone-success::before { background: var(--green-700); }
.summary-kpi.tone-warning::before { background: var(--amber-700); }
.summary-kpi.tone-danger::before { background: var(--red-600); }
.grade-distribution-card .card-body { padding-top: 18px; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 44px 1fr 52px; gap: 10px; align-items: center; }
.bar-label { font-weight: 800; font-size: .76rem; }
.bar-track { height: 11px; overflow: hidden; border-radius: 99px; background: var(--soft); }
.bar-fill { height: 100%; border-radius: inherit; background: var(--blue-600); }
.bar-value { text-align: right; color: var(--muted); font-size: .74rem; }

.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.delivery-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.delivery-card h3 { margin: 0 0 8px; font-size: 1rem; }
.delivery-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.delivery-card .button { margin-top: 16px; }
.file-box { padding: 14px; margin-top: 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fbfcfd; }
.file-box input { width: 100%; }
.filename { margin-top: 7px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .72rem; overflow-wrap: anywhere; }

.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 6px; }

.app-footer { min-height: 52px; padding: 14px clamp(18px, 3vw, 38px); display: flex; justify-content: space-between; gap: 18px; align-items: center; color: var(--muted); background: #fff; border-top: 1px solid var(--line); font-size: .7rem; }
.app-footer a { color: var(--blue-600); }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 9px; width: min(360px, calc(100% - 44px)); }
.toast { padding: 13px 15px; display: grid; grid-template-columns: 1fr auto; gap: 10px; color: #fff; background: var(--navy-900); border-radius: 8px; box-shadow: var(--shadow); animation: toastIn .18s ease; }
.toast.success { background: var(--green-700); }
.toast.error { background: var(--red-600); }
.toast.warning { background: var(--amber-700); }
.toast small { color: rgba(255,255,255,.78); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(5,15,28,.58); backdrop-filter: blur(3px); }
.modal { width: min(640px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.24); }
.modal-header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 1.12rem; }
.modal-body { padding: 20px; }
.modal-actions { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fbfcfd; }

@media print {
  .sidebar, .topbar, .app-footer, .page-actions, .button, .tabs { display: none !important; }
  .app-shell { display: block; }
  .workspace { padding: 0; }
  .view { display: none !important; }
  #view-results.active { display: block !important; }
  .card { break-inside: avoid; box-shadow: none; }
}

@media (max-width: 1150px) {
  .stat-grid, .obs-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .result-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(310px, 88vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .menu-button, .mobile-only { display: grid; }
  .topbar { align-items: flex-start; }
  .topbar-actions { max-width: 58%; }
  .save-status { display: none; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .grid-2, .outcome-grid, .delivery-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 650px) {
  .topbar { padding: 12px 14px; min-height: 78px; }
  .topbar-actions .button.ghost { display: none; }
  .workspace { padding: 22px 14px; }
  .hero-panel { padding: 28px 22px; border-radius: 12px; }
  .stat-grid, .obs-stat-grid, .grid-3, .form-grid, .form-grid.cols-3, .result-summary { grid-template-columns: 1fr; }
  .summary-kpi-grid { grid-template-columns: 1fr; padding: 16px; }
  .summary-panel-header { padding: 18px 16px 0; }
  .summary-kpi { padding: 17px 16px 15px; }
  .component-grid { grid-template-columns: 1fr 1fr; }
  .component-label { grid-column: 1 / -1; }
  .question-row { grid-template-columns: 50px 1fr 1fr 34px; }
  .app-footer { flex-direction: column; align-items: flex-start; }
}

/* Akredex Web 1.1.3: OBS aktarım sütunu */
.data-table thead th.obs-column { background: #f4df9a; color: var(--navy-900); }
.data-table tbody td.obs-column { background: #fff7d6; color: #5f4700; white-space: nowrap; }
.data-table tbody tr:nth-child(even) td.obs-column { background: #fff2c2; }
.data-table tbody tr:hover td.obs-column { background: #ffe9a3; }

/* Akredex Web 1.1.7: üniversiteler arası OBS/Bologna içe aktarımı ve yöntem kontrolü */
.obs-import-card { border-top: 3px solid var(--blue-600); }
.obs-import-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.obs-import-grid .button { min-height: 42px; white-space: nowrap; }
.obs-import-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: .76rem; }
.obs-preview-list { display: grid; gap: 8px; }
.obs-preview-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfd; }
.obs-preview-list span { color: var(--muted); font-size: .73rem; font-weight: 750; }
.obs-preview-list strong { font-size: .82rem; }
.obs-import-options { display: grid; gap: 9px; }
.obs-import-options label { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: .8rem; cursor: pointer; }
.obs-import-options label.is-disabled { opacity: .5; cursor: not-allowed; }
.obs-import-options input { margin-top: 2px; }
.catalog-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.catalog-facts > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.catalog-facts span { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.catalog-facts strong { display: block; margin-top: 5px; font-size: .82rem; overflow-wrap: anywhere; }
.catalog-section { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.catalog-section summary { padding: 12px 14px; color: var(--navy-900); background: #f8fafc; border-radius: 8px; font-size: .8rem; font-weight: 800; cursor: pointer; }
.catalog-section[open] summary { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.catalog-section > p, .catalog-section > h4, .catalog-section > ol { margin-left: 15px; margin-right: 15px; }
.catalog-section h4 { margin-top: 15px; margin-bottom: 5px; font-size: .78rem; }
.catalog-section p, .catalog-section li { color: #354252; font-size: .8rem; line-height: 1.55; }
.catalog-section ol { padding-left: 22px; }
.catalog-section li + li { margin-top: 7px; }
.catalog-source { margin-top: 15px; color: var(--muted); font-size: .72rem; }
.catalog-source a { color: var(--blue-600); font-weight: 750; }
.compact-table { margin: 12px; width: auto; }
.compact-table .data-table { min-width: 560px; }
.outcome-description-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.outcome-description-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; }
.outcome-description-list strong { color: var(--navy-800); font-size: .76rem; }
.outcome-description-list span { color: #354252; font-size: .78rem; line-height: 1.45; }

@media (max-width: 900px) {
  .catalog-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .obs-import-grid { grid-template-columns: 1fr; }
  .obs-import-grid .button { width: 100%; }
  .obs-import-help { align-items: flex-start; flex-direction: column; }
  .obs-preview-list > div { grid-template-columns: 1fr; gap: 3px; }
  .catalog-facts { grid-template-columns: 1fr; }
  .outcome-description-list li { grid-template-columns: 1fr; gap: 4px; }
}


/* Akredex Web 1.1.7: yöntem rehberi ve uyumluluk uyarıları */
.guide-nav { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 13px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.guide-limit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.guide-limit-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.guide-limit-card span { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.guide-limit-card strong { display: block; margin-top: 7px; color: var(--navy-900); font-size: 1.9rem; line-height: 1; }
.guide-limit-card small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.4; }
.guide-rules { display: grid; gap: 0; }
.guide-rules section { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.guide-rules section:last-child { border-bottom: 0; }
.guide-rules section > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--blue-700); font-size: .72rem; font-weight: 900; }
.guide-rules h4 { margin: 0 0 5px; color: var(--navy-900); font-size: .9rem; }
.guide-rules p { margin: 0; color: #415064; font-size: .8rem; line-height: 1.58; }
.method-example { display: grid; gap: 8px; }
.method-example > div { display: grid; grid-template-columns: minmax(90px, .8fr) 80px minmax(100px, 1fr); gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; }
.method-example.good > div { background: #f4fbf7; }
.method-example.bad > div { background: #fff5f4; border-color: #f0c7c2; }
.method-example strong { color: var(--navy-900); }
.method-example span { color: var(--muted); font-size: .76rem; }
.method-example b { color: var(--blue-700); font-size: .78rem; }
.method-example.bad b { color: var(--red-600); }
.method-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

@media (max-width: 900px) {
  .guide-limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .guide-limit-grid { grid-template-columns: 1fr; }
  .method-example > div { grid-template-columns: 1fr; gap: 3px; }
  .notice-actions .button { width: 100%; }
}

/* Akredex Web 1.2.0: Toplu Teslim Merkezi */
.batch-nav { border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; padding-top: 12px; }
.batch-file-box { display:flex; min-height:150px; border:1.5px dashed #9eb0c4; border-radius:14px; background:#f7f9fb; align-items:center; justify-content:center; flex-direction:column; text-align:center; padding:24px; cursor:pointer; transition:.18s ease; }
.batch-file-box:hover { border-color:#315f8f; background:#f0f5fa; transform:translateY(-1px); }
.batch-file-box input { position:absolute; opacity:0; pointer-events:none; }
.batch-file-box strong { color:#172d4d; font-size:.98rem; max-width:100%; overflow-wrap:anywhere; }
.batch-file-box small { display:block; margin-top:8px; color:#657486; max-width:520px; line-height:1.55; }
.static-field { min-height:42px; border:1px solid #dce3ea; background:#f7f9fb; border-radius:9px; padding:9px 12px; }
.static-field strong,.static-field small { display:block; }
.static-field small { color:#6b7785; margin-top:3px; }
.batch-progress { height:5px; background:#e4e9ee; overflow:hidden; }
.batch-progress[hidden] { display:none; }
.batch-progress span { display:block; height:100%; background:#2f75b5; transition:width .18s ease; }
.batch-table td { vertical-align:middle; }
.cell-sub { display:block; color:#6b7785; margin-top:3px; font-size:.72rem; max-width:260px; white-space:normal; }
.button.danger { background:#9f2e2e; border-color:#9f2e2e; color:#fff; }
@media (max-width:900px){.batch-table{min-width:1180px}.batch-file-box{min-height:125px}}
