:root {
  color-scheme: light;
  --bg: oklch(0.974 0.006 255);
  --bg-soft: oklch(0.953 0.008 255);
  --panel: oklch(0.994 0.004 255);
  --panel-soft: oklch(0.982 0.005 255);
  --panel-raised: oklch(0.999 0.003 255);
  --line: oklch(0.895 0.012 255);
  --line-soft: oklch(0.934 0.009 255);
  --line-strong: oklch(0.82 0.015 255);
  --text: oklch(0.235 0.018 255);
  --text-strong: oklch(0.17 0.017 255);
  --muted: oklch(0.54 0.018 255);
  --muted-soft: oklch(0.67 0.014 255);
  --accent: oklch(0.56 0.17 250);
  --accent-hover: oklch(0.5 0.18 252);
  --accent-soft: oklch(0.952 0.034 250);
  --accent-strong: oklch(0.48 0.19 253);
  --success: oklch(0.48 0.11 155);
  --success-soft: oklch(0.955 0.035 155);
  --warning: oklch(0.58 0.105 78);
  --warning-soft: oklch(0.962 0.04 85);
  --danger: oklch(0.55 0.145 28);
  --danger-soft: oklch(0.952 0.035 28);
  --critical: oklch(0.47 0.16 28);
  --purple: oklch(0.52 0.11 285);
  --purple-soft: oklch(0.955 0.03 285);
  --shadow-soft: 0 1px 2px oklch(0.24 0.02 255 / 0.04), 0 14px 34px oklch(0.24 0.02 255 / 0.06);
  --shadow-panel: 0 1px 2px oklch(0.24 0.02 255 / 0.035), 0 8px 20px oklch(0.24 0.02 255 / 0.045);
  --focus-ring: 0 0 0 3px oklch(0.73 0.09 254 / 0.22);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  background:
    linear-gradient(180deg, oklch(0.99 0.004 255), oklch(0.955 0.01 255)),
    var(--bg);
}

.login-visual {
  padding: 72px clamp(48px, 7vw, 112px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-strong);
  background:
    linear-gradient(90deg, oklch(0.985 0.006 255), oklch(0.965 0.01 255)),
    var(--panel);
  border-right: 1px solid var(--line-soft);
}

.login-visual h1 {
  max-width: 720px;
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 720;
}

.login-brandline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--accent);
  font-weight: 720;
}

.login-brandline img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 18px oklch(0.42 0.17 250 / 0.16), 0 1px 2px oklch(0.24 0.02 255 / 0.08);
}

.login-visual p {
  max-width: 640px;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.login-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: oklch(0.994 0.004 255 / 0.84);
  box-shadow: var(--shadow-panel);
}

.login-metric strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 720;
  color: var(--text-strong);
}

.login-metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 48px;
  background: var(--panel);
}

.login-box {
  width: 100%;
}

.login-box h2 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.login-box p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.65;
}

.account-hint {
  margin-top: 18px;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, oklch(0.988 0.004 255), var(--bg) 260px),
    var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 68px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: oklch(0.992 0.004 255 / 0.96);
  box-shadow: 0 1px 2px oklch(0.24 0.02 255 / 0.035);
}

.site-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 7px 16px oklch(0.42 0.17 250 / 0.14), 0 1px 2px oklch(0.24 0.02 255 / 0.08);
}

.site-brand strong {
  display: block;
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 760;
  white-space: nowrap;
}

.site-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.primary-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.nav-button {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: oklch(0.43 0.018 255);
  font-size: 14px;
  font-weight: 650;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, box-shadow 180ms ease-out;
}

.nav-button:hover {
  background: oklch(0.968 0.015 250);
  border-color: var(--line);
  color: var(--text-strong);
}

.nav-button.active {
  background: linear-gradient(180deg, oklch(0.62 0.17 243), var(--accent-strong));
  border-color: oklch(0.52 0.17 250);
  color: oklch(0.985 0.004 255);
  box-shadow: 0 8px 18px oklch(0.42 0.17 250 / 0.14), 0 1px 2px oklch(0.24 0.02 255 / 0.08);
}

.account-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.account-area strong {
  color: var(--accent);
  font-size: 14px;
  font-weight: 720;
}

.account-area span {
  display: block;
  margin-top: 2px;
}

.main {
  min-width: 0;
  width: min(100%, 1840px);
  margin: 0 auto;
  padding: 32px 30px 42px;
}

.page-head {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: 0;
}

.page-head h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 760;
}

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

.month-filter,
.team-filter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px 0 11px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: 0 1px 2px oklch(0.24 0.02 255 / 0.03);
}

.month-filter span,
.team-filter span {
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.month-filter select,
.team-filter select {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.section-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.scope-filter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  background: var(--panel);
  box-shadow: 0 1px 2px oklch(0.24 0.02 255 / 0.03);
}

.scope-button {
  min-height: 28px;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  transition: background-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}

.scope-button:hover {
  color: var(--text-strong);
  background: var(--panel-soft);
}

.scope-button.active {
  background: var(--text-strong);
  color: oklch(0.985 0.004 255);
  box-shadow: 0 1px 2px oklch(0.24 0.02 255 / 0.06);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

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

.insight-panel {
  position: sticky;
  top: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow-panel);
}

.panel,
.metric,
.table-panel,
.form-panel,
.notice {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}

.panel,
.table-panel,
.form-panel {
  margin-bottom: 16px;
}

.panel {
  padding: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 680;
}

.section-offset {
  margin-top: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.annual-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.metric {
  position: relative;
  min-height: 88px;
  padding: 13px 14px;
  background: linear-gradient(180deg, var(--panel-raised), var(--panel));
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.metric strong {
  display: block;
  margin-top: 7px;
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 700;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.metric .num {
  font-size: inherit;
}

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

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

.team-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.team-list {
  display: grid;
  gap: 8px;
}

.team-row {
  display: grid;
  grid-template-columns: 132px minmax(420px, 720px) minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: oklch(0.99 0.004 255);
}

.team-name strong {
  display: block;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 720;
}

.team-name span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.team-data div,
.kpi-values div {
  min-width: 0;
}

.team-data span,
.kpi-values span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.team-data strong,
.kpi-values strong {
  display: block;
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 690;
}

.team-status {
  min-width: 0;
}

.team-status > div {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.team-status p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.kpi-card {
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.kpi-card .panel-header {
  margin-bottom: 10px;
}

.kpi-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.target-board,
.dashboard-section,
.calendar-strip,
.weekly-focus {
  margin-bottom: 16px;
}

.target-board,
.calendar-strip {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.calendar-strip {
  display: grid;
  gap: 12px;
  background:
    linear-gradient(180deg, oklch(0.998 0.003 255), var(--panel)),
    var(--panel);
}

.calendar-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.calendar-kicker {
  color: var(--accent);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 720;
}

.calendar-main h2 {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 730;
}

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

.calendar-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.calendar-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-raised);
}

.timeline-chip {
  min-height: 54px;
  padding: 10px 12px;
  border-right: 1px solid var(--line-soft);
  color: var(--muted);
  background: transparent;
}

.timeline-chip:last-child {
  border-right: 0;
}

.timeline-chip strong,
.timeline-chip span {
  display: block;
  line-height: 1.35;
}

.timeline-chip strong {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 730;
}

.timeline-chip span {
  margin-top: 3px;
  font-size: 12px;
  white-space: nowrap;
}

.timeline-chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px oklch(0.74 0.08 254 / 0.32);
}

.timeline-chip.active strong {
  color: var(--accent);
}

.calendar-weekly {
  padding: 9px 11px;
  border: 1px solid var(--warning-soft);
  border-radius: 8px;
  background: var(--warning-soft);
  color: oklch(0.42 0.075 78);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 680;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.section-title h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 720;
}

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

.target-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-raised);
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.progress-card,
.weekly-focus {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}

.target-card {
  min-height: 108px;
  padding: 14px 15px;
  border-right: 1px solid var(--line-soft);
  background: transparent;
}

.target-card:last-child {
  border-right: 0;
}

.target-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.target-label span,
.progress-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.target-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.target-dot.tone-success {
  background: var(--success);
}

.target-dot.tone-warning {
  background: var(--warning);
}

.target-dot.tone-danger {
  background: var(--danger);
}

.target-dot.tone-critical {
  background: var(--critical);
}

.target-dot.tone-info,
.target-dot.tone-blue {
  background: var(--accent);
}

.target-dot.tone-purple {
  background: var(--purple);
}

.target-card strong {
  display: block;
  margin-top: 10px;
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 760;
}

.target-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.progress-card {
  padding: 14px 15px;
  background: var(--panel);
}

.progress-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 12px;
}

.progress-main strong {
  color: var(--text-strong);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 760;
}

.progress-main span {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: oklch(0.925 0.009 255);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.progress-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.progress-meta span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.weekly-focus {
  padding: 14px;
}

.weekly-entry-grid {
  display: grid;
  gap: 16px;
}

.weekly-status-grid .panel p {
  margin: 8px 0 0;
}

.weekly-focus .section-title {
  margin-bottom: 12px;
}

.focus-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.focus-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.focus-item strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.focus-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
  border-bottom: 1px solid var(--line-soft);
}

.tab-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.tab-button:hover {
  color: var(--text-strong);
  background: var(--panel-soft);
}

.tab-button.active {
  border-color: var(--line-soft);
  background: var(--panel);
  color: var(--text-strong);
}

.progress-table-panel {
  overflow: auto;
}

.progress-table {
  min-width: 1360px;
}

.metric-mini {
  min-width: 158px;
}

.metric-mini div {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.metric-mini strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 760;
}

.metric-mini span,
.metric-mini small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.efficiency-card {
  min-height: 238px;
}

.compare-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.compare-line span {
  color: var(--muted);
  font-size: 12px;
}

.compare-line strong {
  color: var(--text-strong);
  font-weight: 720;
}

.table-panel {
  overflow: auto;
}

.sticky-review-table {
  max-height: min(68vh, 760px);
}

.sticky-review-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.sticky-review-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--line);
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: auto;
}

.compact-table {
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: anywhere;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

td {
  color: var(--text);
}

td small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

td strong {
  color: var(--text-strong);
  font-weight: 680;
}

tbody tr {
  transition: background-color 150ms ease-out;
}

tbody tr:hover {
  background: oklch(0.972 0.009 255);
}

tr:last-child td {
  border-bottom: 0;
}

.summary-table {
  min-width: 960px;
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  white-space: nowrap;
  overflow-wrap: normal;
}

.summary-table th:nth-child(1) {
  width: 86px;
}

.summary-table th:nth-child(4) {
  width: 68px;
}

.summary-table th:nth-child(8) {
  width: 130px;
}

.summary-table th:nth-child(9) {
  width: 112px;
}

.summary-table th:nth-child(10) {
  width: 142px;
}

.summary-table td:last-child {
  white-space: normal;
}

.num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.form-panel {
  padding: 16px;
}

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-spaced {
  margin-top: 12px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel-raised);
  color: var(--text);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out, background-color 160ms ease-out;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--panel);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled,
.field input[readonly] {
  cursor: not-allowed;
  background: var(--bg-soft);
  color: var(--muted);
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.decision-rules {
  margin-top: 12px;
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel-soft);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out, transform 160ms ease-out;
}

.btn:hover {
  background: var(--panel-raised);
  border-color: var(--line-strong);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.btn.primary {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: oklch(0.985 0.004 255);
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.file-upload {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid oklch(0.84 0.06 250);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}

.file-upload:hover {
  background: oklch(0.932 0.046 250);
  border-color: oklch(0.74 0.09 250);
}

.file-upload input {
  display: none;
}

.btn.success {
  background: var(--success);
  border-color: var(--success);
  color: oklch(0.985 0.006 155);
}

.btn.warn {
  background: var(--warning-soft);
  border-color: oklch(0.86 0.04 78);
  color: oklch(0.36 0.06 78);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: oklch(0.985 0.006 28);
}

.btn.link {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
}

.tone-success {
  background: var(--success-soft);
  border-color: oklch(0.9 0.035 155);
  color: var(--success);
}

.tone-warning {
  background: var(--warning-soft);
  border-color: oklch(0.9 0.035 85);
  color: var(--warning);
}

.tone-danger {
  background: var(--danger-soft);
  border-color: oklch(0.895 0.035 28);
  color: var(--danger);
}

.tone-critical {
  background: oklch(0.932 0.04 28);
  border-color: oklch(0.85 0.055 28);
  color: var(--critical);
}

.tone-info,
.tone-blue {
  background: var(--accent-soft);
  border-color: oklch(0.89 0.03 254);
  color: var(--accent);
}

.tone-purple {
  background: var(--purple-soft);
  border-color: oklch(0.89 0.035 285);
  color: var(--purple);
}

.notice {
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: none;
}

.insight-panel .notice {
  padding: 10px 0;
  margin-bottom: 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.insight-panel .notice:last-child {
  border-bottom: 0;
}

.notice strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 680;
}

.notice-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.todo-notice {
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 11px;
  border: 1px solid var(--line-soft);
}

.insight-panel .todo-notice {
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.todo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.todo-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.btn.compact {
  min-height: 29px;
  padding: 0 9px;
  font-size: 12px;
}

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

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

.empty-panel,
.template-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.empty-panel {
  margin-bottom: 16px;
  box-shadow: var(--shadow-panel);
}

.template-panel {
  padding: 14px;
}

.template-panel table {
  min-width: 0;
}

.template-panel td {
  padding: 8px 10px;
}

.preview-head {
  padding: 16px 16px 4px;
}

.row-index,
.col-xs {
  width: 64px;
}

.col-sm {
  width: 104px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  max-width: 360px;
  border: 1px solid oklch(0.28 0.02 255);
  border-radius: 8px;
  padding: 12px 14px;
  background: oklch(0.22 0.02 255);
  color: oklch(0.985 0.004 255);
  box-shadow: var(--shadow-soft);
}

.muted {
  color: var(--muted);
}

.mini {
  font-size: 12px;
  line-height: 1.45;
}

.split-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: oklch(0.92 0.01 255);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

@media (max-width: 1480px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .insight-panel {
    position: static;
  }

  .dashboard-lower {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  }

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

  .team-status {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-button {
    width: auto;
    justify-content: center;
  }

  .account-area {
    padding-top: 10px;
    justify-content: flex-start;
  }

  .main {
    padding: 18px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .grid-2,
  .grid-3,
  .form-grid,
  .dashboard-metrics,
  .target-grid,
  .dashboard-lower,
  .progress-grid,
  .focus-list,
  .kpi-band {
    grid-template-columns: 1fr;
  }

  .target-card {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .target-card:last-child {
    border-bottom: 0;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-tabs {
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .dashboard-tabs::-webkit-scrollbar {
    display: none;
  }

  .calendar-main {
    flex-direction: column;
  }

  .calendar-status {
    justify-content: flex-start;
  }

  .calendar-timeline {
    grid-template-columns: 1fr;
  }

  .timeline-chip {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .timeline-chip:last-child {
    border-bottom: 0;
  }

  .tab-button {
    flex: 0 0 auto;
  }

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

  .team-status {
    grid-column: auto;
  }

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

  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 360px;
    padding: 44px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .login-visual h1 {
    font-size: 34px;
  }

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

  .login-panel {
    padding: 32px 28px;
  }
}

@media (max-width: 560px) {
  .login-metrics {
    grid-template-columns: 1fr;
  }

  .topbar-meta,
  .form-actions,
  .split-actions {
    width: 100%;
  }

  .month-filter,
  .team-filter {
    width: 100%;
    justify-content: space-between;
  }

  .scope-filter {
    width: 100%;
  }

  .scope-button {
    flex: 1 1 0;
  }

  .btn {
    width: 100%;
  }
}
