:root {
  color-scheme: light;
  --brand-900: #00004b;
  --brand-700: #005aaa;
  --brand-500: #00a5eb;
  --brand-100: #e9f7ff;
  --brand-050: #f6fbff;
  --ink: #101827;
  --muted: #6f7a8a;
  --line: #d8e7f4;
  --surface: #ffffff;
  --surface-blue: #f0f9ff;
  --green: #17b890;
  --green-soft: #e7fbf5;
  --yellow: #ffaa00;
  --yellow-soft: #fff7df;
  --red: #e60000;
  --red-soft: #fff0f0;
  --shadow: 0 14px 36px rgba(0, 90, 170, 0.12);
  --shadow-soft: 0 8px 18px rgba(0, 90, 170, 0.1);
  --radius: 8px;
  --fast: 160ms ease;
  --bouncy: cubic-bezier(0.2, 1.6, 0.3, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--brand-050);
  color: var(--ink);
  font-family:
    "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Meiryo", system-ui,
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

input[type="file"] {
  font-size: 12px;
}

button {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--brand-900);
}

.loading-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: white;
  padding: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.loading-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--brand-900);
  color: white;
  padding: 18px 12px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: white;
  padding: 6px;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.brand-text span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  color: rgba(255, 255, 255, 0.74);
  display: flex;
  align-items: center;
  gap: 10px;
  width: 42px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0;
  justify-content: center;
  font-size: 13px;
  background: transparent;
  transition: transform var(--fast), background var(--fast), color var(--fast);
}

.nav-item span {
  display: none;
}

.nav-item.is-active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  transform: translateX(2px);
}

.nav-icon,
.button-icon,
.tiny-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.sidebar-foot {
  display: none;
}

.sidebar-foot span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.sidebar-foot strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.main {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  padding: 20px 22px 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.top-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.status-bubble {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand-700);
  box-shadow: var(--shadow-soft);
}

.top-title h1 {
  margin: 0;
  color: var(--brand-900);
  font-size: 24px;
  line-height: 1.15;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toggle,
.primary-button,
.ghost-button,
.mini-button {
  min-height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.toggle {
  padding: 0 11px;
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--line);
  transition: transform var(--fast), background var(--fast), border var(--fast);
}

.icon-only {
  width: 38px;
  padding: 0;
}

.toggle.is-on {
  background: var(--brand-900);
  color: white;
  border-color: var(--brand-900);
}

.primary-button {
  padding: 0 14px;
  background: var(--brand-700);
  color: white;
  box-shadow: 0 10px 20px rgba(0, 90, 170, 0.22);
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast);
}

.primary-button:hover {
  background: var(--brand-900);
  box-shadow: 0 14px 24px rgba(0, 90, 170, 0.26);
}

.ghost-button {
  padding: 0 12px;
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--line);
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 12px;
  border-radius: 12px;
}

.primary-button:active,
.ghost-button:active,
.toggle:active,
.mini-button:active,
.score-button:active {
  transform: translateY(1px) scale(0.98);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 236px;
  gap: 18px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.page-view {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
}

.page-view > .panel {
  min-height: 0;
  overflow: auto;
}

.master-layout {
  min-height: 0;
  display: grid;
  align-items: start;
  max-width: 760px;
}

.master-panel {
  display: grid;
  gap: 18px;
}

.master-actions {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.field-line {
  display: grid;
  gap: 6px;
  color: var(--brand-900);
  font-size: 12px;
  font-weight: 800;
}

.field-line input {
  min-height: 38px;
  width: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--brand-900);
  background: white;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.master-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.compact-audit {
  max-width: 640px;
}

.screen-grid,
.exchange-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  gap: 18px;
}

.screen-grid > .panel,
.exchange-grid > .panel,
.analysis-layout > .panel,
.analysis-layout > .left-stack {
  min-height: 0;
}

.screen-grid {
  grid-template-columns: 280px minmax(0, 1fr);
}

.analysis-layout {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.analysis-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.analysis-body {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(180px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.radar-card {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.radar-chart {
  width: min(100%, 360px);
  height: auto;
}

.radar-ring {
  fill: none;
  stroke: #d8e7f4;
  stroke-width: 1;
}

.radar-axis {
  stroke: #e6f1fa;
  stroke-width: 1;
}

.radar-current {
  fill: rgba(0, 165, 235, 0.2);
  stroke: var(--brand-500);
  stroke-width: 3;
}

.radar-previous {
  fill: rgba(0, 0, 75, 0.08);
  stroke: rgba(0, 0, 75, 0.42);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.radar-label {
  fill: var(--brand-900);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.radar-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.radar-legend span::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 999px;
}

.legend-current::before {
  background: var(--brand-500);
}

.legend-previous::before {
  background: rgba(0, 0, 75, 0.42);
}

.analysis-summary {
  display: grid;
  gap: 10px;
}

.analysis-table {
  border-top: 1px solid var(--line);
  flex: 1;
  min-height: 0;
}

.exchange-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  overflow: auto;
}

.screen-controls,
.ranking-panel,
.analysis-panel {
  min-height: 0;
}

.screen-controls {
  overflow: auto;
}

.screen-controls-body,
.exchange-box {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.exchange-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.exchange-box.compact {
  gap: 14px;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--brand-900);
}

.ranking-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-scroll {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--brand-050);
  color: var(--muted);
  font-weight: 800;
}

.table-link {
  padding: 0;
  background: transparent;
  color: var(--brand-700);
  font-weight: 800;
}

.table-empty {
  height: 160px;
  text-align: center;
  color: var(--muted);
}

.left-stack,
.center-stack,
.right-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.left-stack,
.center-stack {
  grid-template-rows: minmax(0, 1fr);
}

.right-stack {
  grid-template-rows: minmax(340px, 1fr) auto;
  align-content: stretch;
}

.employee-stack .panel-header {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

.employee-stack .tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.employee-stack .tab {
  min-width: 0;
  padding: 0 4px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 90, 170, 0.06);
  overflow: hidden;
}

.left-stack > .panel,
.center-stack > .panel,
.right-stack > .panel:first-child {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  color: var(--brand-900);
  font-size: 15px;
}

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

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.tab {
  min-height: 36px;
  border-radius: 14px;
  padding: 0 12px;
  background: var(--brand-100);
  color: var(--brand-700);
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  transition: transform var(--fast), background var(--fast), color var(--fast);
}

.tab.is-active {
  background: var(--brand-900);
  color: white;
}

.controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-050);
}

.block-picker {
  display: grid;
  gap: 4px;
  min-width: 112px;
  width: 100%;
}

.block-picker span {
  color: var(--muted);
  font-size: 10px;
}

.block-picker select {
  width: 100%;
  min-height: 32px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--brand-900);
  font-weight: 700;
  font-size: 12px;
  outline: 0;
  padding: 0 28px 0 9px;
}

.store-picker select {
  min-height: 36px;
}

.employee-list {
  display: grid;
  flex: 0 0 auto;
  min-height: 0;
  max-height: 270px;
  overflow: auto;
  overscroll-behavior: contain;
}

.employee-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 12px 9px 14px;
  background: white;
  color: inherit;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background var(--fast), box-shadow var(--fast);
}

.employee-item:hover,
.employee-item.is-selected {
  background: var(--brand-050);
}

.employee-item.is-selected {
  box-shadow: inset 3px 0 0 var(--brand-500);
}

.status-dot {
  min-width: 30px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.quiet-count {
  padding: 10px 14px;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 38px;
  border-radius: 14px;
  border: 1px solid var(--line);
  outline: 0;
  background: white;
  color: var(--ink);
  transition: border var(--fast), box-shadow var(--fast);
}

.search-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(0, 165, 235, 0.14);
}

.select-like {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  color: var(--brand-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 13px;
}

.employee-table {
  width: 100%;
  border-collapse: collapse;
}

.employee-table th,
.employee-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
  vertical-align: middle;
}

.employee-table th {
  color: var(--muted);
  font-weight: 700;
  background: white;
}

.employee-table tbody tr {
  transition: background var(--fast), transform var(--fast);
}

.employee-table tbody tr:hover,
.employee-table tbody tr.is-selected {
  background: var(--surface-blue);
}

.employee-table tbody tr.is-selected {
  box-shadow: inset 4px 0 0 var(--brand-500);
}

.employee-name {
  display: grid;
  gap: 3px;
}

.employee-name strong {
  color: var(--ink);
  font-size: 13px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
}

.status-ok {
  background: var(--green-soft);
  color: #087d62;
}

.status-warn {
  background: var(--yellow-soft);
  color: #8b5a00;
}

.status-error {
  background: var(--red-soft);
  color: var(--red);
}

.progress-mini {
  height: 8px;
  border-radius: 999px;
  background: #edf4fa;
  overflow: hidden;
  min-width: 86px;
}

.progress-mini span {
  display: block;
  height: 100%;
  width: var(--progress);
  background: linear-gradient(90deg, var(--brand-500), var(--green));
  border-radius: inherit;
  transition: width 280ms var(--bouncy);
}

.eval-progress {
  display: grid;
  gap: 7px;
  padding: 10px 16px 11px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.eval-progress-line {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf4fa;
}

.eval-progress-fill {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-500), var(--green));
}

.eval-progress-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.eval-progress-meta strong {
  color: var(--brand-900);
  font-size: 14px;
}

.progress-ok {
  color: #087d62;
}

.progress-warn {
  color: #8b5a00;
}

.eval-profile {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: white;
  font-size: 20px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

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

.profile-main h2 {
  margin: 0;
  color: var(--brand-900);
  font-size: 19px;
  line-height: 1.2;
}

.profile-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.item-groups {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.group {
  border-bottom: 1px solid var(--line);
}

.group:last-child {
  border-bottom: 0;
}

.group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(246, 251, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.group-full-button {
  min-height: 26px;
  padding: 0 9px;
  font-size: 11px;
  border-radius: 11px;
}

.group-title strong {
  color: var(--brand-900);
  font-size: 13px;
}

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

.eval-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #edf4fa;
  transition: background var(--fast);
}

.eval-row:last-child {
  border-bottom: 0;
}

.eval-row:hover {
  background: var(--brand-050);
}

.row-number {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-100);
  color: var(--brand-700);
  font-weight: 800;
  font-size: 12px;
  padding: 0;
}

.criteria-trigger:hover,
.criteria-trigger:focus-visible {
  background: var(--brand-700);
  color: white;
  outline: 0;
}

.eval-copy {
  min-width: 0;
}

.eval-copy strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.eval-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.score-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.range-score {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 112px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-input {
  width: 74px;
  height: 36px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: white;
  color: var(--brand-900);
  text-align: center;
  font-weight: 900;
  outline: 0;
  box-shadow: 0 2px 8px rgba(0, 90, 170, 0.06);
}

.score-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(0, 165, 235, 0.14);
}

.score-button {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--brand-700);
  border: 1px solid var(--line);
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 90, 170, 0.06);
  transition: transform 150ms var(--bouncy), background var(--fast), color var(--fast),
    border var(--fast), box-shadow var(--fast);
}

.score-button:hover {
  transform: translateY(-2px);
  border-color: var(--brand-500);
}

.score-button.is-active {
  background: var(--brand-900);
  color: white;
  border-color: var(--brand-900);
  box-shadow: 0 9px 18px rgba(0, 0, 75, 0.18);
}

.score-button.is-active::after {
  content: "";
  position: absolute;
}

.summary-card {
  flex: 1;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.progress-ring {
  --ring: 0deg;
  width: 132px;
  height: 132px;
  margin: 4px auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, white 0 57%, transparent 58%),
    conic-gradient(var(--brand-500) var(--ring), #e7f2fb 0deg);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft);
}

.progress-ring strong {
  display: block;
  color: var(--brand-900);
  font-size: 27px;
  text-align: center;
}

.progress-ring span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.metric {
  border-radius: var(--radius);
  background: var(--brand-050);
  border: 1px solid var(--line);
  min-height: 38px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric strong {
  display: block;
  margin-top: 0;
  color: var(--brand-900);
  font-size: 17px;
}

.list {
  padding: 8px 12px 12px;
  display: grid;
  gap: 8px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--brand-050);
  border: 1px solid transparent;
}

.list-row.rank-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.list-row strong {
  color: var(--ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.rank-badge {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-weight: 900;
  font-size: 12px;
}

.error-list {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.error-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--yellow-soft);
  color: #755000;
  font-size: 12px;
  line-height: 1.45;
}

.error-row.ok {
  background: var(--green-soft);
  color: #087d62;
}

.export-box {
  padding: 12px 14px 14px;
  display: grid;
  gap: 8px;
}

.export-box p,
.audit p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.audit {
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.audit-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.audit-row span {
  color: var(--muted);
}

.audit-row strong {
  color: var(--brand-900);
  text-align: right;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--brand-900);
  color: white;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
}

.criteria-overlay {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 75, 0.22);
}

.criteria-modal {
  width: min(680px, 100%);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow);
}

.criteria-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.criteria-head span,
.criteria-source {
  color: var(--muted);
  font-size: 11px;
}

.criteria-head h2 {
  margin: 4px 0 0;
  color: var(--brand-900);
  font-size: 18px;
  line-height: 1.35;
}

.criteria-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: 20px;
  line-height: 1;
}

.criteria-body {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 18px;
}

.criteria-point {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.criteria-levels {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.criteria-level,
.criteria-fallback {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-050);
}

.criteria-score {
  min-height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-900);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.criteria-texts {
  display: grid;
  gap: 5px;
}

.criteria-texts p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

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

.criteria-fallback strong {
  color: var(--brand-900);
  font-size: 13px;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.tiny-note {
  color: var(--muted);
  font-size: 11px;
}

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.motion-on .toast {
  transition: opacity var(--fast), transform 260ms var(--bouncy);
}

.motion-on .primary-button.is-saved {
  animation: saveBounce 520ms var(--bouncy);
}

body:not(.motion-on) *,
body:not(.motion-on) *::before,
body:not(.motion-on) *::after {
  animation: none !important;
  transition: none !important;
}

@keyframes softIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes saveBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-4px) scale(1.04);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
    height: auto;
    overflow: visible;
  }

  .brand-text,
  .nav-item span,
  .sidebar-foot {
    display: none;
  }

  .sidebar {
    padding: 18px 12px;
    align-items: center;
  }

  .nav-item {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
    flex: initial;
    min-height: auto;
    align-items: start;
  }

  .screen-grid,
  .exchange-grid,
  .analysis-layout {
    grid-template-columns: 1fr;
  }

  .analysis-body {
    grid-template-columns: 1fr;
  }

  .right-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .left-stack,
  .center-stack,
  .right-stack {
    grid-template-rows: auto;
  }

  .left-stack > .panel,
  .center-stack > .panel,
  .right-stack > .panel:first-child {
    min-height: initial;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 12px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    max-width: calc(100vw - 78px);
  }

  .main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 14px 12px 22px;
  }

  .topbar,
  .panel-header,
  .eval-profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .profile-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .workspace,
  .right-stack {
    grid-template-columns: 1fr;
  }

  .controls-row {
    grid-template-columns: 1fr;
  }

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

  .employee-table th:nth-child(3),
  .employee-table td:nth-child(3),
  .employee-table th:nth-child(4),
  .employee-table td:nth-child(4) {
    display: none;
  }

  .eval-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .score-buttons {
    grid-column: 2;
  }

  .range-score {
    grid-column: 2;
    justify-content: flex-start;
  }

  .item-groups {
    max-height: none;
  }

  .criteria-overlay {
    padding: 12px;
    place-items: end center;
  }

  .criteria-modal {
    max-height: 86vh;
  }

  .criteria-head {
    padding: 14px;
  }

  .criteria-body {
    padding: 14px;
  }
}
