:root {
  --bg: #eef3f7;
  --top: #071426;
  --top-2: #0d2036;
  --panel: #ffffff;
  --panel-soft: #f7fafc;
  --panel-tint: #edf6f4;
  --line: #d8e2eb;
  --line-strong: #b7cad8;
  --ink: #172534;
  --muted: #62758a;
  --quiet: #8a9bad;
  --blue: #286fd8;
  --cyan: #1b9edb;
  --teal: #10a989;
  --green: #1d8f5f;
  --amber: #b87912;
  --red: #c64d55;
  --violet: #6962b7;
  --shadow: 0 10px 28px rgba(22, 40, 58, 0.08);
  --shadow-sm: 0 1px 2px rgba(22, 40, 58, 0.06);
  --radius: 8px;
  --layer-popover: 2147483200;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(40, 111, 216, 0.16), transparent 26%),
    radial-gradient(circle at 90% 12%, rgba(16, 169, 137, 0.15), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(238, 243, 247, 0.92) 260px),
    repeating-linear-gradient(90deg, rgba(40, 111, 216, 0.03) 0 1px, transparent 1px 88px),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 900;
  text-transform: uppercase;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: radial-gradient(circle at 20% 10%, rgba(40, 111, 216, 0.22), transparent 34%), var(--top);
}

.login-panel {
  width: min(900px, 100%);
  min-height: 420px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.login-panel > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 28px;
  border-radius: var(--radius);
  color: #eaf4ff;
  background:
    linear-gradient(135deg, rgba(40, 111, 216, 0.28), rgba(16, 169, 137, 0.14)),
    var(--top);
}

.login-panel h1,
.topbar h1,
.model-switcher h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.16;
}

.login-panel h1 {
  max-width: 420px;
  font-size: 34px;
}

.login-form,
.control-strip,
.aop-summary,
.model-switcher,
.model-card {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(22, 40, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(145%);
}

.control-strip,
.model-switcher {
  overflow: visible;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 28px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

select {
  color-scheme: light;
}

input:hover,
select:hover,
input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(40, 111, 216, 0.12);
}

.primary-btn,
.accent-btn,
.ghost-btn,
.mini-btn,
.icon-btn {
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 900;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.primary-btn {
  background: linear-gradient(180deg, #377be6, #2464ce);
  color: #fff;
}

.accent-btn {
  background: linear-gradient(180deg, #19bc98, #0d9a7d);
  color: #fff;
}

.ghost-btn,
.mini-btn,
.icon-btn {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}

.primary-btn:hover,
.accent-btn:hover,
.ghost-btn:hover,
.mini-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 8px 18px rgba(22, 40, 58, 0.10);
}

.primary-btn:disabled,
.accent-btn:disabled,
.ghost-btn:disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.error-text {
  margin: 0;
  min-height: 18px;
  color: var(--red);
  font-size: 12px;
}

.app-shell {
  width: min(2000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 118px;
  padding: 20px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--top), var(--top-2));
  border: 1px solid #163452;
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(7, 20, 38, 0.18);
}

.topbar > div:first-child {
  position: relative;
  padding-left: 50px;
}

.topbar > div:first-child::before {
  content: "↯";
  position: absolute;
  left: 0;
  top: 4px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #5f8cff, #315be8);
  color: #fff;
  font-weight: 900;
}

.topbar h1 {
  color: #8cc5ff;
  font-size: 22px;
}

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

.report-tool-trigger {
  min-height: 32px;
  padding: 0 12px;
  color: #eaf4ff;
  border-color: rgba(168, 190, 206, 0.45);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

.report-tool-trigger:hover {
  color: #fff;
  border-color: rgba(140, 197, 255, 0.8);
  background: rgba(40, 111, 216, 0.24);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--layer-popover);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 20, 38, 0.45);
}

.report-modal {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(7, 20, 38, 0.22);
}

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

.report-modal-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.report-modal-head .eyebrow {
  margin-bottom: 6px;
}

.report-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 8px;
}

.report-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.report-section-muted {
  background: var(--panel-soft);
}

.report-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.report-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

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

.report-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.report-form-grid label,
.report-file-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.report-file-field {
  min-width: 0;
}

.report-file-field input {
  width: 100%;
  height: auto;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.report-file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

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

.report-status-grid span {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-status-grid b {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-status-grid .is-empty b {
  color: var(--amber);
}

.report-modal-notice {
  margin: 16px 22px 0;
  padding: 10px 12px;
  border: 1px solid rgba(40, 111, 216, 0.25);
  border-radius: 6px;
  background: rgba(40, 111, 216, 0.08);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.report-modal-notice[data-type="error"] {
  border-color: rgba(198, 77, 85, 0.35);
  background: rgba(198, 77, 85, 0.09);
  color: var(--red);
}

.report-mini-panel {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.report-mini-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-mini-kpis span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-mini-kpis b {
  color: var(--ink);
}

.report-mini-table {
  max-height: 220px;
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.report-mini-table table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 12px;
}

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

.report-mini-table th {
  position: sticky;
  top: 0;
  background: #f3f7fb;
  color: var(--muted);
  font-weight: 900;
}

.report-mini-table tr.invalid td {
  color: var(--red);
}

.report-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 0;
}

.report-modal-foot {
  display: flex;
  justify-content: flex-end;
  padding: 14px 22px 22px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(168, 190, 206, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(22, 40, 58, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.lang-btn {
  min-width: 44px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #607284;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.lang-btn:hover {
  color: #122033;
  transform: translateY(-1px);
}

.lang-btn.active {
  color: #ffffff;
  background: #101713;
  box-shadow: 0 8px 18px rgba(17, 23, 19, 0.16);
}

body[data-brand="tecno"] .lang-btn.active {
  background: linear-gradient(135deg, #1f8ce8, #70cef4);
  box-shadow: 0 10px 20px rgba(31, 140, 232, 0.2);
}

body[data-lang="en"] .topbar h1 {
  font-size: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(16, 169, 137, 0.5);
  border-radius: 999px;
  background: rgba(16, 169, 137, 0.10);
  color: #67e2c6;
  font-size: 12px;
  font-weight: 900;
}

.control-strip {
  position: relative;
  z-index: 70;
  display: grid;
  grid-template-columns: 170px 170px 1fr;
  align-items: end;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  overflow: visible;
}

.scope-field {
  position: relative;
}

.native-scope-select {
  display: block;
  height: 54px;
  padding: 8px 42px 8px 14px;
  border: 1px solid rgba(168, 190, 206, 0.78);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.72)),
    var(--glass-surface, rgba(255, 255, 255, 0.76));
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 22px rgba(22, 40, 58, 0.06);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  cursor: pointer;
}

.native-scope-select:hover,
.native-scope-select:focus {
  border-color: rgba(40, 111, 216, 0.62);
  box-shadow: 0 0 0 3px rgba(40, 111, 216, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.scope-picker {
  display: none;
}

.scope-trigger {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  padding: 7px 38px 7px 13px;
  border: 1px solid rgba(168, 190, 206, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.scope-trigger::after {
  content: "⌄";
  position: absolute;
  right: 13px;
  top: 13px;
  color: var(--blue);
  font-size: 18px;
}

.scope-trigger strong {
  grid-column: 1;
  font-size: 14px;
}

.scope-trigger em {
  grid-column: 1;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.scope-options {
  position: absolute;
  z-index: 120;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(168, 190, 206, 0.75);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 50px rgba(22, 40, 58, 0.18);
  backdrop-filter: blur(18px) saturate(150%);
}

.scope-options button {
  min-height: 40px;
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.scope-options button:hover,
.scope-options button.active {
  border-color: rgba(40, 111, 216, 0.26);
  background: rgba(234, 243, 255, 0.8);
}

.scope-options strong {
  font-size: 13px;
}

.scope-options em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.button-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.notice {
  border: 1px solid #f0cf88;
  background: #fff8e6;
  color: #7b5410;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.notice[data-type="error"] {
  border-color: #efb6bb;
  background: #fff1f2;
  color: var(--red);
}

.view-tabs {
  width: fit-content;
  display: flex;
  gap: 4px;
  margin: 0 auto 18px;
  padding: 4px;
  border: 1px solid rgba(183, 202, 216, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 28px rgba(22, 40, 58, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.view-tab {
  min-width: 132px;
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.view-tab.active {
  color: #fff;
  background: linear-gradient(180deg, #377be6, #2464ce);
  box-shadow: 0 8px 18px rgba(40, 111, 216, 0.22);
}

.view-panel,
.decision-shell {
  display: grid;
  gap: 18px;
}

.decision-hero,
.decision-card,
.risk-overview {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(22, 40, 58, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.decision-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 168px;
  padding: 28px;
}

.decision-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.16;
}

.decision-hero p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.aop-spark-grid {
  min-width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.aop-spark-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(237, 246, 244, 0.84);
}

.aop-spark-card span,
.risk-overview span,
.action-number span,
.suggestion-list span,
.chart-card .section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.aop-spark-card strong {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.aop-spark-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.spark-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(183, 202, 216, 0.45);
}

.spark-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.decision-model-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
}

.decision-model-card {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 1px 8px;
  justify-items: start;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(183, 202, 216, 0.60);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  box-shadow: 0 6px 18px rgba(22, 40, 58, 0.055);
}

.decision-model-card.active {
  border-color: rgba(40, 111, 216, 0.55);
  background: linear-gradient(145deg, rgba(234, 243, 255, 0.92), rgba(255, 255, 255, 0.72));
  box-shadow: 0 10px 26px rgba(40, 111, 216, 0.13);
}

.decision-model-card strong {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-model-card span {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-model-card em {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.risk-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.risk-overview div {
  display: grid;
  gap: 6px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.82);
}

.risk-overview strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.56fr) minmax(0, 1.44fr);
  gap: 18px;
}

.detail-action-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.detail-action-panel .decision-card {
  min-height: 0;
}

.detail-action-summary {
  display: flex;
  flex-direction: column;
}

.detail-action-summary .suggestion-list {
  margin-bottom: 0;
}

.detail-action-chart .dos-chart {
  min-height: 250px;
}

.decision-card {
  padding: 20px;
}

.action-number {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 20px;
  border-radius: 12px;
  background: #f7fafc;
}

.action-number strong {
  font-size: 42px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.action-number.add strong {
  color: var(--teal);
}

.action-number.reduce strong {
  color: var(--amber);
}

.action-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.suggestion-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.suggestion-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(237, 246, 244, 0.72);
}

.suggestion-list strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.apply-suggestion-btn {
  width: 100%;
  min-height: 42px;
}

.dos-chart {
  width: 100%;
  height: auto;
  min-height: 240px;
}

.dos-chart text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chart-band {
  stroke: rgba(16, 169, 137, 0.24);
  stroke-width: 2;
  stroke-dasharray: 6 8;
}

.chart-safe-zone {
  fill: url(#safeZoneGradient);
  stroke: rgba(16, 169, 137, 0.10);
  stroke-width: 1;
}

.chart-safe-bound {
  stroke: rgba(16, 169, 137, 0.36);
  stroke-width: 1.5;
  stroke-dasharray: 8 10;
}

.safe-zone-label {
  fill: rgba(16, 169, 137, 0.78);
  font-size: 11px;
  font-weight: 900;
}

.chart-target {
  stroke: rgba(40, 111, 216, 0.18);
  stroke-width: 1.5;
  stroke-dasharray: 3 9;
}

.chart-grid {
  stroke: rgba(183, 202, 216, 0.42);
  stroke-width: 1;
}

.chart-axis-tick {
  stroke: rgba(98, 117, 138, 0.42);
  stroke-width: 1.5;
}

.chart-line {
  fill: none;
  stroke: #19aeea;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(25, 174, 234, 0.35));
  animation: none;
}

.chart-line-base {
  fill: none;
  stroke: #8ea0b4;
  stroke-width: 2.5;
  stroke-dasharray: 7 10;
  stroke-linecap: round;
  opacity: 0.72;
  animation: none;
}

.chart-dot {
  fill: #fff;
  stroke: #19aeea;
  stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(25, 174, 234, 0.35));
}

.chart-hit,
.bubble-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.rail-line {
  stroke: rgba(98, 117, 138, 0.42);
  stroke-width: 2;
}

.rail-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.axis-label {
  fill: var(--quiet);
  font-size: 11px;
  font-weight: 800;
}

.axis-label.target-axis {
  fill: var(--blue);
  font-weight: 900;
}

.axis-title {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.month-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.month-adjust-label {
  fill: var(--quiet);
  font-size: 11px;
  font-weight: 800;
}

.month-adjust-label.active {
  fill: var(--ink);
  font-weight: 900;
}

.bubble-add {
  fill: rgba(16, 185, 129, 0.86);
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.44));
}

.bubble-cut {
  fill: rgba(225, 75, 88, 0.86);
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 0 16px rgba(225, 75, 88, 0.42));
}

.action-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: none;
}

.action-node:hover {
  filter: brightness(1.08);
}

.dos-node {
  cursor: crosshair;
}

.chart-legend text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.legend-line {
  stroke-width: 3;
  animation: none;
}

.bubble-label-add,
.bubble-label-cut {
  font-size: 13px;
  font-weight: 900;
}

.bubble-label-add {
  fill: var(--teal);
}

.bubble-label-cut {
  fill: var(--red);
}

.decision-tooltip {
  position: fixed;
  z-index: 2147483001;
  min-width: 230px;
  max-width: 300px;
  padding: 12px 13px;
  border: 1px solid rgba(40, 111, 216, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(7, 20, 38, 0.94), rgba(16, 36, 58, 0.88)),
    rgba(7, 20, 38, 0.92);
  color: #eaf4ff;
  box-shadow: 0 18px 44px rgba(7, 20, 38, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  pointer-events: none;
}

.decision-tooltip::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(25, 174, 234, 0.55), transparent 36%, rgba(16, 185, 129, 0.38));
  z-index: -1;
}

.tooltip-kicker {
  margin-bottom: 6px;
  color: #67d8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.tooltip-title {
  margin-bottom: 9px;
  color: #eaf4ff;
  font-size: 14px;
  font-weight: 900;
}

.tooltip-title.add,
.tooltip-grid strong.add {
  color: #44d7a8;
}

.tooltip-title.cut,
.tooltip-grid strong.cut {
  color: #ff6f7b;
}

.tooltip-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  padding: 9px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.tooltip-grid span {
  color: #8fa6bd;
  font-size: 11px;
  font-weight: 800;
}

.tooltip-grid strong {
  color: #f8fbff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tooltip-strategy {
  margin-top: 8px;
  color: #b9cbe0;
  font-size: 11px;
  line-height: 1.45;
}

.aop-summary {
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.aop-summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 4px;
  height: 20px;
  background: var(--teal);
}

.aop-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(640px, 1.2fr);
  gap: 18px;
  align-items: center;
}

.aop-head h2 {
  margin: 0;
  color: var(--blue);
  font-size: 22px;
}

.aop-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.aop-kpis div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  align-content: center;
  padding: 12px 18px;
  background: var(--panel-soft);
}

.forecast-window strong {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.forecast-window i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(40, 111, 216, 0.10);
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.aop-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.aop-kpis strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.aop-table table {
  min-width: 980px;
}

.aop-table td:not(:first-child),
.aop-table th:not(:first-child) {
  text-align: center;
}

.rate-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 64px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 900;
}

.rate-good {
  background: #dff5ee;
  color: var(--green);
}

.rate-low {
  background: #fff1d5;
  color: var(--amber);
}

.rate-high {
  background: #e9e7fb;
  color: var(--violet);
}

.aop-completion-shell {
  display: grid;
  gap: 18px;
}

.aop-completion-grid {
  display: grid;
  gap: 18px;
}

.aop-top-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.8fr);
}

.aop-runway-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.aop-insight-card {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(22, 40, 58, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
}

.aop-dark-panel {
  border-color: rgba(49, 91, 232, 0.20);
  background:
    radial-gradient(circle at 10% 18%, rgba(40, 111, 216, 0.22), transparent 28%),
    radial-gradient(circle at 92% 20%, rgba(16, 169, 137, 0.16), transparent 22%),
    linear-gradient(145deg, #0a1527, #0f1d32);
  color: #eef7ff;
  box-shadow: 0 22px 60px rgba(7, 20, 38, 0.22);
}

.aop-node-panel {
  display: grid;
  align-content: center;
}

.aop-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.aop-card-head h2,
.aop-node-panel h2,
.pressure-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.aop-dark-panel .aop-card-head h2,
.aop-dark-panel h2 {
  color: #f5fbff;
}

.aop-card-head p,
.aop-node-panel > p,
.pressure-panel > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.aop-dark-panel .aop-card-head p,
.aop-dark-panel > p {
  color: #9eb1c8;
}

.aop-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: #c5d2e0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.aop-legend.light {
  color: var(--muted);
}

.aop-legend span {
  position: relative;
  padding-left: 18px;
}

.aop-legend span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.aop-legend .actual::before {
  background: #32d47a;
}

.aop-legend .forecast::before {
  background: #3d82f6;
}

.aop-legend .target::before {
  background: #ff4b55;
}

.aop-legend .chase::before {
  background: #f6a20a;
}

.aop-chart {
  width: 100%;
  height: auto;
  min-height: 280px;
}

.aop-chart text {
  fill: #7f91a6;
  font-size: 12px;
  font-weight: 800;
}

.aop-dark-panel .aop-chart text {
  fill: #8ea2ba;
}

.aop-grid-line {
  stroke: rgba(142, 160, 180, 0.20);
  stroke-width: 1;
}

.aop-dark-panel .aop-grid-line {
  stroke: rgba(148, 163, 184, 0.16);
}

.aop-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aop-line-actual {
  stroke: #32d47a;
  stroke-width: 5;
  filter: drop-shadow(0 0 8px rgba(50, 212, 122, 0.26));
}

.aop-line-forecast {
  stroke: #3d82f6;
  stroke-width: 5;
  filter: drop-shadow(0 0 8px rgba(61, 130, 246, 0.24));
}

.aop-line-target {
  stroke: #ff4b55;
  stroke-width: 3;
  stroke-dasharray: 8 10;
}

.aop-line-chase {
  stroke: #f6a20a;
  stroke-width: 5;
}

.aop-forecast-marker {
  stroke: rgba(246, 162, 10, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 6 8;
}

.aop-marker-label,
.aop-target-label {
  fill: #f6a20a !important;
  font-weight: 900;
}

.aop-forecast-label,
.aop-current-label {
  fill: var(--blue) !important;
  font-weight: 900;
}

.aop-dot {
  stroke: #fff;
  stroke-width: 2;
}

.aop-dot.actual {
  fill: #32d47a;
}

.aop-dot.forecast,
.aop-current-dot {
  fill: #3d82f6;
}

.aop-dot.target {
  fill: #ff4b55;
}

.aop-current-dot {
  stroke: #101b2d;
  stroke-width: 3;
}

.aop-node-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.aop-node-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 124px;
  align-content: center;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.aop-node-card strong {
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.aop-node-card span {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 900;
}

.aop-node-card i {
  display: block;
  height: 7px;
  max-width: 100%;
  border-radius: 999px;
  background: currentColor;
}

.aop-node-card.good strong,
.aop-node-card.good {
  color: #32d47a;
}

.aop-node-card.warn strong,
.aop-node-card.warn {
  color: #f6a20a;
}

.aop-node-card.bad strong,
.aop-node-card.bad {
  color: #ff5b66;
}

.aop-node-card.muted strong,
.aop-node-card.muted {
  color: #9eb1c8;
}

.boss-note {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.boss-note.risk {
  background: linear-gradient(145deg, rgba(255, 75, 85, 0.18), rgba(246, 162, 10, 0.10));
  border: 1px solid rgba(255, 91, 102, 0.26);
}

.boss-note.clear {
  background: linear-gradient(145deg, rgba(50, 212, 122, 0.16), rgba(61, 130, 246, 0.08));
  border: 1px solid rgba(50, 212, 122, 0.24);
}

.boss-note span {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 900;
}

.boss-note strong {
  color: #fff;
  font-size: 32px;
  line-height: 1.1;
}

.boss-note p {
  margin: 0;
  color: #d5e4f5;
  line-height: 1.55;
}

.pressure-table {
  min-width: 0;
  margin-top: 18px;
}

.pressure-table th,
.pressure-table td {
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
}

.pressure-table th:first-child,
.pressure-table td:first-child {
  position: static;
  width: auto;
}

.pressure-pill {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-weight: 900;
}

.pressure-pill.low {
  background: #dff5ee;
  color: var(--green);
}

.pressure-pill.mid {
  background: #fff1d5;
  color: var(--amber);
}

.pressure-pill.high {
  background: #ffe2e5;
  color: var(--red);
}

.aop-monthly-card .aop-card-head {
  align-items: center;
}

.aop-monthly-card h2 {
  margin: 0;
  color: var(--blue);
}

.aop-mini-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}

.aop-mini-kpis div {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(247, 250, 252, 0.86);
}

.aop-mini-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.aop-mini-kpis strong {
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.aop-gap-shell {
  color: #111827;
}

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

.aop-gap-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

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

.aop-gap-title-row h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 26px;
  letter-spacing: 0;
}

.aop-gap-title-row > div > span {
  color: #6b7280;
  font-size: 13px;
}

.aop-gap-demo-note {
  max-width: 980px;
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #f59e0b;
  border-radius: 7px;
  background: #fffbeb;
  color: #4b5563;
  line-height: 1.45;
}

.aop-gap-status-strip {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 8px;
  justify-content: end;
}

.aop-gap-status-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #6b7280;
  font-size: 12px;
  white-space: nowrap;
}

.aop-gap-status-strip b {
  color: #111827;
}

.aop-gap-kpis {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr .9fr .9fr;
  gap: 12px;
}

.aop-gap-kpi,
.aop-gap-card,
.aop-gap-list-card,
.aop-gap-inspector {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(17, 24, 39, .06);
}

.aop-gap-kpi {
  min-height: 112px;
  padding: 14px;
}

.aop-gap-kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.aop-gap-kpi mark,
.aop-gap-section-head mark,
.aop-gap-table-toolbar mark {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.aop-gap-kpi mark.red,
.aop-gap-section-head mark.red {
  color: #b91c1c;
  background: #fee2e4;
}

.aop-gap-kpi mark.orange {
  color: #c2410c;
  background: #fff7ed;
}

.aop-gap-kpi mark.yellow,
.aop-gap-table-toolbar mark {
  color: #92400e;
  background: #fffbeb;
}

.aop-gap-kpi mark.green {
  color: #047857;
  background: #ecfdf5;
}

.aop-gap-kpi strong {
  display: block;
  margin-top: 14px;
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.aop-gap-kpi.primary strong {
  font-size: 34px;
}

.aop-gap-kpi em {
  display: block;
  margin-top: 12px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.aop-gap-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .95fr);
  gap: 12px;
}

.aop-gap-section-head,
.aop-gap-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 0;
}

.aop-gap-section-head h3,
.aop-gap-table-toolbar h3 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.aop-gap-section-head span,
.aop-gap-table-toolbar span {
  color: #9ca3af;
  font-size: 12px;
}

.aop-gap-trend-chart {
  display: grid;
  grid-template-columns: 62px repeat(4, 1fr);
  gap: 12px;
  padding: 18px;
}

.aop-gap-axis {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  height: 210px;
  padding-right: 4px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  text-align: right;
}

.aop-gap-period {
  position: relative;
  display: grid;
  grid-template-rows: 210px auto auto;
  gap: 6px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}

.aop-gap-period::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 210px;
  background:
    linear-gradient(to bottom, transparent calc(25% - 1px), #e5e7eb calc(25% - 1px), #e5e7eb 25%, transparent 25%),
    linear-gradient(to bottom, transparent calc(50% - 1px), #e5e7eb calc(50% - 1px), #e5e7eb 50%, transparent 50%),
    linear-gradient(to bottom, transparent calc(75% - 1px), #e5e7eb calc(75% - 1px), #e5e7eb 75%, transparent 75%);
  pointer-events: none;
}

.aop-gap-bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 7px;
  height: 210px;
  border-bottom: 1px solid #d1d5db;
}

.aop-gap-bars span {
  display: block;
  width: 26px;
  min-height: 8px;
  border-radius: 5px 5px 0 0;
}

.aop-gap-bars .baseline {
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.aop-gap-bars .actual {
  background: #111827;
}

.aop-gap-bars .gap {
  background: #fee2e4;
  border: 1px solid #fecdd3;
}

.aop-gap-period b {
  color: #111827;
}

.aop-gap-period em {
  color: #9ca3af;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.aop-gap-legend {
  display: flex;
  gap: 16px;
  padding: 0 18px 16px 80px;
  color: #6b7280;
  font-size: 12px;
}

.aop-gap-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: currentColor;
}

.aop-gap-legend .baseline { color: #2563eb; }
.aop-gap-legend .actual { color: #111827; }
.aop-gap-legend .gap { color: #ef4444; }

.aop-gap-insight-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin: 0;
  list-style: none;
}

.aop-gap-insight-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f9fafb;
  color: #6b7280;
  line-height: 1.45;
}

.aop-gap-insight-list li > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.aop-gap-insight-list p {
  margin: 0;
}

.aop-gap-insight-list b {
  color: #111827;
}

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

.aop-gap-list-card {
  padding-bottom: 8px;
}

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

.aop-gap-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.aop-gap-record:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.aop-gap-record strong,
.aop-gap-record b {
  display: block;
  color: #111827;
}

.aop-gap-record em {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.aop-gap-record > span:last-child {
  display: grid;
  justify-items: end;
  gap: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.aop-gap-record i {
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
}

.aop-gap-table-card {
  overflow: hidden;
}

.aop-gap-table-toolbar {
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.aop-gap-table-wrap {
  max-height: 560px;
  overflow: auto;
  background: #ffffff;
}

.aop-gap-table {
  width: 100%;
  min-width: 1660px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.aop-gap-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.aop-gap-table th:first-child,
.aop-gap-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 250px;
  text-align: left;
}

.aop-gap-table th:first-child {
  background: #f3f4f6;
}

.aop-gap-table td {
  height: 43px;
  padding: 0 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  text-align: right;
  white-space: nowrap;
}

.aop-gap-table td:first-child {
  background: inherit;
  box-shadow: 1px 0 0 #e5e7eb;
}

.aop-gap-table tr {
  cursor: pointer;
}

.aop-gap-table tr.hidden {
  display: none;
}

.aop-gap-table tr.selected td {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.aop-gap-overall-row td {
  background: #111827;
  color: #ffffff;
  font-weight: 900;
}

.aop-gap-overall-row td:first-child {
  background: #111827;
}

.aop-gap-overall-row .aop-gap-name strong,
.aop-gap-overall-row .aop-gap-name em,
.aop-gap-overall-row .gap-negative {
  color: #ffffff;
}

.aop-gap-region-row td {
  background: #f9fafb;
  color: #111827;
  font-weight: 900;
}

.aop-gap-country-row .aop-gap-name {
  padding-left: 30px;
}

.aop-gap-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}

.aop-gap-name > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.aop-gap-name strong {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aop-gap-name em {
  color: #9ca3af;
  font-size: 11px;
  font-style: normal;
}

.row-expander {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  flex: 0 0 auto;
}

.row-expander::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.row-expander.open::before {
  transform: rotate(45deg);
}

.aop-gap-indent-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #cbd5e1;
}

.aop-gap-good,
.gap-positive {
  color: #047857;
}

.aop-gap-warn {
  color: #92400e;
}

.aop-gap-mild {
  color: #c2410c;
}

.aop-gap-medium {
  color: #b45309;
}

.aop-gap-danger,
.gap-negative {
  color: #b91c1c;
}

.aop-gap-muted {
  color: #9ca3af;
}

.aop-gap-impact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.aop-gap-impact::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9ca3af;
}

.aop-gap-impact.high::before { background: #ef4444; }
.aop-gap-impact.mid::before { background: #fb923c; }
.aop-gap-impact.low::before { background: #10b981; }

.aop-gap-edit-select,
.aop-gap-edit-input,
.aop-gap-edit-textarea,
.aop-gap-inspector select,
.aop-gap-inspector input,
.aop-gap-inspector textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  outline: none;
}

.aop-gap-edit-select,
.aop-gap-edit-input,
.aop-gap-inspector select,
.aop-gap-inspector input {
  height: 28px;
  padding: 0 8px;
}

.aop-gap-edit-textarea {
  height: 28px;
  min-width: 230px;
  max-width: 320px;
  padding: 6px 8px;
  resize: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aop-gap-edit-textarea:focus {
  height: 68px;
  overflow: auto;
  white-space: normal;
  position: relative;
  z-index: 5;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .12);
}

.aop-gap-action-cell {
  display: grid;
  grid-template-columns: 96px minmax(230px, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 340px;
}

.aop-gap-table th:nth-child(11),
.aop-gap-table td:nth-child(11) { min-width: 122px; }
.aop-gap-table th:nth-child(12),
.aop-gap-table td:nth-child(12) { min-width: 260px; }
.aop-gap-table th:nth-child(13),
.aop-gap-table td:nth-child(13) { min-width: 372px; }

.aop-gap-inspector {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.aop-gap-inspector-head {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.aop-gap-inspector-head h3 {
  margin: 6px 0;
  color: #111827;
  font-size: 20px;
}

.aop-gap-inspector-head span {
  color: #6b7280;
  font-size: 12px;
}

.aop-gap-inspector-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

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

.aop-gap-mini-grid div,
.aop-gap-source-note {
  padding: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f9fafb;
}

.aop-gap-mini-grid span,
.aop-gap-inspector-block h4 {
  display: block;
  margin: 0 0 6px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.aop-gap-mini-grid strong {
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.aop-gap-inspector-trend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
}

.aop-gap-inspector-trend span {
  display: grid;
  gap: 5px;
  color: #6b7280;
  font-size: 11px;
}

.aop-gap-inspector-trend b {
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.aop-gap-inspector textarea {
  min-height: 92px;
  padding: 9px 10px;
  resize: vertical;
  line-height: 1.45;
}

.aop-gap-side-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aop-gap-source-note {
  display: grid;
  gap: 6px;
  color: #6b7280;
  line-height: 1.45;
}

.aop-gap-source-note b {
  color: #374151;
}

.aop-gap-empty {
  margin: 0;
  color: #9ca3af;
}

@media (max-width: 1280px) {
  .aop-gap-workbench {
    grid-template-columns: 1fr;
  }

  .aop-gap-inspector {
    position: static;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .aop-gap-title-row,
  .aop-gap-analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .aop-gap-status-strip {
    justify-content: start;
    grid-template-columns: 1fr;
  }

  .aop-gap-kpis,
  .aop-gap-risk-grid {
    grid-template-columns: 1fr;
  }
}

.model-list {
  display: grid;
  gap: 18px;
}

.model-switcher {
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) auto minmax(380px, 520px) auto;
  align-items: end;
  gap: 16px;
  padding: 13px 18px;
  overflow: visible;
}

.model-switcher h2 {
  color: var(--blue);
  font-size: 20px;
}

.model-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding-bottom: 1px;
}

.model-picker {
  position: relative;
  display: grid;
  gap: 7px;
  width: 100%;
}

.model-picker > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.model-select-trigger {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: center;
  padding: 7px 42px 7px 14px;
  border: 1px solid rgba(168, 190, 206, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  text-align: left;
}

.model-select-trigger::after {
  content: "⌄";
  position: absolute;
  right: 16px;
  top: 32px;
  color: var(--blue);
  font-size: 18px;
}

.model-select-trigger strong {
  grid-column: 1;
  font-size: 15px;
}

.model-select-trigger em {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.model-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  display: grid;
  gap: 4px;
  max-height: 330px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(168, 190, 206, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 54px rgba(22, 40, 58, 0.22);
  backdrop-filter: blur(18px) saturate(145%);
}

.model-options button {
  min-height: 44px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.model-options button:hover,
.model-options button.active {
  border-color: rgba(40, 111, 216, 0.28);
  background: #eef5ff;
}

.model-options button.all-option {
  background: linear-gradient(135deg, rgba(210, 255, 58, 0.16), rgba(49, 130, 246, 0.10));
}

.model-options span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e8f1ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.model-options button.all-option span {
  width: auto;
  min-width: 36px;
  padding: 0 8px;
  border-radius: 999px;
}

.model-options strong {
  font-size: 14px;
}

.model-options em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pager strong {
  color: var(--ink);
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.icon-btn {
  width: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.model-card {
  overflow: hidden;
}

.model-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(980px, 1.52fr);
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(245, 249, 252, 0.74), rgba(255, 255, 255, 0.55));
}

.model-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.series-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.model-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

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

.model-metrics {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1.3fr) repeat(6, minmax(118px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 12px;
  background: #fff;
  text-align: left;
}

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

.metric strong {
  color: var(--ink);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.transit-metric {
  min-width: 150px;
}

.transit-metric strong {
  color: var(--teal);
}

.transit-metric em {
  min-height: 14px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.3;
  white-space: normal;
}

.model-body {
  display: grid;
  gap: 11px;
  padding: 12px 18px 14px;
}

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

.section-head h3 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: var(--ink);
  font-size: 15px;
}

.section-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--teal);
}

.mini-btn {
  min-height: 30px;
  padding: 0 10px;
  color: var(--blue);
  font-size: 12px;
}

.detail-toggle {
  justify-self: start;
  align-self: end;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.all-model-dock {
  display: grid;
  gap: 10px;
  margin-top: -6px;
}

.all-model-panel {
  overflow: hidden;
}

.all-model-head {
  padding: 13px 18px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(245, 249, 252, 0.78), rgba(255, 255, 255, 0.58));
}

.all-model-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.all-model-body {
  padding: 12px 18px 16px;
}

.all-model-table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: stable;
  overscroll-behavior-x: contain;
}

.all-model-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.all-model-table-wrap::-webkit-scrollbar-track {
  background: #eef4f8;
}

.all-model-table-wrap::-webkit-scrollbar-thumb {
  background: #b8c8d8;
  border: 3px solid #eef4f8;
  border-radius: 999px;
}

.all-model-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8fa6bb;
}

.all-model-table {
  min-width: 980px;
}

.all-model-table th:first-child,
.all-model-table td:first-child {
  width: 178px;
}

.all-model-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.all-model-table thead th:first-child {
  z-index: 5;
}

.all-model-total-row td {
  background: #f1f6fb;
  color: #1f3348;
  font-weight: 950;
}

.all-model-total-row td:first-child {
  text-align: left;
}

.all-model-empty {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #bfd0df;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.all-model-link {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 950;
  text-align: left;
}

.all-model-link:hover {
  text-decoration: underline;
}

.all-model-link em {
  color: var(--muted);
  font-style: normal;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.model-body section {
  min-height: 0;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 5px 9px;
  text-align: right;
  vertical-align: middle;
  color: #41566d;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

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

th {
  background: #eef4f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 138px;
  text-align: left;
  color: var(--muted);
  font-weight: 900;
  background: #f4f8fb;
}

th:first-child {
  z-index: 2;
}

tbody tr:hover td {
  background-color: #f8fbfd;
}

td input {
  width: min(100%, 74px);
  height: 20px;
  text-align: right;
  font-size: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(183, 202, 216, 0.72);
  border-radius: 6px;
  padding: 0 6px;
  box-shadow: inset 2px 0 0 rgba(16, 169, 137, 0.85);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

td input[data-field="air"],
td input[data-field="sea"],
td input[data-field="activation"] {
  border-left: 1px solid rgba(183, 202, 216, 0.72);
  background: rgba(255, 255, 255, 0.88);
}

td input:hover {
  background: #fff;
  border-color: rgba(40, 111, 216, 0.42);
}

td input:focus {
  background: #fff;
  border-color: var(--teal);
  box-shadow: inset 2px 0 0 var(--teal), 0 0 0 3px rgba(16, 169, 137, 0.10);
}

.readonly {
  background: #f8fafc;
  color: var(--muted);
}

.dos-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-weight: 900;
}

.risk-critical {
  background: #ffe5e8;
  color: var(--red);
}

.risk-low {
  background: #fff0cf;
  color: var(--amber);
}

.risk-healthy {
  background: #dff5ee;
  color: var(--green);
}

.risk-high {
  background: #e9e7fb;
  color: var(--violet);
}

.risk-muted {
  background: #e9eef3;
  color: var(--muted);
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(124px, 1fr));
  gap: 8px;
}

.week-cell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.week-cell h4 {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
}

.week-cell dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  font-size: 11px;
}

.week-cell dt {
  color: var(--muted);
}

.week-cell dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1280px) {
  .topbar,
  .control-strip,
  .aop-head,
  .model-switcher,
  .model-head {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .button-row,
  .model-actions,
  .pager {
    justify-content: flex-start;
  }

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

  .model-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .weekly-grid {
    grid-template-columns: repeat(4, minmax(124px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 2000px);
  }

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

  .model-metrics,
  .aop-kpis,
  .weekly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button-row {
    flex-wrap: wrap;
  }
}

/* UI/UX Pro Max pass: glass surface, overflow boundaries, responsive guardrails. */
:root {
  --glass-surface: rgba(255, 255, 255, 0.76);
  --glass-popover: rgba(255, 255, 255, 0.985);
  --layer-popover: 2147483200;
}

html,
body {
  overflow-x: hidden;
}

.app-shell {
  max-width: 100%;
  isolation: isolate;
}

.login-form,
.control-strip,
.aop-summary,
.model-switcher,
.model-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.60));
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(22, 40, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.control-strip {
  z-index: 2147483100;
  grid-template-columns: minmax(170px, 205px) minmax(170px, 205px) minmax(0, 1fr);
}

.scope-picker,
.model-picker,
.model-title,
.model-body,
.week-cell,
.metric {
  min-width: 0;
}

.scope-trigger,
.model-select-trigger {
  background: var(--glass-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.scope-options,
.model-options {
  isolation: isolate;
  z-index: var(--layer-popover);
  background: var(--glass-popover);
  box-shadow: 0 28px 70px rgba(22, 40, 58, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.95) inset;
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  overscroll-behavior: contain;
}

.scope-options::before,
.model-options::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.96);
}

.scope-options {
  right: auto;
  width: max(100%, 230px);
  max-width: min(360px, calc(100vw - 40px));
  max-height: min(320px, calc(100vh - 140px));
}

.scope-options.drop-up,
.model-options.drop-up {
  top: auto;
  bottom: calc(100% + 8px);
}

.model-options {
  max-height: min(360px, calc(100vh - 170px));
}

.aop-summary,
.model-card {
  overflow: clip;
}

.aop-head {
  grid-template-columns: minmax(260px, 1fr) auto minmax(360px, 0.9fr);
  align-items: end;
}

.model-switcher {
  z-index: 2147482000;
  grid-template-columns: minmax(230px, 0.8fr) auto minmax(320px, 520px) auto;
}

.model-list {
  position: relative;
  z-index: 2147481000;
}

.model-card {
  position: relative;
  z-index: 1;
}

.aop-summary {
  z-index: 10;
}

.model-head {
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1.58fr);
}

.model-metrics {
  grid-template-columns: minmax(170px, 1.35fr) minmax(170px, 1.35fr) repeat(5, minmax(118px, 1fr));
  min-width: 0;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: min(940px, calc(100vw - 48px));
}

.aop-table table {
  min-width: min(980px, calc(100vw - 48px));
}

.weekly-grid {
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  max-width: 100%;
}

button,
input,
select {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.scope-trigger:focus-visible,
.model-select-trigger:focus-visible {
  outline: 3px solid rgba(40, 111, 216, 0.28);
  outline-offset: 2px;
}

@media (max-width: 1440px) {
  .model-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1441px) {
  .model-metrics {
    grid-template-columns: minmax(170px, 1.35fr) minmax(170px, 1.35fr) repeat(5, minmax(118px, 1fr));
  }
}

@media (max-width: 1100px) {
  .control-strip,
  .aop-head,
  .model-switcher,
  .model-head,
  .decision-hero,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .model-actions,
  .detail-actions,
  .pager {
    justify-content: flex-start;
  }

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

  .aop-spark-grid {
    min-width: 0;
  }

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

  .decision-model-strip {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .topbar,
  .control-strip,
  .aop-summary,
  .model-switcher,
  .model-card {
    border-radius: 10px;
  }

  .topbar,
  .model-head {
    padding: 14px;
  }

  .model-actions,
  .pager,
  .section-head {
    flex-wrap: wrap;
  }

  .model-metrics,
  .aop-kpis,
  .weekly-grid,
  .risk-overview {
    grid-template-columns: 1fr;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tab {
    min-width: 0;
    flex: 1;
  }

  .decision-hero {
    padding: 20px;
  }

  .decision-hero h2 {
    font-size: 24px;
  }

  .aop-spark-card strong,
  .action-number strong {
    font-size: 34px;
  }

  .aop-spark-grid {
    grid-template-columns: 1fr;
  }

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

  .scope-options,
  .model-options {
    width: 100%;
    max-width: calc(100vw - 40px);
  }
}

/* Infinix Marketing Intelligence visual system */
:root {
  --mi-bg: #f4f7f1;
  --mi-paper: rgba(255, 255, 250, 0.78);
  --mi-card: rgba(255, 255, 252, 0.9);
  --mi-soft: rgba(246, 249, 241, 0.82);
  --mi-ink: #111713;
  --mi-muted: #6d776d;
  --mi-quiet: #9aa598;
  --mi-line: rgba(22, 28, 22, 0.1);
  --mi-line-strong: rgba(22, 28, 22, 0.18);
  --mi-lime: #d7ff4b;
  --mi-lime-soft: rgba(215, 255, 75, 0.2);
  --mi-blue: #2c74d8;
  --mi-cyan: #08a8df;
  --mi-teal: #11aa83;
  --mi-red: #df5263;
  --mi-amber: #c07a09;
  --mi-shadow: 0 24px 70px rgba(31, 41, 33, 0.08);
  --mi-shadow-soft: 0 10px 30px rgba(31, 41, 33, 0.045);
}

body {
  color: var(--mi-ink);
  background:
    radial-gradient(circle at 16% 14%, rgba(215, 255, 75, 0.2), transparent 20rem),
    radial-gradient(circle at 88% 12%, rgba(17, 170, 131, 0.12), transparent 24rem),
    linear-gradient(180deg, #fbfcf7 0, var(--mi-bg) 42rem),
    repeating-linear-gradient(90deg, rgba(17, 23, 19, 0.035) 0 1px, transparent 1px 7.5rem),
    var(--mi-bg);
  font-family: "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body[data-brand="tecno"] {
  --mi-lime: #bfe7ff;
  --mi-lime-soft: rgba(91, 191, 255, 0.16);
  --mi-blue: #1f73d8;
  --mi-cyan: #1597e8;
  --mi-teal: #268de8;
  --teal: #268de8;
  --green: #1f73d8;
  background:
    radial-gradient(circle at 16% 14%, rgba(91, 191, 255, 0.20), transparent 20rem),
    radial-gradient(circle at 88% 12%, rgba(38, 141, 232, 0.14), transparent 24rem),
    linear-gradient(180deg, #f7fbff 0, #eef5fa 42rem),
    repeating-linear-gradient(90deg, rgba(12, 58, 100, 0.03) 0 1px, transparent 1px 7.5rem),
    #f7fbff;
}

body[data-brand="tecno"] .rail-mark {
  background: linear-gradient(135deg, #7fd4ff, #2c74d8);
  box-shadow: 0 12px 30px rgba(38, 141, 232, 0.24);
}

body[data-brand="tecno"] .topbar > div:first-child::before {
  content: "T";
  color: #0b2847;
  background: linear-gradient(135deg, #bfe7ff, #7fd4ff);
  box-shadow: 0 12px 30px rgba(38, 141, 232, 0.24);
}

body[data-brand="tecno"] .badge,
body[data-brand="tecno"] .country-dos-pill.ok,
body[data-brand="tecno"] .rate-good {
  color: #156fc4;
  background: rgba(38, 141, 232, 0.12);
  border-color: rgba(38, 141, 232, 0.22);
}

body[data-brand="tecno"] .series-chip,
body[data-brand="tecno"] .model-tag {
  background: linear-gradient(135deg, #1597e8, #2c74d8);
}

body[data-brand="tecno"] .accent-btn {
  background: linear-gradient(135deg, #1597e8, #2c74d8);
  border-color: rgba(38, 141, 232, 0.45);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.32)),
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.7), transparent 34rem);
}

button,
input,
select {
  letter-spacing: 0;
}

.app-shell {
  width: calc(100% - 118px);
  max-width: none;
  margin: 0 24px 0 94px;
  padding: 0 0 54px;
}

.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 900;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 0;
  background: rgba(229, 233, 224, 0.72);
  border-right: 1px solid rgba(17, 23, 19, 0.08);
  backdrop-filter: blur(22px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.76);
}

.rail-mark,
.rail-item {
  border: 0;
  display: grid;
  place-items: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.rail-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #111713;
  background: var(--mi-lime);
  box-shadow: 0 12px 26px rgba(190, 238, 44, 0.36);
  font-weight: 900;
}

.rail-item {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: rgba(17, 23, 19, 0.62);
  background: rgba(255, 255, 252, 0.66);
  border: 1px solid rgba(17, 23, 19, 0.06);
}

.rail-item.active,
.rail-item:hover {
  color: #fff;
  background: #111713;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(17, 23, 19, 0.18);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 850;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: 82px;
  margin: 0 0 28px;
  padding: 18px 0 16px;
  color: var(--mi-ink);
  background: rgba(251, 252, 247, 0.78);
  border: 0;
  border-bottom: 1px solid var(--mi-line);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: blur(22px);
}

.topbar > div:first-child {
  position: relative;
  display: grid;
  grid-template-columns: 42px auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
}

.topbar > div:first-child::before {
  content: "i";
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(17, 23, 19, 0.68);
  background: var(--mi-lime);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(215, 255, 75, 0.36);
  grid-row: 1 / 3;
}

.topbar .eyebrow,
.decision-hero .eyebrow,
.aop-summary .eyebrow,
.model-switcher .eyebrow {
  color: var(--mi-cyan);
  font-size: 10px;
  letter-spacing: 0.28em;
  font-weight: 900;
}

.topbar h1 {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--mi-ink);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 850;
}

.topbar > div:first-child .eyebrow {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 4px;
  white-space: nowrap;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.58);
  border: 1px solid var(--mi-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-pill {
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  color: rgba(17, 23, 19, 0.62);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.nav-pill:hover {
  color: var(--mi-ink);
  transform: translateY(-1px);
}

.nav-pill.active {
  color: #fff;
  background: #111713;
  box-shadow: 0 12px 24px rgba(17, 23, 19, 0.2);
}

.top-actions {
  justify-content: end;
}

.badge {
  color: #0b7e62;
  background: rgba(17, 170, 131, 0.12);
  border-color: rgba(17, 170, 131, 0.26);
}

.ghost-btn,
.primary-btn,
.download-btn,
.secondary-btn {
  border-radius: 999px;
  min-height: 40px;
  padding: 0 18px;
  font-weight: 900;
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-btn,
.secondary-btn {
  background: #111713;
  border-color: #111713;
  color: #fff;
}

.download-btn,
.ghost-btn {
  color: var(--mi-ink);
  background: rgba(255, 255, 252, 0.7);
  border: 1px solid var(--mi-line-strong);
}

.primary-btn:hover,
.secondary-btn:hover,
.download-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(17, 23, 19, 0.12);
}

.control-strip,
.notice,
.aop-summary,
.country-summary-panel,
.model-switcher,
.model-card,
.decision-card,
.decision-hero,
.risk-overview {
  background: var(--mi-paper);
  border: 1px solid var(--mi-line);
  border-radius: 24px;
  box-shadow: var(--mi-shadow-soft);
  backdrop-filter: blur(24px) saturate(1.08);
}

.control-strip {
  position: relative;
  z-index: 2147483600;
  display: flex;
  gap: 14px;
  align-items: end;
  padding: 16px 18px;
  min-height: 108px;
  margin-bottom: 18px;
  overflow: visible;
}

.scope-field {
  width: 280px;
  max-width: 100%;
}

.scope-field span,
.field-label,
.metric span,
.summary-cell span {
  color: #657385;
  font-size: 12px;
  font-weight: 850;
}

.native-scope-select {
  position: relative;
  z-index: 2147482500;
  display: block;
  width: 100%;
  min-height: 66px;
  padding: 16px 48px 13px 20px;
  color: var(--mi-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 252, 0.97), rgba(248, 252, 247, 0.86)),
    radial-gradient(circle at 12% 18%, rgba(215, 255, 75, 0.18), transparent 42%),
    radial-gradient(circle at 92% 20%, rgba(44, 116, 216, 0.10), transparent 36%);
  border: 1px solid rgba(91, 111, 128, 0.22);
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 18px 42px rgba(31, 41, 33, 0.055);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}

.scope-picker {
  display: none !important;
}

.native-scope-select:hover,
.native-scope-select:focus {
  outline: 0;
  border-color: rgba(44, 116, 216, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 22px 48px rgba(44, 116, 216, 0.09),
    0 0 0 4px rgba(44, 116, 216, 0.08);
}

.scope-trigger {
  min-height: 56px;
  border-radius: 18px;
  padding: 12px 44px 10px 18px;
  color: var(--mi-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 252, 0.96), rgba(247, 251, 246, 0.78)),
    radial-gradient(circle at 12% 20%, rgba(215, 255, 75, 0.16), transparent 42%);
  border: 1px solid rgba(91, 111, 128, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 18px 42px rgba(31, 41, 33, 0.055);
}

.scope-trigger:hover {
  border-color: rgba(44, 116, 216, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 22px 48px rgba(44, 116, 216, 0.09);
}

.scope-trigger strong {
  color: var(--mi-ink);
  font-size: 16px;
  letter-spacing: 0;
}

.scope-trigger em {
  margin-top: 2px;
  color: #708196;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scope-trigger::after {
  right: 16px;
  top: 17px;
  color: var(--mi-blue);
  font-size: 17px;
}

.scope-options {
  z-index: 2147483000;
  left: 0;
  top: calc(100% + 10px);
  right: auto;
  width: min(300px, calc(100vw - 40px));
  padding: 8px;
  margin-top: 10px;
  border-radius: 20px;
  border: 1px solid rgba(91, 111, 128, 0.18);
  background: rgba(255, 255, 252, 0.96);
  box-shadow: 0 28px 80px rgba(31, 41, 33, 0.17);
  backdrop-filter: blur(30px) saturate(1.08);
}

.scope-options.drop-up {
  top: auto;
  bottom: calc(100% + 10px);
  margin-top: 0;
}

.scope-options button {
  min-height: 44px;
  border-radius: 14px;
  padding: 9px 12px;
  border: 1px solid transparent;
  background: transparent;
}

.scope-options button:hover,
.scope-options button.active {
  border-color: rgba(44, 116, 216, 0.28);
  background: linear-gradient(135deg, rgba(237, 246, 255, 0.92), rgba(255, 255, 252, 0.88));
}

.scope-options strong {
  color: var(--mi-ink);
  font-size: 14px;
}

.scope-options em {
  color: #728397;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.view-tabs {
  display: none;
}

.notice {
  border-color: rgba(192, 122, 9, 0.22);
  color: #8a5a0b;
  background: rgba(255, 248, 225, 0.78);
}

.decision-shell,
.model-list {
  gap: 22px;
}

.view-panel > .decision-shell,
.view-panel > .model-list {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.decision-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(380px, 0.9fr);
  gap: 24px;
  align-items: end;
  padding: 32px 28px;
}

.decision-hero::before,
.model-card::before,
.aop-summary::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 5px;
  height: 34px;
  background: linear-gradient(180deg, var(--mi-teal), var(--mi-lime));
  border-radius: 0 0 999px 0;
}

.decision-hero h2,
.aop-summary h2,
.model-switcher h2 {
  color: var(--mi-blue);
  letter-spacing: -0.02em;
  font-weight: 900;
}

.decision-hero h2 {
  max-width: 900px;
  font-size: clamp(42px, 4.8vw, 72px);
  line-height: 0.94;
}

.decision-hero p:not(.eyebrow) {
  color: var(--mi-muted);
  font-size: 15px;
}

.aop-kpi {
  gap: 12px;
}

.aop-kpi-item,
.summary-card,
.metric,
.transit-metric {
  background: rgba(255, 255, 252, 0.62);
  border: 1px solid var(--mi-line);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.aop-kpi-item strong,
.summary-cell strong,
.metric strong,
.transit-metric strong {
  color: var(--mi-ink);
}

.decision-model-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.decision-model-card {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--mi-line);
  background: rgba(255, 255, 252, 0.82);
  box-shadow: var(--mi-shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.decision-model-card:hover,
.decision-model-card.active {
  transform: translateY(-3px);
  border-color: rgba(44, 116, 216, 0.5);
  background: linear-gradient(135deg, rgba(255, 255, 252, 0.98), rgba(237, 246, 255, 0.86));
  box-shadow: 0 18px 40px rgba(44, 116, 216, 0.12);
}

.decision-model-card strong {
  color: var(--mi-ink);
  font-size: 14px;
  letter-spacing: 0;
}

.decision-model-card span {
  color: #758499;
  font-size: 11px;
}

.decision-model-card em,
.status-pill,
.dos-pill {
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
}

.risk-overview {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
}

.risk-overview > div {
  min-height: 74px;
  padding: 14px 20px;
  border-right: 1px solid var(--mi-line);
}

.risk-overview > div:last-child {
  border-right: 0;
}

.risk-overview span {
  color: #607387;
  font-weight: 850;
}

.risk-overview strong {
  color: var(--mi-ink);
  font-size: 30px;
}

.decision-grid {
  grid-template-columns: minmax(320px, 0.46fr) minmax(0, 1fr);
  gap: 22px;
}

.decision-card {
  position: relative;
  padding: 26px;
  overflow: hidden;
}

.action-card .action-range {
  color: #7467c8;
  background: rgba(116, 103, 200, 0.14);
  border-radius: 8px;
  padding: 4px 10px;
}

.action-number {
  background: linear-gradient(135deg, rgba(255, 255, 252, 0.88), rgba(247, 250, 244, 0.86));
  border: 0;
  border-radius: 22px;
}

.action-number strong,
.action-number.is-add strong {
  color: var(--mi-teal);
}

.action-number.is-reduce strong {
  color: var(--mi-amber);
}

.action-list li {
  background: rgba(241, 248, 242, 0.72);
  border: 1px solid rgba(17, 170, 131, 0.08);
  border-radius: 12px;
}

.chart-card {
  min-height: 560px;
}

.dos-chart {
  filter: drop-shadow(0 16px 28px rgba(8, 168, 223, 0.08));
}

.decision-tooltip {
  border-radius: 14px;
  background: rgba(17, 23, 19, 0.92);
  border: 1px solid rgba(215, 255, 75, 0.28);
  box-shadow: 0 20px 60px rgba(17, 23, 19, 0.22);
  backdrop-filter: blur(18px);
}

.aop-summary,
.model-switcher,
.model-card {
  position: relative;
  padding: 24px 26px;
}

.aop-summary {
  overflow: visible;
}

.aop-header,
.model-switcher {
  align-items: center;
}

.summary-card {
  min-height: 76px;
}

.summary-table,
.month-table {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--mi-line);
  background: rgba(255, 255, 252, 0.72);
}

table {
  border-collapse: collapse;
}

th {
  color: #607387;
  background: rgba(236, 242, 247, 0.78);
  font-size: 11px;
  font-weight: 900;
}

td {
  border-color: rgba(22, 28, 22, 0.08);
}

.model-switcher {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) auto minmax(380px, 0.72fr) auto;
  gap: 22px;
}

.model-actions {
  justify-self: center;
}

.model-selector {
  position: relative;
  z-index: 720;
}

.model-select-trigger {
  border-radius: 12px;
  background: rgba(255, 255, 252, 0.82);
  border: 1px solid rgba(91, 111, 128, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 24px rgba(31, 41, 33, 0.04);
}

.model-select-menu {
  z-index: 2147483200;
  border-radius: 18px;
  border: 1px solid var(--mi-line-strong);
  background: rgba(255, 255, 252, 0.96);
  box-shadow: 0 28px 80px rgba(31, 41, 33, 0.18);
  backdrop-filter: blur(28px);
}

.model-option:hover,
.model-option.active {
  background: rgba(44, 116, 216, 0.1);
}

.model-card {
  overflow: hidden;
}

.model-card-header {
  align-items: center;
  padding: 8px 0 18px;
}

.model-tag {
  border-radius: 8px;
  background: var(--mi-teal);
  color: #fff;
}

.model-title h3 {
  color: var(--mi-ink);
  font-size: 22px;
}

.model-title p {
  color: #6f8093;
}

.model-metrics {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--mi-line);
  background: rgba(255, 255, 252, 0.66);
}

.metric {
  min-height: 76px;
  border-radius: 0;
  border-width: 0 1px 0 0;
  background: transparent;
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  font-size: 25px;
}

.transit-metric strong {
  color: var(--mi-teal);
}

.section-heading {
  color: var(--mi-ink);
  font-size: 18px;
}

.section-heading::before {
  background: linear-gradient(180deg, var(--mi-teal), var(--mi-lime));
}

.table-wrap {
  border-radius: 16px;
  border: 1px solid var(--mi-line);
  overflow: hidden;
  background: rgba(255, 255, 252, 0.74);
}

.country-summary-panel {
  position: relative;
  overflow: visible;
  display: grid;
  gap: 18px;
  padding: 24px 26px;
}

.country-summary-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 5px;
  height: 34px;
  background: linear-gradient(180deg, var(--mi-teal), var(--mi-lime));
  border-radius: 0 0 999px 0;
}

.country-summary-head {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.7fr);
  gap: 22px;
  align-items: end;
}

.country-summary-head h2 {
  margin: 4px 0 6px;
  color: var(--mi-blue);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.country-summary-head p {
  margin: 0;
  color: var(--mi-muted);
  font-size: 13px;
  font-weight: 750;
}

.country-summary-note {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #526275;
  background: linear-gradient(135deg, rgba(245, 250, 250, 0.9), rgba(255, 255, 252, 0.76));
  border: 1px solid var(--mi-line);
}

.country-summary-note strong {
  color: var(--mi-ink);
  font-size: 14px;
}

.country-summary-note span {
  color: #718196;
  font-size: 12px;
  line-height: 1.45;
}

.country-scenario-tabs {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(190, 209, 226, 0.66);
  background: rgba(247, 252, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.country-scenario-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  color: #64758a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.country-scenario-tabs span.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--mi-blue), var(--mi-teal));
  box-shadow: 0 10px 22px rgba(22, 132, 209, 0.22);
}

.country-summary-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--mi-line);
  background: rgba(255, 255, 252, 0.72);
}

.country-summary-kpis > div {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px 18px;
  border-right: 1px solid var(--mi-line);
}

.country-summary-kpis > div:last-child {
  border-right: 0;
}

.country-summary-kpis span {
  color: #657385;
  font-size: 11px;
  font-weight: 900;
}

.country-summary-kpis strong {
  color: var(--mi-ink);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.country-summary-kpis > div:last-child strong {
  color: var(--mi-blue);
}

.country-summary-kpis em {
  color: #75859a;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.country-summary-table table {
  min-width: 980px;
}

.country-summary-table th:not(:first-child),
.country-summary-table td:not(:first-child) {
  text-align: center;
}

.country-toggle-row td {
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(232, 245, 255, 0.76), rgba(255, 255, 252, 0.78));
  text-align: left !important;
}

.country-compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid rgba(98, 165, 229, 0.3);
  border-radius: 999px;
  color: var(--mi-blue);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(48, 122, 202, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.country-compare-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(35, 132, 221, 0.54);
  box-shadow: 0 14px 28px rgba(48, 122, 202, 0.14);
}

.country-compare-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--mi-blue), #28b9dc);
  font-size: 12px;
}

.country-compare-row td {
  color: #2872b7;
  font-weight: 900;
  background: rgba(232, 245, 255, 0.42);
}

.country-compare-row td:first-child {
  color: #24669e;
  background: rgba(224, 241, 255, 0.74);
}

.country-compare-last td {
  border-bottom: 0;
}

.country-dos-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 66px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.country-dos-pill.ok {
  color: var(--mi-teal);
  background: rgba(17, 170, 131, 0.14);
}

.country-dos-pill.low {
  color: var(--mi-red);
  background: rgba(223, 82, 99, 0.13);
}

.country-dos-pill.high {
  color: #7467c8;
  background: rgba(116, 103, 200, 0.14);
}

.country-dos-pill.neutral {
  color: #6f8093;
  background: rgba(111, 128, 147, 0.12);
}

.month-table input[type="number"] {
  width: min(132px, 82%);
  height: 24px;
  padding: 0 10px;
  border-radius: 7px;
  color: #1e2c38;
  background: rgba(255, 255, 252, 0.9);
  border: 1px solid rgba(17, 170, 131, 0.38);
  border-left: 3px solid var(--mi-teal);
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
}

.month-table input[type="number"]:focus {
  outline: 0;
  border-color: rgba(44, 116, 216, 0.56);
  box-shadow: 0 0 0 3px rgba(44, 116, 216, 0.08);
}

.dos-pill {
  min-width: 64px;
  padding: 3px 9px;
}

.week-grid {
  gap: 10px;
}

.week-card {
  border-radius: 12px;
  border: 1px solid var(--mi-line);
  background: rgba(255, 255, 252, 0.78);
  box-shadow: var(--mi-shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease;
}

.week-card:hover {
  transform: translateY(-3px);
  border-color: rgba(44, 116, 216, 0.32);
}

.week-card h4 {
  color: var(--mi-blue);
}

.login-shell {
  background:
    radial-gradient(circle at 22% 14%, rgba(215, 255, 75, 0.24), transparent 22rem),
    linear-gradient(180deg, #fbfcf7, var(--mi-bg));
}

.login-panel {
  color: var(--mi-ink);
  background: rgba(255, 255, 252, 0.86);
  border: 1px solid var(--mi-line);
  box-shadow: var(--mi-shadow);
}

@keyframes mi-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.992);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes mi-soft-pulse {
  0%, 100% {
    box-shadow: 0 12px 30px rgba(215, 255, 75, 0.26);
  }
  50% {
    box-shadow: 0 18px 42px rgba(215, 255, 75, 0.46);
  }
}

.rail-mark {
  animation: mi-soft-pulse 3.8s ease-in-out infinite;
}

.control-strip,
.notice,
.decision-hero,
.decision-model-card,
.risk-overview,
.decision-card,
.aop-summary,
.aop-insight-card,
.country-summary-panel,
.model-switcher,
.model-card,
.week-card {
  animation: mi-rise 620ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
}

.decision-model-card:nth-child(2),
.week-card:nth-child(2) {
  animation-delay: 40ms;
}

.decision-model-card:nth-child(3),
.week-card:nth-child(3) {
  animation-delay: 80ms;
}

.decision-model-card:nth-child(4),
.week-card:nth-child(4) {
  animation-delay: 120ms;
}

.decision-model-card:nth-child(5),
.week-card:nth-child(5) {
  animation-delay: 160ms;
}

.decision-model-card:nth-child(6),
.week-card:nth-child(6) {
  animation-delay: 200ms;
}

.decision-model-card:nth-child(7),
.week-card:nth-child(7) {
  animation-delay: 240ms;
}

.decision-model-card:nth-child(8),
.week-card:nth-child(8) {
  animation-delay: 280ms;
}

@media (max-width: 1180px) {
  .app-shell {
    width: calc(100% - 92px);
    margin-left: 82px;
    margin-right: 10px;
  }

  .topbar,
  .decision-hero,
  .model-switcher,
  .decision-grid,
  .detail-action-panel,
  .aop-top-grid,
  .aop-runway-grid,
  .country-summary-head,
  .aop-card-head {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .model-actions {
    justify-content: start;
    justify-self: start;
  }

  .decision-model-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .aop-node-grid,
  .country-summary-kpis,
  .aop-mini-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 20px);
    margin: 0 10px;
  }

  .side-rail {
    display: none;
  }

  .topbar,
  .control-strip,
  .country-summary-head,
  .model-switcher {
    position: relative;
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: start;
    overflow-x: auto;
  }

  .scope-field {
    width: 100%;
  }

  .decision-model-strip,
  .risk-overview,
  .model-metrics,
  .country-summary-kpis,
  .aop-node-grid,
  .aop-mini-kpis {
    grid-template-columns: 1fr;
  }

  .aop-insight-card {
    padding: 18px 14px;
  }

  .aop-card-head {
    flex-direction: column;
  }

  .aop-legend {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Login redesign: West Africa DRP entry */
.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 38px 24px 64px;
  overflow: hidden;
  color: #132136;
  background:
    radial-gradient(circle at 28% 24%, rgba(46, 137, 232, 0.18), transparent 28rem),
    radial-gradient(circle at 78% 70%, rgba(18, 123, 209, 0.12), transparent 30rem),
    linear-gradient(180deg, #f7fbff 0%, #eff7ff 46%, #f8fbff 100%);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
}

.login-shell::before {
  opacity: 0.58;
  background:
    radial-gradient(circle at 17% 23%, rgba(62, 152, 238, 0.25) 0 2px, transparent 3px),
    radial-gradient(circle at 21% 29%, rgba(62, 152, 238, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 26% 18%, rgba(62, 152, 238, 0.20) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 18%, rgba(62, 152, 238, 0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 83% 42%, rgba(62, 152, 238, 0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 76%, rgba(62, 152, 238, 0.15) 0 2px, transparent 3px),
    repeating-radial-gradient(circle at 18% 20%, rgba(73, 151, 224, 0.10) 0 2px, transparent 2px 10px),
    repeating-radial-gradient(circle at 82% 25%, rgba(73, 151, 224, 0.08) 0 2px, transparent 2px 10px);
  mask-image:
    radial-gradient(ellipse 34% 26% at 20% 22%, #000 30%, transparent 72%),
    radial-gradient(ellipse 36% 30% at 82% 44%, #000 32%, transparent 74%);
}

.login-shell::after {
  opacity: 0.42;
  background:
    linear-gradient(115deg, transparent 12%, rgba(45, 137, 229, 0.20) 12.2%, transparent 12.5% 52%, rgba(45, 137, 229, 0.14) 52.2%, transparent 52.5%),
    radial-gradient(circle at 18% 24%, transparent 0 9rem, rgba(45, 137, 229, 0.18) 9.1rem 9.2rem, transparent 9.3rem),
    radial-gradient(circle at 78% 28%, transparent 0 11rem, rgba(45, 137, 229, 0.14) 11.1rem 11.2rem, transparent 11.3rem);
  filter: blur(0.2px);
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100vw - 160px));
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(520px, 1.2fr) minmax(430px, 0.98fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  color: #132136;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(199, 218, 238, 0.82);
  border-radius: 14px;
  box-shadow: 0 28px 90px rgba(21, 55, 95, 0.18);
  backdrop-filter: blur(18px) saturate(150%);
  animation: login-card-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-brand-panel {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(7, 34, 78, 0.98), rgba(5, 62, 124, 0.92)),
    #06264f;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 38%, rgba(92, 177, 255, 0.28), transparent 17rem),
    radial-gradient(circle at 68% 66%, rgba(37, 144, 236, 0.22), transparent 13rem),
    repeating-radial-gradient(circle at 64% 40%, rgba(129, 199, 255, 0.26) 0 1px, transparent 1px 7px);
  mask-image: radial-gradient(ellipse 46% 52% at 70% 43%, #000 34%, transparent 75%);
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  left: 42%;
  right: 0;
  bottom: 0;
  height: 185px;
  opacity: 0.70;
  background:
    linear-gradient(0deg, rgba(2, 16, 35, 0.88), transparent 80%),
    linear-gradient(90deg, transparent 0 14%, rgba(255, 255, 255, 0.22) 14.5% 16%, transparent 16.5% 19%, rgba(255, 255, 255, 0.16) 19.4% 20.4%, transparent 21%),
    linear-gradient(0deg, rgba(132, 188, 231, 0.38) 0 5px, transparent 6px),
    radial-gradient(ellipse at 56% 77%, rgba(11, 44, 85, 0.80) 0 12%, transparent 13%);
}

.login-map-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 69% 36%, rgba(120, 203, 255, 0.86) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 52%, rgba(120, 203, 255, 0.76) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 44%, rgba(120, 203, 255, 0.64) 0 2px, transparent 3px),
    radial-gradient(circle at 83% 62%, rgba(120, 203, 255, 0.70) 0 2px, transparent 3px),
    linear-gradient(115deg, transparent 0 58%, rgba(112, 194, 255, 0.26) 58.2%, transparent 58.5% 100%),
    linear-gradient(42deg, transparent 0 48%, rgba(112, 194, 255, 0.20) 48.2%, transparent 48.5% 100%);
  animation: login-map-pulse 4.8s ease-in-out infinite;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 590px;
  display: flex;
  flex-direction: column;
  padding: 62px 64px 52px;
}

.region-chip {
  align-self: flex-start;
  margin-bottom: 24px;
  padding: 8px 15px;
  border-radius: 7px;
  color: #cfefff;
  background: rgba(45, 144, 226, 0.38);
  border: 1px solid rgba(125, 198, 255, 0.25);
  font-size: 18px;
  font-weight: 800;
}

.login-brand-content h1 {
  max-width: 580px;
  margin: 0;
  color: #fff;
  font-size: 48px;
  line-height: 1.12;
  font-weight: 950;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.login-subtitle {
  margin: 18px 0 0;
  color: rgba(235, 247, 255, 0.94);
  font-size: 25px;
  font-weight: 650;
}

.title-rule {
  display: block;
  width: 52px;
  height: 4px;
  margin: 34px 0 36px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2098f4, #7ed7ff);
  box-shadow: 0 0 18px rgba(74, 177, 255, 0.48);
}

.login-feature-list {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-feature-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 18px;
  align-items: center;
}

.login-feature-list strong,
.login-feature-list em {
  grid-column: 2;
  display: block;
}

.login-feature-list strong {
  color: #f7fbff;
  font-size: 18px;
  font-weight: 850;
}

.login-feature-list em {
  margin-top: 5px;
  color: rgba(216, 235, 252, 0.80);
  font-size: 15px;
  font-style: normal;
}

.feature-icon {
  grid-row: span 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(49, 157, 246, 0.92), rgba(21, 74, 167, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 28px rgba(0, 17, 44, 0.26);
}

.feature-icon::before,
.feature-icon::after {
  content: "";
  position: absolute;
}

.chart-icon,
.cube-icon,
.truck-icon {
  position: relative;
}

.chart-icon::before {
  left: 16px;
  top: 15px;
  width: 22px;
  height: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid rgba(255, 255, 255, 0.9);
}

.chart-icon::after {
  left: 19px;
  top: 24px;
  width: 23px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: skew(-24deg) rotate(-14deg);
}

.cube-icon {
  background: linear-gradient(145deg, rgba(56, 178, 142, 0.96), rgba(20, 111, 104, 0.78));
}

.cube-icon::before {
  left: 16px;
  top: 15px;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg) skew(-8deg, -8deg);
}

.cube-icon::after {
  left: 26px;
  top: 18px;
  width: 2px;
  height: 20px;
  background: rgba(255, 255, 255, 0.82);
  transform: rotate(-28deg);
}

.truck-icon {
  background: linear-gradient(145deg, rgba(74, 80, 205, 0.96), rgba(30, 73, 168, 0.78));
}

.truck-icon::before {
  left: 14px;
  top: 20px;
  width: 25px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 3px;
}

.truck-icon::after {
  left: 19px;
  top: 33px;
  width: 25px;
  height: 6px;
  border-left: 5px solid rgba(255, 255, 255, 0.9);
  border-right: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: auto;
  font-size: 30px;
  font-weight: 950;
}

.brand-lockup i {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.52);
}

.tecno-logo {
  color: #1890ff;
}

.infinix-logo {
  color: #a6e849;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  min-height: 590px;
  padding: 68px 58px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 254, 255, 0.94));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.login-copy h2 {
  margin: 0;
  color: #132136;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 950;
}

.login-copy p {
  margin: 12px 0 28px;
  color: #667588;
  font-size: 17px;
  font-weight: 600;
}

.login-field {
  display: grid;
  gap: 12px;
  color: #1d2e43;
  font-size: 14px;
  font-weight: 850;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap input {
  height: 58px;
  padding: 0 52px;
  border-radius: 7px;
  border: 1px solid #cdd9e6;
  color: #172534;
  background: #fff;
  font-size: 16px;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(16, 37, 66, 0.02);
}

.login-input-wrap input::placeholder {
  color: #9aa9ba;
  font-weight: 600;
}

.login-input-wrap input:hover,
.login-input-wrap input:focus {
  border-color: #2d7fe4;
  box-shadow: 0 0 0 4px rgba(45, 127, 228, 0.12), inset 0 1px 0 rgba(16, 37, 66, 0.03);
}

.input-icon {
  position: absolute;
  left: 20px;
  width: 21px;
  height: 21px;
  pointer-events: none;
  color: #637386;
}

.user-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.user-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 16px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 4px 4px;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.lock-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 8px;
  height: 11px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.password-toggle {
  position: absolute;
  right: 17px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 3px, #657386 4px 5px, transparent 6px),
    radial-gradient(ellipse at 50% 50%, transparent 0 8px, #657386 9px 10px, transparent 11px);
}

.password-toggle::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #657386;
  transform: rotate(42deg);
  transition: opacity 160ms ease;
}

.password-toggle.is-visible::after {
  opacity: 0;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.remember-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  color: #526276;
  font-size: 15px;
  font-weight: 650;
}

.remember-line input {
  width: 18px;
  height: 18px;
  accent-color: #0c60c8;
}

.forgot-link {
  border: 0;
  background: transparent;
  color: #0b65dc;
  padding: 0;
  font-size: 15px;
  font-weight: 800;
}

.login-submit {
  height: 62px;
  margin-top: 6px;
  border-radius: 7px;
  border: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, #053063, #0f56c6 62%, #0849b3);
  box-shadow: 0 16px 32px rgba(10, 76, 171, 0.24);
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(10, 76, 171, 0.30);
}

.login-form .error-text {
  min-height: 20px;
  margin: -10px 0 0;
  color: #ce3948;
  font-size: 13px;
  font-weight: 700;
}

.login-support {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  margin: 0;
  color: #75879a;
  font-size: 14px;
  font-weight: 650;
}

.login-support::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -3px;
  border: 2px solid #8eb4df;
  border-radius: 5px 5px 7px 7px;
  clip-path: polygon(50% 0, 100% 22%, 100% 70%, 50% 100%, 0 70%, 0 22%);
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes login-map-pulse {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .login-panel {
    width: min(760px, calc(100vw - 36px));
    grid-template-columns: 1fr;
  }

  .login-brand-panel,
  .login-brand-content {
    min-height: 360px;
  }

  .login-brand-content {
    padding: 38px;
  }

  .login-form {
    min-height: auto;
    padding: 42px 38px;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 18px 14px 54px;
  }

  .login-panel {
    width: 100%;
    border-radius: 12px;
  }

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

  .login-subtitle {
    font-size: 19px;
  }

  .login-feature-list {
    gap: 16px;
  }

  .login-form {
    padding: 32px 24px;
  }

  .login-copy h2 {
    font-size: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-panel,
  .login-map-glow {
    animation: none;
  }
}

/* Production responsive polish: keep menus near their trigger and compact login on lower-height screens. */
.model-picker {
  isolation: isolate;
}

.model-options,
.model-options.drop-up {
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 2147483000;
  max-height: min(282px, calc(100vh - 190px));
  overscroll-behavior: contain;
}

.model-options {
  box-shadow: 0 22px 54px rgba(21, 39, 58, 0.20);
}

.model-switcher {
  grid-template-columns: 1fr !important;
}

.model-control-dock {
  position: relative;
  z-index: 2147482500;
  display: grid;
  grid-template-columns: auto minmax(360px, 680px) auto;
  justify-content: end;
  align-items: end;
  gap: 14px;
  padding: 16px 24px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 253, 255, 0.66));
  box-shadow: 0 18px 48px rgba(22, 40, 58, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
}

.model-control-dock .model-actions {
  justify-self: end;
}

.model-control-dock .model-picker {
  min-width: 0;
}

.model-control-dock .pager {
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .model-control-dock {
    grid-template-columns: auto minmax(320px, 1fr) auto;
    gap: 14px;
    align-items: end;
  }

  .model-options,
  .model-options.drop-up {
    max-height: min(246px, calc(100vh - 180px));
  }
}

@media (max-height: 860px) and (min-width: 901px) {
  .login-shell {
    min-height: 100vh;
    padding: 14px 18px 38px;
  }

  .login-panel {
    width: min(1088px, calc((100vw - 96px) / 0.82));
    min-height: 472px;
    grid-template-columns: minmax(416px, 1.2fr) minmax(344px, 0.98fr);
    transform: scale(0.82);
    transform-origin: center center;
  }

  .login-brand-panel,
  .login-brand-content,
  .login-form {
    min-height: 472px;
  }

  .login-brand-content {
    padding: 50px 52px 42px;
  }

  .login-brand-content h1 {
    font-size: 44px;
  }

  .login-subtitle {
    font-size: 23px;
  }

  .login-feature-list {
    gap: 22px;
    margin-top: 28px;
  }

  .login-feature-list li {
    gap: 18px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }

  .brand-lockup {
    margin-top: auto;
    font-size: 30px;
  }

  .login-form {
    gap: 18px;
    padding: 50px 46px;
  }

  .login-copy h2 {
    font-size: 30px;
  }

  .login-copy p {
    margin: 10px 0 16px;
    font-size: 15px;
  }

  .login-field {
    gap: 9px;
  }

  .login-input-wrap input {
    height: 50px;
    font-size: 15px;
  }

  .login-submit {
    height: 54px;
    font-size: 18px;
  }

  .login-support {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .login-panel {
    transform: scale(0.78);
  }
}

@media (max-width: 1180px) {
  .model-control-dock {
    grid-template-columns: 1fr;
    justify-content: stretch;
    align-items: stretch;
    padding: 16px 18px;
  }

  .model-control-dock .model-actions,
  .model-control-dock .pager {
    justify-content: flex-start;
    justify-self: start;
  }

  .model-control-dock .model-picker {
    width: min(100%, 680px);
  }
}

@media (max-width: 760px) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 12px;
  }

  .report-modal {
    max-height: calc(100vh - 24px);
  }

  .report-modal-head,
  .report-modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .report-modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .report-form-grid,
  .report-file-row,
  .report-status-grid {
    grid-template-columns: 1fr;
  }

  .report-modal-notice {
    margin-left: 16px;
    margin-right: 16px;
  }

  .report-modal-actions {
    justify-content: stretch;
  }

  .report-modal-actions button {
    flex: 1 1 142px;
  }

  .model-control-dock {
    border-radius: 18px;
    padding: 14px;
  }

  .model-control-dock .model-actions {
    flex-wrap: wrap;
  }

  .model-control-dock .model-picker {
    width: 100%;
  }
}
.drp2-modal .report-modal-body {
  gap: 14px;
}

.drp2-brand-grid {
  grid-template-columns: minmax(220px, 320px);
}

.drp2-kpis {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.drp2-impact {
  margin: 12px 0;
  padding: 10px 12px;
  color: #7c4a03;
  background: rgba(255, 246, 218, 0.88);
  border: 1px solid rgba(214, 158, 46, 0.28);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.report-mini-panel h4 {
  margin: 14px 0 8px;
  color: #172033;
  font-size: 13px;
}
