:root {
  --teal: #008075;
  --teal-deep: #004d47;
  --teal-mid: #00a896;
  --teal-soft: #e6f4f2;

  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-dim: #f6f8fa;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #9ca3af;
  --line: rgba(17, 24, 39, 0.07);
  --danger: #ef4444;
  --up: #008075;
  --down: #ef4444;

  --sidebar: 248px;
  --sidebar-collapsed: 56px;
  --header: 48px;
  --pad: 12px;
  --radius: 16px;
  --radius-sm: 14px;
  --shadow: 0 2px 4px rgba(17,24,39,.03), 0 16px 48px rgba(17,24,39,.07);
  --font: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
  overflow: visible;
  z-index: 100;
}

.brand {
  height: var(--header);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.18s ease, max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 160px;
}

.shell.sidebar-collapsed .brand-text {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.pasm-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #00796d, #00b39b);
  color: #fff;
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(0, 128, 117, 0.22);
}

.pasm-mark--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.brand-word {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.shell.sidebar-collapsed .brand {
  padding: 0;
  justify-content: center;
}

.shell.sidebar-collapsed .brand-text {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
}

.brand-logo { font-size: 15px; font-weight: 700; letter-spacing: -0.03em; }
.brand-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }

.nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px 16px;
}

.nav-module { margin-bottom: 2px; }

.nav-module-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.nav-module-head:hover { background: var(--surface-dim); }

.nav-module-head > .ph:first-child {
  font-size: 16px;
  color: var(--teal);
  flex-shrink: 0;
}

.nav-module-head span {
  flex: 1;
  min-width: 0;
  letter-spacing: -0.02em;
}

.nav-caret {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-module.open .nav-caret { transform: rotate(180deg); }

.nav-sub-wrap {
  display: none;
  padding: 2px 0 4px 6px;
}

.nav-module.open .nav-sub-wrap { display: block; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  border-left: 2px solid transparent;
  margin-left: 6px;
}

.nav-item:hover {
  background: var(--surface-dim);
  color: var(--text);
}

.nav-item.active {
  color: var(--teal);
  background: var(--teal-soft);
  font-weight: 600;
  border-left-color: var(--teal);
}

.nav-item i { font-size: 14px; flex-shrink: 0; }

/* Sidebar collapse */
.sidebar-toggle {
  flex-shrink: 0;
  margin: 8px 10px 12px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-toggle:hover {
  border-color: var(--teal-mid);
  color: var(--teal);
  background: var(--teal-soft);
}

.sidebar-toggle i {
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell.sidebar-collapsed .sidebar-toggle {
  margin: 8px 8px 12px;
  padding: 0;
  width: calc(var(--sidebar-collapsed) - 16px);
}

.shell.sidebar-collapsed .sidebar-toggle .sidebar-toggle-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.shell.sidebar-collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

.shell.sidebar-collapsed .nav {
  padding: 8px 6px 16px;
  overflow: visible;
}

.shell.sidebar-collapsed .nav-module-head {
  justify-content: center;
  padding: 9px 0;
  gap: 0;
}

.shell.sidebar-collapsed .nav-module-head span,
.shell.sidebar-collapsed .nav-caret {
  display: none;
}

.shell.sidebar-collapsed .nav-module.open .nav-sub-wrap {
  display: none;
}

.shell.sidebar-collapsed .nav-module {
  position: relative;
}

.shell.sidebar-collapsed .nav-sub-wrap {
  display: none !important;
  position: absolute;
  left: calc(100% + 6px);
  top: 0;
  min-width: 196px;
  padding: 6px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 200;
}

.shell.sidebar-collapsed .nav-module:hover .nav-sub-wrap,
.shell.sidebar-collapsed .nav-module.flyout-pinned .nav-sub-wrap {
  display: block !important;
}

.shell.sidebar-collapsed .nav-sub-wrap::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 8px;
  height: 100%;
}

.shell.sidebar-collapsed .nav-item {
  margin-left: 0;
  border-left: none;
  padding: 8px 10px;
}

.shell.sidebar-collapsed .nav-flyout-title {
  display: block;
  padding: 6px 10px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.nav-flyout-title { display: none; }

/* Workspace */
.workspace {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

.topbar {
  height: var(--header);
  flex-shrink: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar h1 { font-size: 15px; font-weight: 600; letter-spacing: -0.025em; }

.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.entity-badge {
  font-size: 9px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  width: fit-content;
}

/* Model lineup — DSSO 3 models */
.model-lineup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.model-chip {
  padding: 8px 10px;
  background: var(--surface-dim);
  border-radius: 10px;
  border: 1px solid var(--line);
}

.model-chip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.model-chip-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.model-chip-mix {
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 7px;
  border-radius: 999px;
}

.model-chip-stats {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-2);
  margin-bottom: 5px;
}

.model-chip-stats small {
  font-size: 9px;
  color: var(--muted);
}

/* Financial statements — three-column layout */
.fs-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 0 0 !important;
  border-top: none;
}

.zone-main > .kpi-strip + .fs-section {
  border-top: 1px solid var(--line);
}

.fs-trio {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.fs-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-dim);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  overflow: hidden;
}

.fs-card h4 {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 10px 12px 6px;
  letter-spacing: -0.02em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.fs-card .chart-slot {
  flex: 1;
  min-height: 100px;
}

.fs-card .fs-table-wrap {
  flex-shrink: 0;
  max-height: 110px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  padding: 4px 6px 6px;
}

.fs-card .fs-table-wrap table { font-size: 9px; }
.fs-card .fs-table-wrap th,
.fs-card .fs-table-wrap td { padding: 3px 6px; }

.search-box {
  flex: 1;
  max-width: 340px;
  height: 36px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--surface-dim);
  border-radius: 999px;
  color: var(--muted);
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Workspace tabs — open modules (white chrome strip) */
.workspace-tabs {
  display: flex;
  align-items: stretch;
  padding: 0 16px;
  min-height: 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}

.workspace-tabs-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 40px;
  margin: 0;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  flex-shrink: 0;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.workspace-tab:hover {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.workspace-tab.active {
  background: transparent;
  color: var(--teal-deep);
  border-bottom-color: var(--teal);
  font-weight: 600;
}

.workspace-tab.is-disabled {
  color: #c4c9ce;
  cursor: not-allowed;
  opacity: 0.55;
}

.workspace-tab.is-disabled:hover {
  background: transparent;
  color: #c4c9ce;
}

.workspace-tab.is-disabled .workspace-tab-main {
  cursor: not-allowed;
}

.workspace-tab.is-disabled .workspace-tab-main i {
  color: #c4c9ce;
}

.workspace-tab.is-home .workspace-tab-main {
  padding-right: 12px;
}

.workspace-tab-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 4px 6px 12px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: inherit;
  cursor: pointer;
}

.workspace-tab-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
  gap: 1px;
}

.workspace-tab-text strong {
  font-weight: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.workspace-tab-sub {
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.workspace-tab.active .workspace-tab-sub {
  color: var(--teal);
}

.workspace-tab-main i {
  font-size: 14px;
  flex-shrink: 0;
  color: var(--muted);
}

.workspace-tab.active .workspace-tab-main i,
.workspace-tab:hover .workspace-tab-main i {
  color: var(--teal);
}

.workspace-tab.is-disabled .workspace-tab-main i,
.workspace-tab.is-disabled:hover .workspace-tab-main i {
  color: #c4c9ce;
}

.workspace-tab.is-soon,
.workspace-tab.is-soon:hover,
.workspace-tab.is-soon.active {
  color: #b0b7bc;
  opacity: 0.62;
}

.workspace-tab.is-soon.active {
  opacity: 0.9;
  border-bottom-color: #c4c9ce;
  font-weight: 600;
}

.workspace-tab.is-soon .workspace-tab-main i,
.workspace-tab.is-soon:hover .workspace-tab-main i,
.workspace-tab.is-soon.active .workspace-tab-main i {
  color: #c4c9ce;
}

.workspace-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0 8px 0 2px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s ease, background 0.12s ease;
}

.workspace-tab:hover .workspace-tab-close,
.workspace-tab.active .workspace-tab-close {
  opacity: 1;
}

.workspace-tab-close:hover {
  background: rgba(0, 128, 117, 0.12);
  color: var(--teal-deep);
}

.workspace-tab-close i { font-size: 11px; }

.module-inner-tabs {
  flex-shrink: 0;
}

/* Module menu tabs — white strip under workspace tabs */
.module-menu-tabs {
  flex-shrink: 0;
  padding: 0 16px;
  margin: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.module-menu-tabs-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.module-menu-tabs-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 12px 0 0;
  margin-right: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-deep);
  border-right: 1px solid rgba(0, 128, 117, 0.18);
  white-space: nowrap;
}

.module-menu-tabs-label i {
  color: var(--teal);
  font-size: 13px;
}

.module-menu-tabs-list {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}

.module-menu-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  min-height: 40px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.module-menu-tab:hover {
  color: var(--teal-deep);
  background: var(--teal-soft);
}

.module-menu-tab.active {
  color: var(--teal-deep);
  background: transparent;
  border-bottom-color: var(--teal);
  font-weight: 600;
}

.module-menu-tab i { font-size: 13px; }

@media (max-width: 720px) {
  .module-menu-tabs-label { display: none; }
  .workspace-tab-text strong { max-width: 96px; }
}

/* Locale / i18n switcher */
.locale-switch {
  position: relative;
  flex-shrink: 0;
}

.locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.locale-btn:hover,
.locale-switch.open .locale-btn {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.locale-btn .ph-globe { font-size: 15px; color: var(--teal); }

.locale-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 22px;
  text-align: center;
}

.locale-caret {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.2s;
}

.locale-switch.open .locale-caret { transform: rotate(180deg); }

.locale-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.12);
  padding: 4px;
  z-index: 200;
}

.locale-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 11px;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.locale-option:hover,
.locale-option.active {
  background: var(--teal-soft);
  color: var(--teal);
}

.locale-option-code {
  font-size: 10px;
  font-weight: 700;
  width: 28px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.locale-check {
  margin-left: auto;
  font-size: 13px;
  opacity: 0;
  color: var(--teal);
}

.select {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 11px;
  color: var(--text-2);
  cursor: pointer;
}

.select-sm { height: 26px; font-size: 10px; }

.icon-btn {
  position: relative;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn i { font-size: 17px; }

.badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid #fff;
  display: grid;
  place-items: center;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #fff;
}

.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.module-board {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
}

.board {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
}

.module-board .module-canvas {
  border-radius: 0;
  box-shadow: none;
}

.anim {
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

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

.canvas,
.module-canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.module-canvas > * {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.canvas-grid {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(200px, 220px) minmax(0, 1fr) minmax(240px, 260px);
}

/* Zones — fractional rows, no scroll */
.zone {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: grid;
  align-content: stretch;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.zone-left {
  grid-template-rows: auto auto auto minmax(0, 0.75fr) minmax(0, 1fr);
}

.zone-main {
  padding: 0;
  grid-template-rows: auto minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.7fr);
}

.zone-side {
  border-right: none;
  grid-template-rows: minmax(0, 1.35fr) auto minmax(0, 1fr);
}

.block {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.zone-left > .hero-embed + .block,
.zone-main > .kpi-strip + .block,
.zone-side > .block:first-child {
  border-top: none;
}

.zone-left > .block:first-of-type { padding-top: 0; }

.block-chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.block-chart-lg {
  padding-bottom: 8px !important;
}

.zone-main .block-chart-lg + .charts-row {
  border-top: 1px solid var(--line);
}

.block-feed {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.block-feed .feed {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 8px;
  flex-shrink: 0;
}

.block-head h3,
.block-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.block-title { margin-bottom: 10px; }

.hint { font-size: 10px; color: var(--muted); margin-top: 2px; }
.block-head .hint { margin-top: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.tag i { font-size: 11px; }
.tag-teal { background: var(--teal-soft); color: var(--teal); }
.tag-light { background: rgba(255,255,255,0.2); color: #fff; }

/* Hero */
.hero-embed {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #009688 0%, #00796a 42%, #004d47 100%);
  color: #fff;
  padding: 12px;
  flex-shrink: 0;
}

.hero-shine {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.14), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,0.06), transparent 40%);
  pointer-events: none;
}

.eyebrow { font-size: 10px; font-weight: 500; opacity: 0.85; margin-bottom: 6px; position: relative; }

.hero-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
}

.hero-value::before { content: '¥'; font-size: 15px; font-weight: 600; margin-right: 2px; opacity: 0.85; }
.hero-value::after { content: 'B'; font-size: 13px; font-weight: 500; margin-left: 2px; opacity: 0.75; }

.hero-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  opacity: 0.88;
  margin-bottom: 8px;
  position: relative;
  padding: 5px 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.hero-sub strong { font-size: 11px; font-weight: 600; }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  opacity: 0.9;
  position: relative;
}

.progress {
  height: 6px;
  background: var(--surface-dim);
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 6px;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-mid));
}

.anim-bar { animation: growBar 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards; }
@keyframes growBar { to { width: var(--w); } }

.meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }

.target + .target { margin-top: 5px; }

.zone-left > .block[data-widget="regionalTargets"] {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.targets {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.target-top { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-2); margin-bottom: 4px; }
.progress.thin { height: 4px; margin: 0; }

/* KPI — no absolute overlap */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.kpi {
  padding: 5px 10px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.kpi:last-child { border-right: none; }

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.kpi-icon {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  display: none;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}

.kpi-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  min-width: 0;
}

.kpi-value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0;
  line-height: 1.15;
  word-break: break-all;
}

.kpi-delta {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
}

.kpi-delta.up { background: var(--teal-soft); color: var(--up); }
.kpi-delta.down { background: #fef2f2; color: var(--down); }

.kpi-body {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.zone-main .block { padding-left: 12px; padding-right: 12px; }
.zone-main .kpi-strip + .block { padding-top: 8px; }

.charts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  min-height: 0;
  overflow: hidden;
}

.chart-cell {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chart-cell:last-child { border-right: none; }

.zone-side > .block-chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Chart slots — fill grid row, no fixed height */
.chart-slot {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.donut-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 72px;
  margin-bottom: 6px;
}

.donut-chart {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.donut-hub {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.donut-num {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.donut-unit {
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cost-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.cost-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-2);
  margin-bottom: 2px;
}

.cost-row-top b { color: var(--text); font-weight: 600; }

.cost-track {
  height: 4px;
  background: var(--surface-dim);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 3px;
}

.cost-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  animation: growBar 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 80ms + 200ms);
}

.cap-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.cap-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cap-item i {
  font-size: 16px;
  color: var(--teal);
  background: var(--teal-soft);
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cap-item .ms-label { font-size: 9px; color: var(--muted); }
.cap-item .ms-val { font-size: 13px; font-weight: 700; letter-spacing: -0.02em; }
.cap-item .ms-sub { font-size: 9px; color: var(--muted); margin-top: 1px; }

.zone-main > .block:last-child {
  display: flex;
  flex-direction: column;
}

.table-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; font-size: 10px; }
th, td { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface-dim);
}

tbody tr:last-child td { border-bottom: none; }
.drill-row { cursor: pointer; transition: background 0.15s; }
.drill-row:hover td { color: var(--teal); background: var(--teal-soft); }

.link-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.link-btn:hover { color: var(--teal); }

.feed { display: flex; flex-direction: column; gap: 0; }

.feed-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.feed-item:last-child { border-bottom: none; padding-bottom: 0; }

.feed-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feed-text { font-size: 11px; line-height: 1.45; color: var(--text-2); }
.feed-text strong { color: var(--teal); font-weight: 600; }
.feed-time { font-size: 10px; color: var(--muted); margin-top: 2px; }

@media (max-width: 1100px) {
  .canvas-grid {
    grid-template-columns: 180px minmax(0, 1fr) 220px;
  }
  .zone { padding: 8px; }
}

/* Nav expand / collapse all */
.nav-expand-bar {
  flex-shrink: 0;
  padding: 0 10px 6px;
}
.nav-expand-toggle {
  width: 100%;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-expand-toggle:hover {
  background: var(--surface-dim);
  color: var(--text-2);
  border-color: rgba(0, 128, 117, 0.35);
}
.nav-expand-toggle i { font-size: 12px; }
.shell.sidebar-collapsed .nav-expand-bar {
  padding: 0 6px 6px;
}
.shell.sidebar-collapsed .nav-expand-toggle .nav-expand-label {
  display: none;
}
.shell.sidebar-collapsed .nav-expand-toggle {
  width: 100%;
  padding: 0;
}


/* DEV: hide description banners */
.ref-banner { display: none !important; }

/* Smaller expand/collapse control */
.nav-expand-bar { padding: 0 10px 4px; }
.nav-expand-toggle {
  height: 22px;
  font-size: 10px;
  gap: 4px;
  border-radius: 6px;
  border-style: solid;
  border-width: 1px;
  opacity: 0.85;
}
.nav-expand-toggle i { font-size: 11px; }
