:root {
  --navy-950: #071d32;
  --navy-900: #0b2d4f;
  --navy-800: #123c63;
  --navy-700: #1f527f;
  --blue-600: #2876b8;
  --yellow-500: #f4c542;
  --yellow-400: #f8d766;
  --red-600: #c93a46;
  --orange-500: #ef8a32;
  --green-600: #27865f;
  --teal-500: #2c9a9a;
  --ink-900: #17212b;
  --ink-700: #405061;
  --ink-500: #6e7c8b;
  --line: #dce3ea;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --background: #edf2f6;
  --shadow: 0 12px 30px rgba(11, 45, 79, .08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --sidebar-w: 270px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--ink-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-w);
  flex-direction: column;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 62%, #0c3559);
  color: #fff;
  padding: 24px 18px;
  box-shadow: 10px 0 30px rgba(7, 29, 50, .18);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 26px; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--yellow-500);
  color: var(--navy-950);
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: 0 8px 18px rgba(244, 197, 66, .22);
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 1rem; }
.brand-copy span { color: rgba(255,255,255,.68); font-size: .78rem; }
.nav { display: grid; gap: 7px; }
.nav-item {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255,255,255,.76);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-weight: 650;
  transition: .18s ease;
}
.nav-item span { display: grid; place-items: center; width: 24px; color: var(--yellow-400); font-size: 1.05rem; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.nav-item.active { background: rgba(244,197,66,.16); color: #fff; box-shadow: inset 3px 0 0 var(--yellow-500); }
.sidebar-actions { display: grid; gap: 9px; margin-top: 28px; }
.privacy-stamp { margin-top: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; padding: 14px; background: rgba(255,255,255,.045); }
.privacy-stamp strong, .privacy-stamp span { display: block; }
.privacy-stamp strong { font-size: .82rem; }
.privacy-stamp span { margin-top: 4px; font-size: .72rem; color: rgba(255,255,255,.58); }

.main { min-height: 100vh; margin-left: var(--sidebar-w); padding: 0 28px 28px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  background: rgba(237,242,246,.92);
  backdrop-filter: blur(16px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar h1 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.85rem); letter-spacing: -.035em; }
.topbar p { margin: 3px 0 0; color: var(--ink-500); font-size: .86rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.storage-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.75); padding: 8px 11px; border-radius: 999px; color: var(--ink-700); font-size: .75rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 4px rgba(39,134,95,.12); }

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 750;
  font-size: .82rem;
  transition: .18s ease;
  text-decoration: none;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--navy-900); color: #fff; box-shadow: 0 8px 18px rgba(11,45,79,.16); }
.button-primary:hover { background: var(--navy-800); }
.button-secondary { background: #fff; color: var(--navy-900); border-color: var(--line); }
.button-secondary:hover { border-color: #afbecb; }
.button-danger { background: #fff; color: var(--red-600); border-color: #efc4c8; }
.button-ghost-light { border-color: rgba(255,255,255,.18); color: #fff; background: rgba(255,255,255,.05); }
.button-kiosk { background: var(--yellow-500); color: var(--navy-950); }
.file-label input { display: none; }
.icon-button { display: grid; place-items: center; border: 0; width: 40px; height: 40px; border-radius: 10px; background: transparent; color: inherit; font-size: 1.4rem; }
.icon-button:hover { background: rgba(11,45,79,.07); }
.info-button { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 50%; color: var(--ink-500); font-weight: 800; }
.mobile-only { display: none; }

.filterbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  background: var(--surface);
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 7px 20px rgba(11,45,79,.04);
}
label { display: grid; gap: 6px; color: var(--ink-700); font-size: .77rem; font-weight: 700; }
label > span { white-space: nowrap; }
input, select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-900);
  padding: 9px 11px;
  outline: none;
}
input:focus, select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(40,118,184,.12); }
.filter-reset { min-height: 42px; }
.inline-select { display: grid; grid-template-columns: auto minmax(170px, 230px); align-items: center; gap: 10px; }

.notice { margin: 14px 0; padding: 11px 14px; border-radius: 10px; font-size: .79rem; }
.privacy-notice { background: #eaf5f1; border: 1px solid #c9e7dc; color: #275d4c; }
.warning-notice { background: #fff7df; border: 1px solid #f1dfaa; color: #71591b; }

.view { display: none; padding-top: 4px; animation: fadeIn .22s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.dashboard-content { display: block; }
.dashboard-content.hidden { display: none; }
.empty-state {
  display: none;
  min-height: 540px;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 42px 20px;
  background: radial-gradient(circle at top, #fff 0, #f7fafc 55%, #eef3f7 100%);
  border: 1px dashed #b9c7d3;
  border-radius: var(--radius-lg);
}
.empty-state.visible { display: grid; }
.empty-icon { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 22px; background: var(--navy-900); color: var(--yellow-500); font-size: 2rem; box-shadow: var(--shadow); }
.empty-state h2 { margin: 19px 0 7px; font-size: 1.45rem; }
.empty-state p { max-width: 590px; margin: 0; color: var(--ink-500); }
.empty-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }

.kpi-grid { display: grid; grid-template-columns: repeat(8, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(11,45,79,.045);
}
.kpi-card::after { content: ""; position: absolute; right: -15px; bottom: -28px; width: 75px; height: 75px; border-radius: 50%; background: var(--kpi-soft, #edf3f8); }
.kpi-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--kpi-soft, #edf3f8); color: var(--kpi-color, var(--navy-900)); font-weight: 900; }
.kpi-label { display: block; margin-top: 11px; color: var(--ink-500); font-size: .72rem; font-weight: 750; }
.kpi-value { display: block; margin-top: 2px; font-size: 1.45rem; line-height: 1.1; font-weight: 900; letter-spacing: -.04em; }
.kpi-foot { display: block; margin-top: 5px; color: var(--ink-500); font-size: .68rem; }

.grid { display: grid; gap: 14px; margin: 14px 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(11,45,79,.045);
}
.full-width { width: 100%; margin: 14px 0; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card h3 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.card-header p, .section-heading p { margin: 4px 0 0; color: var(--ink-500); font-size: .75rem; }
.metric-chip { white-space: nowrap; border-radius: 999px; background: #eef3f7; padding: 6px 9px; color: var(--ink-700); font-size: .69rem; font-weight: 800; }
.chart-wrap { position: relative; height: 305px; min-height: 260px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-tall { height: 390px; }
.insight-card { min-height: 160px; background: linear-gradient(145deg, #fff, #f7fafc); }
.eyebrow { color: var(--blue-600); text-transform: uppercase; font-size: .65rem; letter-spacing: .1em; font-weight: 900; }
.insight-card h3 { margin: 12px 0 6px; font-size: 1.25rem; }
.insight-card p { margin: 0; color: var(--ink-500); font-size: .77rem; }

.rank-list { display: grid; gap: 9px; }
.rank-item { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f4; }
.rank-item:last-child { border-bottom: 0; }
.rank-number { display: grid; place-items: center; width: 28px; height: 28px; background: #eef3f7; color: var(--navy-900); border-radius: 8px; font-size: .72rem; font-weight: 900; }
.rank-label { min-width: 0; }
.rank-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.rank-label span { color: var(--ink-500); font-size: .67rem; }
.rank-score { color: var(--red-600); font-size: .82rem; font-weight: 900; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 17px 0 10px; }
.section-heading h2 { margin: 0; font-size: 1.25rem; }
.section-actions { display: flex; align-items: center; gap: 8px; }
.section-actions input { width: min(280px, 40vw); }

.dimension-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.dimension-card { position: relative; overflow: hidden; }
.dimension-card .dimension-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dimension-card h3 { max-width: 82%; }
.dimension-score { font-size: 1.45rem; font-weight: 900; color: var(--navy-900); }
.progress-mini { height: 8px; margin: 14px 0 11px; overflow: hidden; border-radius: 999px; background: #edf1f4; }
.progress-mini > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-600), var(--yellow-500), var(--red-600)); }
.response-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.response-mini div { padding: 7px; border-radius: 8px; background: var(--surface-soft); }
.response-mini strong, .response-mini span { display: block; }
.response-mini strong { font-size: .8rem; }
.response-mini span { color: var(--ink-500); font-size: .62rem; }

.profile-composition { display: grid; gap: 9px; }
.profile-row { display: grid; grid-template-columns: minmax(100px, 1.5fr) 2fr auto; gap: 10px; align-items: center; }
.profile-row .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; font-weight: 750; }
.profile-bar { height: 10px; border-radius: 999px; overflow: hidden; background: #edf1f4; }
.profile-bar span { display: block; height: 100%; background: var(--blue-600); border-radius: inherit; }
.profile-row .meta { color: var(--ink-500); font-size: .66rem; text-align: right; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e7edf2; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; background: #f6f8fa; color: var(--ink-700); font-size: .67rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { color: var(--ink-700); font-size: .74rem; }
.data-table tbody tr:hover { background: #fafcfd; }
.data-table select { min-width: 112px; min-height: 34px; padding: 5px 7px; font-size: .7rem; }
.question-cell { min-width: 340px; max-width: 630px; color: var(--ink-900); }
.score-pill { display: inline-flex; min-width: 54px; justify-content: center; border-radius: 999px; padding: 5px 8px; font-weight: 900; }
.score-low { background: #e7f5ef; color: #21704e; }
.score-mid { background: #fff3d5; color: #846216; }
.score-high { background: #fde8e9; color: #a92835; }
.heatmap-table th:first-child, .heatmap-table td:first-child { position: sticky; left: 0; z-index: 3; min-width: 180px; background: #fff; }
.heatmap-cell { text-align: center; font-weight: 900; border-left: 3px solid #fff; }
.heatmap-protected { color: var(--ink-500); background: #f1f3f5; }

.compare-controls { display: grid; grid-template-columns: 1.2fr 1fr auto 1fr auto; align-items: end; gap: 12px; }
.compare-vs { display: grid; place-items: center; height: 42px; font-size: 1.25rem; font-weight: 900; color: var(--ink-500); }
.compare-insights { display: grid; gap: 10px; }
.compare-insight { border-left: 4px solid var(--yellow-500); background: #fafbfd; border-radius: 0 10px 10px 0; padding: 12px; }
.compare-insight strong { display: block; font-size: .82rem; }
.compare-insight span { display: block; margin-top: 3px; color: var(--ink-500); font-size: .72rem; }

.table-card { padding: 0; overflow: hidden; }
.table-card .card-header { padding: 18px 18px 4px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 14px; border-color: #efd0d3; }
.danger-zone h3, .danger-zone p { margin: 0; }
.danger-zone p { color: var(--ink-500); font-size: .72rem; margin-top: 4px; }
.quality-list { display: grid; gap: 9px; }
.quality-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f4; }
.quality-item:last-child { border: 0; }
.quality-item span { color: var(--ink-700); font-size: .75rem; }
.quality-item strong { font-size: .85rem; }
.methodology-card ul { margin: 0; padding-left: 20px; }
.methodology-card li { margin: 8px 0; color: var(--ink-700); font-size: .76rem; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.method-grid > div { background: var(--surface-soft); padding: 13px; border-radius: 10px; }
.method-grid strong { font-size: .78rem; }
.method-grid p { margin: 5px 0 0; color: var(--ink-500); font-size: .71rem; }

.footer { display: flex; justify-content: space-between; gap: 10px; padding: 22px 4px 4px; color: var(--ink-500); font-size: .68rem; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(7,29,50,.64);
  backdrop-filter: blur(8px);
}
.modal-backdrop.open { display: grid; }
.modal { width: min(560px, 100%); max-height: min(90vh, 920px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 70px rgba(7,29,50,.3); }
.modal-large { width: min(980px, 100%); }
.modal-header, .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.modal-header h2 { margin: 0; font-size: 1.15rem; }
.modal-header p { margin: 3px 0 0; color: var(--ink-500); font-size: .73rem; }
.modal-body { padding: 20px; }
.import-steps { display: flex; gap: 7px; margin-bottom: 17px; }
.import-steps span { flex: 1; padding: 8px; border-radius: 8px; background: #eff3f6; text-align: center; color: var(--ink-500); font-size: .68rem; font-weight: 800; }
.import-steps span.active { background: var(--navy-900); color: #fff; }
.metadata-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dropzone { margin-top: 17px; min-height: 175px; border: 2px dashed #b9c8d5; border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; background: #f8fafc; transition: .18s; }
.dropzone.dragover { border-color: var(--blue-600); background: #eef6fc; }
.dropzone input { display: none; }
.dropzone-icon { font-size: 2rem; color: var(--blue-600); }
.dropzone strong { color: var(--navy-900); font-size: .9rem; }
.dropzone > span:last-child { color: var(--ink-500); font-size: .7rem; }
.selected-files { display: grid; gap: 7px; margin-top: 12px; }
.selected-file { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; }
.selected-file .file-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: #eaf2f8; color: var(--navy-900); font-weight: 900; }
.selected-file strong { display: block; font-size: .73rem; }
.selected-file span { display: block; color: var(--ink-500); font-size: .64rem; }
.selected-file button { border: 0; background: transparent; color: var(--red-600); font-weight: 900; }
.import-progress { margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.import-progress.hidden { display: none; }
.progress-head { display: flex; justify-content: space-between; font-size: .72rem; }
.progress-track { height: 9px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #eaf0f4; }
.progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--blue-600), var(--teal-500)); transition: width .2s ease; }
.progress-log { max-height: 155px; overflow: auto; margin-top: 9px; color: var(--ink-500); font-size: .66rem; }
.progress-log div { padding: 3px 0; }
.prose p { color: var(--ink-700); font-size: .8rem; }

.kiosk-overlay, .symposium-overlay { position: fixed; inset: 0; z-index: 150; display: none; background: #061a2d; color: #fff; }
.kiosk-overlay.open { display: grid; grid-template-rows: auto 1fr auto; }
.kiosk-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.kiosk-brand { display: flex; align-items: center; gap: 12px; }
.kiosk-brand > div:last-child { display: flex; flex-direction: column; }
.kiosk-brand span { color: rgba(255,255,255,.55); font-size: .76rem; }
.kiosk-meta { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.65); font-size: .74rem; }
.kiosk-icon-btn { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; background: rgba(255,255,255,.06); color: #fff; font-size: 1.1rem; }
.kiosk-stage { min-height: 0; display: grid; place-items: center; padding: clamp(22px, 4vh, 52px) clamp(28px, 4vw, 75px); overflow: hidden; }
.kiosk-slide { width: 100%; height: 100%; min-height: 0; display: grid; align-content: center; }
.kiosk-slide h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 3rem); }
.kiosk-slide .lead { margin: 0 0 30px; color: rgba(255,255,255,.58); font-size: clamp(.85rem, 1.3vw, 1.2rem); }
.kiosk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 25px); }
.kiosk-kpi { min-width: 0; padding: clamp(18px, 2.3vw, 32px); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035)); }
.kiosk-kpi span { display: block; color: rgba(255,255,255,.58); font-size: clamp(.7rem, 1vw, .95rem); }
.kiosk-kpi strong { display: block; margin-top: 8px; color: var(--yellow-500); font-size: clamp(2rem, 4.5vw, 5rem); line-height: 1; letter-spacing: -.05em; overflow-wrap: anywhere; }
.kiosk-bars { display: grid; gap: clamp(10px, 1.5vh, 18px); }
.kiosk-bar-row { display: grid; grid-template-columns: minmax(160px, 1.5fr) 4fr auto; align-items: center; gap: 15px; }
.kiosk-bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kiosk-bar-track { height: clamp(15px, 2vh, 24px); border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.kiosk-bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow-500), var(--orange-500), var(--red-600)); }
.kiosk-bar-row strong { width: 66px; text-align: right; font-size: 1.2rem; }
.kiosk-controls { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 13px; padding: 13px 28px 19px; }
.kiosk-controls button { border: 1px solid rgba(255,255,255,.15); border-radius: 9px; background: rgba(255,255,255,.06); color: #fff; padding: 8px 14px; }
.kiosk-progress { height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.1); }
.kiosk-progress div { height: 100%; width: 0; background: var(--yellow-500); }

.symposium-overlay.open { display: block; overflow: auto; background: #e7edf2; color: var(--ink-900); }
.symposium-toolbar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 22px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.symposium-toolbar > div:first-child { display: flex; flex-direction: column; }
.symposium-toolbar span { color: var(--ink-500); font-size: .7rem; }
.symposium-document { width: min(1400px, calc(100% - 40px)); margin: 22px auto; display: grid; gap: 18px; }
.symposium-cover, .symposium-page { min-height: 720px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); padding: clamp(30px, 5vw, 70px); }
.symposium-cover { display: grid; align-content: center; background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); color: #fff; }
.symposium-cover .brand-mark { width: 70px; height: 70px; font-size: 1.4rem; }
.symposium-cover h1 { max-width: 940px; margin: 30px 0 16px; font-size: clamp(2.2rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
.symposium-cover p { max-width: 770px; color: rgba(255,255,255,.65); font-size: 1.1rem; }
.symposium-page h2 { margin: 0 0 8px; font-size: 2rem; }
.symposium-page > p { margin: 0 0 30px; color: var(--ink-500); }
.symposium-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.symposium-stat { padding: 20px; border-radius: 14px; background: #f3f6f8; }
.symposium-stat span { color: var(--ink-500); font-size: .75rem; }
.symposium-stat strong { display: block; margin-top: 6px; font-size: 2rem; color: var(--navy-900); }
.symposium-note { margin-top: 25px; border-left: 5px solid var(--yellow-500); padding: 15px 18px; background: #fff8e5; color: #65501c; border-radius: 0 12px 12px 0; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: grid; gap: 9px; width: min(390px, calc(100vw - 36px)); }
.toast { padding: 12px 14px; border-radius: 11px; background: var(--navy-950); color: #fff; box-shadow: 0 15px 35px rgba(7,29,50,.25); font-size: .76rem; animation: toastIn .22s ease; }
.toast.success { border-left: 5px solid var(--green-600); }
.toast.warning { border-left: 5px solid var(--yellow-500); }
.toast.error { border-left: 5px solid var(--red-600); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1500px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}
@media (max-width: 1160px) {
  :root { --sidebar-w: 228px; }
  .main { padding-inline: 20px; }
  .filterbar { grid-template-columns: repeat(2, 1fr); }
  .filter-reset { grid-column: span 2; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .metadata-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .mobile-only { display: grid; }
  .sidebar { transform: translateX(-105%); transition: transform .23s ease; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding-inline: 14px; }
  .topbar { min-height: 76px; }
  .storage-badge { display: none; }
  .filterbar { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-controls { grid-template-columns: 1fr 1fr; }
  .compare-vs { display: none; }
  .compare-controls > label:first-child, .compare-controls > button { grid-column: span 2; }
  .metadata-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-actions { flex-wrap: wrap; }
  .section-actions input { width: 100%; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .method-grid { grid-template-columns: 1fr; }
  .kiosk-kpis { grid-template-columns: repeat(2, 1fr); }
  .kiosk-header { padding: 14px; }
  .kiosk-stage { padding: 20px; }
  .kiosk-controls { padding-inline: 14px; }
  .symposium-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .topbar-actions .button { padding: 9px 11px; }
  .topbar-actions .button::first-letter { font-size: 0; }
  .filterbar { grid-template-columns: 1fr; }
  .filter-reset { grid-column: auto; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card { min-height: 118px; padding: 13px; }
  .kpi-value { font-size: 1.25rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .inline-select { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
  .kiosk-kpis { grid-template-columns: 1fr 1fr; }
  .kiosk-kpi strong { font-size: 2rem; }
  .kiosk-bar-row { grid-template-columns: 1fr; gap: 5px; }
  .kiosk-bar-row strong { width: auto; text-align: left; }
  .kiosk-controls { grid-template-columns: auto auto 1fr auto auto; gap: 5px; }
  .kiosk-controls button { padding: 7px 9px; }
  .symposium-toolbar { align-items: flex-start; flex-direction: column; }
  .symposium-document { width: calc(100% - 20px); margin: 10px auto; }
  .symposium-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .filterbar, .privacy-notice, .footer, .symposium-toolbar, .toast-region { display: none !important; }
  .main { margin: 0; padding: 0; }
  .view { display: none !important; }
  .symposium-overlay.open { position: static; display: block; overflow: visible; background: #fff; }
  .symposium-document { width: 100%; margin: 0; gap: 0; }
  .symposium-cover, .symposium-page { min-height: 100vh; border-radius: 0; box-shadow: none; page-break-after: always; }
}


/* ==========================================================
   Identidade visual Seconci-SP — alinhada ao painel ssoseconci
   ========================================================== */
:root {
  --navy-950: #005762;
  --navy-900: #006f7d;
  --navy-800: #008391;
  --navy-700: #0097a9;
  --blue-600: #0097a9;
  --yellow-500: #f47721;
  --yellow-400: #ff9a55;
  --orange-500: #f47721;
  --green-600: #16835f;
  --teal-500: #0097a9;
  --ink-900: #17252c;
  --ink-700: #52656d;
  --ink-500: #72838a;
  --line: #dce5e8;
  --surface-soft: #f5f8f9;
  --background: #edf3f4;
  --shadow: 0 12px 32px rgba(18,45,55,.09);
}
body::before {
  content:"";
  position:fixed;
  inset:0 0 auto 0;
  height:5px;
  z-index:1000;
  background:linear-gradient(90deg,#0097a9 0 72%,#f47721 72% 100%);
}
body { background:var(--background); color:var(--ink-900); }
.sidebar {
  top:5px;
  background:#fff;
  color:var(--ink-900);
  border-right:1px solid var(--line);
  box-shadow:10px 0 28px rgba(18,45,55,.07);
  padding:18px 16px;
}
.brand {
  display:block;
  padding:4px 6px 22px;
  border-bottom:1px solid var(--line);
  margin-bottom:14px;
}
.brand-logo { display:block; width:min(205px,100%); height:auto; margin:0 auto 12px; }
.brand-copy { text-align:left; }
.brand-copy strong { color:var(--ink-900); font-size:.95rem; }
.brand-copy span { color:var(--ink-500); font-size:.72rem; }
.nav { gap:5px; }
.nav-item { color:var(--ink-700); }
.nav-item span { color:var(--brand-orange,#f47721); }
.nav-item:hover { background:#f5f8f9; color:#006f7d; }
.nav-item.active {
  color:#006f7d;
  background:#e9f7f8;
  box-shadow:inset 3px 0 0 #0097a9;
}
.sidebar-actions { margin-top:22px; }
.button-kiosk { background:#f47721; color:#fff; }
.button-kiosk:hover { background:#c9530c; }
.button-ghost-light { border-color:var(--line); color:#006f7d; background:#fff; }
.button-ghost-light:hover { background:#f5f8f9; }
.privacy-stamp { border-color:#cfe4e7; background:#f4fbfb; }
.privacy-stamp strong { color:#006f7d; }
.privacy-stamp span { color:var(--ink-500); }
.main { padding-top:5px; }
.topbar {
  min-height:82px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  padding:15px 18px;
  margin:0 -28px 18px;
  box-shadow:0 1px 2px rgba(18,45,55,.04);
}
.topbar h1 { color:var(--ink-900); }
.button-primary { background:#0097a9; box-shadow:0 7px 18px rgba(0,151,169,.20); }
.button-primary:hover { background:#006f7d; }
.button-secondary { color:#17252c; }
.filterbar,.card,.kpi-card { box-shadow:0 1px 2px rgba(18,45,55,.06); }
.filterbar { border-radius:16px; }
.kpi-card { border-radius:16px; }
.kpi-card::after { background:var(--kpi-soft,#e9f7f8); }
.card { border-radius:16px; }
.metric-chip { background:#e9f7f8; color:#006f7d; }
.empty-icon { background:#e9f7f8; color:#006f7d; box-shadow:none; }
.empty-state { background:radial-gradient(circle at top,#fff 0,#f7fbfb 58%,#edf3f4 100%); border-color:#b9ced3; }
input:focus,select:focus { border-color:#0097a9; box-shadow:0 0 0 3px rgba(0,151,169,.14); }
.status-dot { background:#16835f; box-shadow:0 0 0 4px rgba(22,131,95,.12); }
.kiosk-overlay { background:linear-gradient(135deg,#005762,#006f7d 55%,#0097a9); }
.kiosk-header { border-bottom-color:rgba(255,255,255,.18); }
.kiosk-logo-shell { display:grid; place-items:center; width:190px; min-height:64px; padding:8px 12px; background:#fff; border-radius:12px; }
.kiosk-logo-shell img { max-width:100%; max-height:52px; object-fit:contain; }
.kiosk-kpi strong { color:#ffb078; }
.kiosk-bar-track i { background:linear-gradient(90deg,#ffb078,#f47721,#c63d3d); }
.kiosk-progress div { background:#f47721; }
.symposium-cover {
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#005762,#006f7d 60%,#0097a9);
}
.symposium-cover::before { content:""; position:absolute; inset:0 0 auto 0; height:8px; background:#f47721; }
.symposium-brand { width:240px; padding:12px 16px; background:#fff; border-radius:14px; }
.symposium-brand img { display:block; width:100%; height:auto; }
.symposium-stat strong { color:#006f7d; }
.symposium-note { border-left-color:#f47721; background:#fff3e9; color:#7a431c; }
.footer { border-top:1px solid var(--line); margin-top:22px; }
@media (max-width:820px) {
  .sidebar { top:5px; }
  .topbar { margin:0 -16px 14px; padding:13px 16px; }
  .brand-logo { width:180px; }
}
@media print {
  body::before { display:none; }
}


/* v1.0.3 — menu sem barra visível e classificação automática de segmentos */
.sidebar {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
@media (min-height: 720px) {
  .sidebar { padding-top: 15px; padding-bottom: 15px; }
  .brand { padding-bottom: 15px; margin-bottom: 10px; }
  .brand-logo { max-height: 72px; width: auto; max-width: 100%; }
  .nav { gap: 3px; }
  .nav-item { padding-top: 9px; padding-bottom: 9px; }
  .sidebar-actions { margin-top: 12px; gap: 6px; }
  .privacy-stamp { padding: 10px 12px; }
}
.import-privacy-note {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #b8dfe3;
  border-radius: 11px;
  background: #f0fbfc;
}
.import-privacy-note strong { color: #006f7d; font-size: .78rem; }
.import-privacy-note span { color: var(--ink-700); font-size: .68rem; }
.selected-file-detailed {
  grid-template-columns: auto minmax(145px,1fr) minmax(210px,280px) auto;
  padding: 10px 11px;
}
.selected-file-copy small { display: inline-flex; margin-top: 5px; border-radius: 999px; padding: 3px 7px; font-size: .59rem; font-weight: 800; }
.inference-status.pending { background: #eef2f5; color: #677583; }
.inference-status.high { background: #e4f5ee; color: #176b4d; }
.inference-status.medium { background: #fff5d8; color: #805b00; }
.inference-status.low { background: #fff0e6; color: #9a4e18; }
.file-segment-field { min-width: 0; }
.file-segment-field > span { margin-bottom: 4px; color: var(--ink-500); font-size: .58rem; font-weight: 750; }
.file-segment-field select { width: 100%; min-height: 35px; padding: 6px 8px; font-size: .68rem; }
@media (max-width: 720px) {
  .selected-file-detailed { grid-template-columns: auto 1fr auto; }
  .file-segment-field { grid-column: 1 / -1; }
}

/* v1.0.4 — medidas de controle e revisão nominal restrita à importação */
.modal-xl { width: min(1180px, calc(100vw - 28px)); }
.company-import-name { color: var(--ink-900) !important; font-size: .76rem !important; font-weight: 850; line-height: 1.25; }
.company-import-file { color: var(--ink-500) !important; font-size: .61rem !important; word-break: break-word; }
.controls-preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}
.controls-preview-summary.hidden, .controls-review-toolbar.hidden { display: none; }
.controls-preview-stat { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #fff; }
.controls-preview-stat span { display: block; color: var(--ink-500); font-size: .61rem; font-weight: 750; }
.controls-preview-stat strong { display: block; margin-top: 3px; color: #006f7d; font-size: 1rem; }
.controls-review-toolbar {
  display: grid;
  grid-template-columns: minmax(180px,240px) minmax(240px,1fr);
  gap: 10px;
  align-items: end;
  margin: 12px 0 8px;
}
.controls-company-review {
  display: grid;
  gap: 7px;
  max-height: 42vh;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.control-company-row {
  display: grid;
  grid-template-columns: minmax(250px,1.3fr) minmax(200px,.8fr) minmax(210px,.8fr);
  gap: 11px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 11px;
  background: #fff;
}
.control-company-row.needs-review { border-color: #f0c36d; background: #fffdf7; }
.control-company-copy strong { display: block; font-size: .72rem; line-height: 1.25; }
.control-company-copy span { display: block; margin-top: 3px; color: var(--ink-500); font-size: .61rem; }
.control-company-row label > span { font-size: .57rem; }
.control-company-row select { width: 100%; min-height: 34px; padding: 5px 7px; font-size: .67rem; }
.control-confidence { justify-self: end; text-align: right; }
.control-confidence small { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-weight: 800; font-size: .58rem; }
.control-confidence .high { background: #e4f5ee; color: #176b4d; }
.control-confidence .medium { background: #fff5d8; color: #805b00; }
.control-confidence .low { background: #fff0e6; color: #9a4e18; }
.control-confidence p { margin: 4px 0 0; color: var(--ink-500); font-size: .57rem; }
.control-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 11px; color: var(--ink-500); text-align: center; }
.controls-heat-value { display: inline-flex; min-width: 52px; justify-content: center; border-radius: 7px; padding: 5px 7px; font-weight: 850; }
.controls-heat-high { background: #dff4eb; color: #176b4d; }
.controls-heat-mid { background: #fff3cf; color: #7a5700; }
.controls-heat-low { background: #fde8e6; color: #9a302b; }
@media (max-width: 800px) {
  .controls-preview-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .controls-review-toolbar { grid-template-columns: 1fr; }
  .control-company-row { grid-template-columns: 1fr; }
  .control-confidence { justify-self: start; text-align: left; }
}

/* v1.0.5 — identificação nominal temporária e validação obrigatória de segmentos */
.survey-review-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #b8dfe3;
  border-radius: 11px;
  background: rgba(240,251,252,.97);
  box-shadow: 0 5px 14px rgba(0,111,125,.08);
}
.survey-review-toolbar.hidden { display: none; }
.survey-review-toolbar > div { min-width: 0; }
.survey-review-toolbar strong { display: block; color: #006f7d; font-size: .73rem; }
.survey-review-toolbar span { display: block; margin-top: 2px; color: var(--ink-600); font-size: .62rem; }
.button-small { min-height: 34px; padding: 7px 11px; font-size: .65rem; white-space: nowrap; }
.selected-files { max-height: 48vh; overflow: auto; padding-right: 3px; scrollbar-width: thin; }
.selected-file-detailed.segment-validated { border-color: #8fd0b7; background: #fbfffd; }
.file-segment-review { display: grid; gap: 7px; min-width: 0; }
.segment-validation-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid #c7ddd3;
  border-radius: 8px;
  background: #f2fbf7;
  color: #176b4d;
  cursor: pointer;
}
.segment-validation-check.disabled { border-color: var(--line); background: #f5f7f9; color: var(--ink-500); cursor: not-allowed; }
.segment-validation-check input { width: 15px; height: 15px; margin: 0; accent-color: #16835f; }
.segment-validation-check span { color: inherit !important; font-size: .6rem !important; font-weight: 800; }
.company-detection-warning { display: block !important; margin-top: 5px; color: #9a4e18 !important; font-size: .58rem !important; }
#processImportBtn:disabled { opacity: .48; cursor: not-allowed; }
@media (max-width: 720px) {
  .survey-review-toolbar { position: static; align-items: stretch; flex-direction: column; }
  .survey-review-toolbar .button-small { width: 100%; }
  .selected-files { max-height: none; overflow: visible; }
}
.company-import-label { display: block !important; margin-bottom: 2px; color: #006f7d !important; font-size: .55rem !important; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
