:root {
  color-scheme: dark;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Segoe UI",
    system-ui,
    sans-serif;
  background: #031126;
  color: #eff7ff;
  --bg: #031126;
  --panel: rgba(5, 31, 61, 0.88);
  --panel-strong: rgba(6, 39, 77, 0.96);
  --line: rgba(86, 168, 255, 0.2);
  --line-strong: rgba(40, 137, 255, 0.55);
  --text: #eff7ff;
  --muted: #9eb7d1;
  --muted-2: #6f8aa6;
  --cyan: #1fe6ff;
  --cyan-soft: rgba(31, 230, 255, 0.13);
  --blue: #1677ff;
  --blue-soft: rgba(22, 119, 255, 0.18);
  --violet: #a78bfa;
  --green: #55f7a5;
  --yellow: #ffd166;
  --orange: #ff9f43;
  --red: #ff5c7a;
  --shadow: 0 22px 70px rgba(0, 10, 28, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% -10%, rgba(22, 119, 255, 0.24), transparent 34rem),
    radial-gradient(circle at 15% 4%, rgba(31, 230, 255, 0.16), transparent 30rem),
    linear-gradient(135deg, #02091a 0%, #031126 46%, #04254a 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(51, 146, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 146, 255, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), transparent 92%);
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(3, 16, 39, 0.98), rgba(2, 12, 31, 0.96)),
    radial-gradient(circle at 50% 0, rgba(22, 119, 255, 0.24), transparent 18rem);
  padding: 22px 18px;
  backdrop-filter: blur(18px);
}

.brand,
.side-card,
.toolbar,
.panel-heading,
.hero-status,
.ai-budget,
.ai-form,
.table-tools,
.hero-badges,
.mini-row,
.proposal-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 6px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(31, 230, 255, 0.7);
  border-radius: 14px;
  background: linear-gradient(135deg, #1fe6ff, #1677ff);
  color: #02142c;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 32px rgba(22, 119, 255, 0.38);
}

.brand strong,
.side-card strong {
  display: block;
}

.brand small,
.side-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.plant-visual-card {
  position: relative;
  display: grid;
  gap: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(7, 42, 82, 0.58), rgba(3, 18, 41, 0.9)),
    radial-gradient(circle at 50% 18%, rgba(31, 230, 255, 0.2), transparent 9rem);
  padding: 12px;
}

.plant-visual-media {
  display: grid;
  min-height: 92px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 12px;
  background: rgba(2, 18, 42, 0.56);
}

.plant-visual-media img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: center;
}

.plant-visual-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.plant-visual-card strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plant-visual-card small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.4;
}

.side-navigation {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.side-navigation a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #a6c6d5;
  padding: 11px 12px;
  font-size: 13px;
  text-decoration: none;
  transition: 0.18s ease;
}

.side-navigation a::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  content: "";
}

.side-navigation a:hover,
.side-navigation a.active {
  border-color: rgba(22, 119, 255, 0.55);
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.94), rgba(28, 96, 209, 0.78));
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.24);
}

.side-navigation a.active::after {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.side-card {
  gap: 12px;
  margin-top: auto;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 18px;
  background: rgba(7, 31, 60, 0.74);
  padding: 14px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(85, 247, 165, 0.1), 0 0 22px rgba(85, 247, 165, 0.68);
}

.pulse-dot.mini {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 5px rgba(85, 247, 165, 0.1), 0 0 16px rgba(85, 247, 165, 0.68);
}

.workspace {
  min-width: 0;
  padding-bottom: 34px;
}

.topbar,
main {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 0.95fr);
  gap: 22px;
  padding: 24px 0 14px;
  border-bottom: 1px solid rgba(86, 168, 255, 0.16);
}

.topbar-title {
  min-width: 0;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
}

.search-box {
  position: relative;
  display: block;
}

.search-box span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-box input {
  width: 100%;
  border-radius: 999px;
  background: rgba(11, 43, 81, 0.8);
  padding: 13px 18px;
}

.system-pill,
.time-pill,
.admin-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(86, 168, 255, 0.2);
  border-radius: 18px;
  background: rgba(7, 31, 60, 0.74);
  padding: 10px 13px;
  white-space: nowrap;
}

.system-pill strong,
.time-pill strong,
.admin-pill strong {
  display: block;
  font-size: 13px;
}

.system-pill small,
.time-pill small,
.admin-pill small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #1fe6ff, #1677ff);
  color: #02142c;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: 0.02em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin: 20px 0 12px;
  font-size: 16px;
}

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

.subtitle {
  max-width: 720px;
  margin-bottom: 0;
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.toolbar {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

select,
input,
button {
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 10px;
  background: rgba(6, 25, 52, 0.88);
  color: var(--text);
  outline: none;
  padding: 10px 12px;
}

select:focus,
input:focus {
  border-color: rgba(31, 230, 255, 0.68);
  box-shadow: 0 0 0 3px rgba(31, 230, 255, 0.1);
}

button {
  color: #ddfbff;
  transition: 0.18s ease;
}

button:hover:not(:disabled) {
  border-color: rgba(31, 230, 255, 0.62);
  background: rgba(22, 119, 255, 0.18);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

[hidden] {
  display: none !important;
}

.primary-button {
  border-color: rgba(31, 230, 255, 0.58);
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.92), rgba(31, 230, 255, 0.44));
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.22);
}

.auth-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  grid-template-rows: auto 1fr auto;
  padding: 28px 38px 18px;
  background:
    radial-gradient(circle at 22% 8%, rgba(31, 230, 255, 0.16), transparent 26rem),
    radial-gradient(circle at 76% 18%, rgba(22, 119, 255, 0.16), transparent 30rem),
    linear-gradient(115deg, #020a1c 0%, #041329 48%, #061a34 100%);
}

.auth-screen::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(86, 168, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 168, 255, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 96%);
}

.auth-screen::after {
  position: absolute;
  inset: auto -8% -28% 28%;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.2), transparent 68%);
  content: "";
  filter: blur(20px);
}

.auth-topbar,
.auth-stage,
.auth-footer {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  margin: 0 auto;
}

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

.auth-brand-row,
.auth-top-actions,
.auth-card-brand,
.auth-form-row,
.auth-remember {
  display: flex;
  align-items: center;
}

.auth-brand-row {
  gap: 12px;
  color: #ffffff;
  font-size: 19px;
}

.auth-brand-row strong,
.auth-card-brand strong {
  letter-spacing: 0;
}

.auth-brand-row b,
.auth-card-brand span {
  color: #38f4de;
}

.auth-logo-mark,
.auth-card-logo {
  border-radius: 12px;
  font-size: 13px;
}

.auth-top-actions {
  gap: 22px;
  color: #c8d8ea;
  font-size: 14px;
}

.auth-theme-toggle {
  position: relative;
  width: 46px;
  height: 24px;
  border: 1px solid rgba(86, 168, 255, 0.32);
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.45);
  box-shadow: inset 0 0 18px rgba(31, 230, 255, 0.18);
}

.auth-theme-toggle i {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 18px rgba(31, 230, 255, 0.78);
}

.auth-stage {
  display: grid;
  min-height: 760px;
  grid-template-columns: minmax(0, 1fr) 512px;
  gap: 44px;
  align-items: center;
  padding-top: 18px;
}

.auth-hero {
  position: relative;
  min-height: 704px;
}

.auth-hero-copy {
  max-width: 720px;
  padding-top: 70px;
}

.auth-hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-hero-copy p {
  margin: 0;
  color: #9eb7d1;
  font-size: 20px;
  line-height: 1.5;
}

.auth-feature-list {
  position: absolute;
  top: 266px;
  left: 0;
  display: grid;
  gap: 28px;
  width: 300px;
}

.auth-feature-list div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 18px;
  align-items: center;
}

.auth-feature-list strong,
.auth-feature-list small {
  grid-column: 2;
}

.auth-feature-list strong {
  color: #ffffff;
  font-size: 16px;
}

.auth-feature-list small {
  color: #9fb8d3;
  font-size: 13px;
  line-height: 1.45;
}

.auth-feature-icon {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid rgba(73, 199, 255, 0.16);
  border-radius: 12px;
  background: rgba(11, 44, 88, 0.74);
  box-shadow: inset 0 0 22px rgba(31, 230, 255, 0.08);
}

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

.auth-feature-ai::before {
  width: 22px;
  height: 26px;
  border: 2px solid var(--cyan);
  border-radius: 12px;
  box-shadow: inset 0 0 0 5px rgba(31, 230, 255, 0.12);
}

.auth-feature-ai::after {
  width: 30px;
  height: 2px;
  background: var(--cyan);
}

.auth-feature-chart::before {
  bottom: 15px;
  left: 16px;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--cyan);
  box-shadow: 9px -7px 0 var(--cyan), 18px -13px 0 var(--cyan);
}

.auth-feature-chart::after {
  right: 14px;
  bottom: 12px;
  left: 14px;
  height: 2px;
  background: rgba(31, 230, 255, 0.56);
}

.auth-feature-shield::before {
  width: 24px;
  height: 27px;
  clip-path: polygon(50% 0, 92% 18%, 84% 72%, 50% 100%, 16% 72%, 8% 18%);
  background: linear-gradient(180deg, rgba(56, 244, 222, 0.88), rgba(22, 119, 255, 0.35));
}

.auth-feature-shield::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #02142c;
  border-left: 2px solid #02142c;
  transform: rotate(-45deg);
}

.auth-feature-leaf::before {
  width: 24px;
  height: 15px;
  border-radius: 90% 0 90% 0;
  background: var(--green);
  transform: rotate(-30deg);
}

.auth-feature-leaf::after {
  width: 20px;
  height: 2px;
  background: #02142c;
  transform: rotate(-32deg);
}

.auth-plant-scene {
  position: absolute;
  top: 316px;
  right: 0;
  width: min(690px, calc(100% - 270px));
  aspect-ratio: 675 / 235;
  overflow: hidden;
  border-radius: 28px;
  filter: drop-shadow(0 34px 72px rgba(0, 10, 28, 0.4));
}

.auth-plant-scene::before,
.auth-plant-scene::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
}

.auth-plant-scene::before {
  background:
    linear-gradient(90deg, rgba(2, 10, 28, 0.36), transparent 18%, transparent 82%, rgba(2, 10, 28, 0.3)),
    linear-gradient(180deg, rgba(2, 10, 28, 0.18), transparent 32%, rgba(2, 10, 28, 0.28));
}

.auth-plant-scene::after {
  border: 1px solid rgba(67, 191, 255, 0.12);
  border-radius: inherit;
  box-shadow: inset 0 0 52px rgba(31, 230, 255, 0.1);
}

.auth-plant-scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-security-strip {
  position: absolute;
  bottom: 76px;
  left: 0;
  display: grid;
  width: min(440px, 58%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auth-security-strip span {
  min-height: 54px;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 10px;
  background: rgba(7, 27, 55, 0.74);
  color: #b8cee5;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.35;
}

.auth-public-links {
  position: absolute;
  bottom: 18px;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(620px, 72%);
}

.auth-public-links a {
  min-height: 36px;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 27, 55, 0.74);
  color: #bfeefa;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 18px;
  text-decoration: none;
}

.auth-public-links a:hover {
  border-color: rgba(31, 230, 255, 0.6);
  color: #ffffff;
}

.auth-card {
  position: relative;
  align-self: center;
  width: 100%;
  min-height: 650px;
  border: 1px solid rgba(67, 191, 255, 0.34);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(8, 32, 62, 0.92), rgba(4, 17, 38, 0.96)),
    radial-gradient(circle at 50% 0, rgba(31, 230, 255, 0.16), transparent 22rem);
  box-shadow: 0 30px 90px rgba(0, 10, 28, 0.52);
  padding: 54px 62px 30px;
  backdrop-filter: blur(22px);
}

.auth-card::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(98, 244, 255, 0.88), transparent);
  content: "";
}

.auth-card-brand {
  justify-content: center;
  gap: 18px;
  margin-bottom: 42px;
}

.auth-card-logo {
  width: 70px;
  height: 70px;
  font-size: 19px;
}

.auth-card-brand strong,
.auth-card-brand small {
  display: block;
}

.auth-card-brand strong {
  color: #ffffff;
  font-size: 32px;
  line-height: 1.05;
}

.auth-card-brand small {
  margin-top: 10px;
  color: #b8cee5;
  font-size: 17px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: #c7dff0;
  font-size: 12px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 58px;
  border-radius: 12px;
  background: rgba(6, 24, 50, 0.76);
  padding: 0 18px;
  font-size: 16px;
}

.auth-scope-field {
  display: grid;
  gap: 7px;
  min-height: 58px;
  align-content: center;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 12px;
  background: rgba(6, 24, 50, 0.52);
  color: #9fb8d3;
  padding: 9px 16px;
}

.auth-scope-field span {
  font-size: 12px;
}

.auth-scope-field strong {
  color: #ddecfb;
  font-size: 14px;
  font-weight: 700;
}

.auth-form-row {
  justify-content: space-between;
  gap: 14px;
  color: #9fb8d3;
  font-size: 13px;
}

.auth-remember {
  display: inline-flex;
  grid-template-columns: auto;
  gap: 8px;
  color: #ddecfb;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.auth-submit {
  width: 100%;
  min-height: 58px;
  margin-top: 10px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}

.auth-footnote {
  margin: 12px 0 0;
  color: #9eb7d1;
  font-size: 12px;
  line-height: 1.65;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #8199b5;
  font-size: 12px;
  text-align: center;
}

.auth-footer a {
  color: #9fc4e8;
  text-decoration: none;
}

.auth-footer a:hover {
  color: #dffcff;
}

.notice.compact {
  margin-bottom: 0;
  box-shadow: none;
}

.session-chip {
  display: grid;
  min-height: 58px;
  align-content: center;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 12px;
  background: rgba(6, 25, 52, 0.88);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 12px;
}

.session-chip strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
}

.hero-panel,
.panel,
.notice,
.kpi-card,
.mini-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  gap: 18px;
  margin-top: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px;
  position: relative;
}

.hero-panel::before {
  position: absolute;
  inset: -40% -18% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 119, 255, 0.2), transparent 66%);
  content: "";
}

.hero-copy,
.hero-status,
.panel-heading {
  position: relative;
}

.hero-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 760px;
  color: #b9d6e2;
  line-height: 1.75;
}

.hero-badges {
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.hero-status {
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(86, 168, 255, 0.2);
  border-radius: 18px;
  background: rgba(4, 22, 49, 0.78);
  padding: 20px;
}

.score-ring {
  display: grid;
  width: 170px;
  height: 170px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(31, 230, 255, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(6, 24, 35, 0.92) 52%, transparent 53%),
    conic-gradient(var(--blue) var(--score, 72%), rgba(86, 168, 255, 0.12) 0);
  box-shadow: inset 0 0 35px rgba(31, 230, 255, 0.08), 0 0 40px rgba(22, 119, 255, 0.14);
}

.score-ring span {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  margin-top: -46px;
  color: var(--muted);
}

.status-stack {
  display: grid;
  flex: 1;
  gap: 10px;
}

.status-stack > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.status-stack span,
.kpi-card span,
.mini-card span {
  color: var(--muted);
  font-size: 12px;
}

.status-stack strong {
  font-size: 24px;
}

.notice {
  margin-bottom: 16px;
  border-radius: 14px;
  padding: 14px 18px;
  color: #d9f3f8;
  line-height: 1.65;
}

.notice strong {
  color: var(--yellow);
}

.kpi-grid,
.layout-grid,
.insight-grid,
.cluster-overview,
.control-parameters {
  display: grid;
  gap: 14px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 18px;
}

.kpi-card::after {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(22, 119, 255, 0.12);
  content: "";
}

.kpi-card strong {
  display: block;
  margin-top: 10px;
  color: #f2ffff;
  font-size: 26px;
}

.kpi-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted-2);
}

.layout-grid {
  margin-bottom: 16px;
}

.layout-grid-2 {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
}

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

.panel {
  overflow: hidden;
  border-radius: 14px;
  padding: 20px;
}

.panel + .panel,
main > .panel {
  margin-bottom: 16px;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-action {
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
}

.submodule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 10px;
  background: rgba(5, 24, 50, 0.54);
  padding: 8px;
}

.submodule-tabs button {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}

.submodule-tabs button.active {
  border-color: rgba(31, 230, 255, 0.52);
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.92), rgba(12, 71, 207, 0.92));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.2);
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(31, 230, 255, 0.28);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #7df5ff;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.badge.safe {
  border-color: rgba(85, 247, 165, 0.32);
  background: rgba(85, 247, 165, 0.1);
  color: var(--green);
}

.badge.warning {
  border-color: rgba(255, 209, 102, 0.36);
  background: rgba(255, 209, 102, 0.12);
  color: var(--yellow);
}

.badge.orange {
  border-color: rgba(255, 159, 67, 0.36);
  background: rgba(255, 159, 67, 0.12);
  color: var(--orange);
}

.badge.danger,
.danger {
  border-color: rgba(255, 92, 122, 0.42);
  background: rgba(255, 92, 122, 0.12);
  color: var(--red);
}

.muted {
  font-size: 13px;
  line-height: 1.6;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.module-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.92fr);
  gap: 14px;
  margin-top: 14px;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-card {
  border: 1px solid rgba(86, 168, 255, 0.16);
  border-radius: 12px;
  background: rgba(5, 24, 50, 0.46);
  padding: 13px;
}

.data-card strong,
.data-card span,
.data-card small {
  display: block;
}

.data-card strong {
  color: #f2ffff;
  font-size: 15px;
  line-height: 1.35;
}

.data-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.data-card small {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.data-card .mini-row {
  display: flex;
}

.data-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-card {
  border-radius: 18px;
  padding: 15px;
}

.mini-card strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.mini-row {
  justify-content: space-between;
  gap: 10px;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.process-unit {
  position: relative;
  min-height: 124px;
  border: 1px solid rgba(107, 226, 255, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 42, 60, 0.72), rgba(7, 20, 32, 0.86));
  color: var(--text);
  padding: 14px;
  text-align: left;
}

.process-unit::after {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  content: "";
}

.process-unit:last-child::after {
  display: none;
}

.process-unit.active {
  border-color: rgba(56, 244, 222, 0.7);
  background: linear-gradient(180deg, rgba(56, 244, 222, 0.18), rgba(7, 20, 32, 0.86));
  box-shadow: inset 0 0 0 1px rgba(56, 244, 222, 0.12), 0 0 28px rgba(56, 244, 222, 0.1);
}

.process-unit strong,
.process-unit small {
  display: block;
}

.process-unit strong {
  font-size: 15px;
}

.process-unit small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.process-unit .unit-index {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 9px;
  background: rgba(56, 244, 222, 0.13);
  color: var(--cyan);
  font-size: 12px;
}

.a2o-3d-scene {
  position: relative;
  min-height: 460px;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7, 26, 43, 0.98), rgba(4, 15, 28, 0.98)),
    repeating-linear-gradient(90deg, rgba(86, 168, 255, 0.045) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(86, 168, 255, 0.035) 0 1px, transparent 1px 42px);
  box-shadow: inset 0 0 44px rgba(31, 230, 255, 0.08);
}

.a2o-3d-scene::before {
  position: absolute;
  z-index: 0;
  inset: 14px;
  border: 1px solid rgba(31, 230, 255, 0.1);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.a2o-3d-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
}

.a2o-embedded-viewer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  min-height: 680px;
  padding: 12px;
}

.a2o-viewer-frame {
  display: block;
  width: 100%;
  height: min(70vh, 700px);
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(68, 210, 255, 0.28);
  border-radius: 8px;
  background: #061016;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.26);
}

.a2o-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(71, 202, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 18, 31, 0.74);
}

.a2o-viewer-toolbar div {
  display: grid;
  gap: 4px;
}

.a2o-viewer-toolbar span,
.a2o-viewer-toolbar small {
  color: var(--muted);
  font-size: 12px;
}

.a2o-viewer-toolbar strong {
  color: #ffffff;
  font-size: 14px;
}

.a2o-viewer-open {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(53, 216, 255, 0.42);
  border-radius: 8px;
  color: #dffaff;
  text-decoration: none;
  background: rgba(28, 89, 122, 0.58);
}

.a2o-viewer-open:hover {
  border-color: rgba(53, 216, 255, 0.8);
  background: rgba(35, 126, 165, 0.72);
}

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

.a2o-3d-label-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.a2o-3d-label {
  position: absolute;
  display: grid;
  min-width: 104px;
  max-width: min(210px, 36vw);
  gap: 3px;
  border: 1px solid rgba(86, 168, 255, 0.28);
  border-radius: 8px;
  background: rgba(4, 18, 36, 0.84);
  color: #ffffff;
  padding: 8px 10px;
  text-align: left;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.a2o-3d-label strong,
.a2o-3d-label span,
.a2o-3d-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a2o-3d-label strong {
  font-size: 12px;
  line-height: 1.25;
}

.a2o-3d-label span,
.a2o-3d-label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.a2o-3d-label.probe {
  border-color: rgba(56, 244, 222, 0.52);
  box-shadow: 0 0 26px rgba(31, 230, 255, 0.14), 0 14px 32px rgba(0, 0, 0, 0.28);
}

.a2o-3d-label.probe.danger {
  border-color: rgba(255, 92, 122, 0.72);
}

.a2o-3d-label.probe.warning {
  border-color: rgba(255, 209, 102, 0.72);
}

.a2o-3d-label.probe.missing {
  border-color: rgba(142, 160, 184, 0.55);
}

.a2o-3d-label.active {
  border-color: rgba(31, 230, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(31, 230, 255, 0.14), 0 0 30px rgba(31, 230, 255, 0.22);
}

.a2o-3d-label.zone {
  min-width: 92px;
  border-color: rgba(85, 247, 165, 0.26);
  background: rgba(3, 18, 30, 0.72);
}

.a2o-3d-overlay {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  display: grid;
  width: min(340px, calc(100% - 32px));
  gap: 10px;
  border: 1px solid rgba(107, 226, 255, 0.2);
  border-radius: 8px;
  background: rgba(4, 18, 36, 0.86);
  padding: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.a2o-3d-overlay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.a2o-3d-overlay-head span {
  color: var(--muted);
  font-size: 12px;
}

.a2o-3d-overlay-head strong {
  max-width: 190px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.a2o-do-card {
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid rgba(107, 226, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 24, 38, 0.82);
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.a2o-do-card:disabled {
  cursor: default;
  opacity: 0.72;
}

.a2o-do-card span,
.a2o-do-card strong,
.a2o-do-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a2o-do-card span {
  color: var(--muted);
  font-size: 11px;
}

.a2o-do-card strong {
  color: #ffffff;
  font-size: 18px;
}

.a2o-do-card small {
  color: var(--muted);
  font-size: 11px;
}

.a2o-do-card.safe,
.a2o-selected-detail.safe {
  border-color: rgba(56, 244, 222, 0.54);
}

.a2o-do-card.warning,
.a2o-selected-detail.warning {
  border-color: rgba(255, 209, 102, 0.66);
}

.a2o-do-card.danger,
.a2o-selected-detail.danger {
  border-color: rgba(255, 92, 122, 0.74);
}

.a2o-do-card.missing,
.a2o-selected-detail.missing {
  border-color: rgba(142, 160, 184, 0.52);
}

.a2o-do-card.selected {
  background: rgba(11, 43, 61, 0.94);
  box-shadow: inset 0 0 0 1px rgba(31, 230, 255, 0.16), 0 0 22px rgba(31, 230, 255, 0.12);
}

.a2o-selected-detail {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(107, 226, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 24, 38, 0.76);
  padding: 10px 12px;
}

.a2o-selected-detail span,
.a2o-selected-detail small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a2o-selected-detail strong {
  color: #ffffff;
  font-size: 20px;
}

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

.a2o-blower-strip div {
  min-width: 0;
  border: 1px solid rgba(107, 226, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 24, 38, 0.66);
  padding: 8px;
}

.a2o-blower-strip span,
.a2o-blower-strip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a2o-blower-strip span {
  color: var(--muted);
  font-size: 10px;
}

.a2o-blower-strip strong {
  margin-top: 4px;
  color: #ffffff;
  font-size: 12px;
}

.a2o-3d-loading,
.a2o-3d-fallback {
  display: grid;
  min-height: 460px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.a2o-3d-fallback {
  align-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
}

.a2o-3d-fallback > div:first-child {
  display: grid;
  gap: 6px;
}

.a2o-3d-fallback span {
  color: var(--muted);
  font-size: 12px;
}

.a2o-3d-fallback strong {
  color: #ffffff;
  font-size: 15px;
}

.card-list {
  display: grid;
  gap: 10px;
}

.event-card,
.task-card,
.notification-card,
.audit-card,
.proposal-card {
  border: 1px solid rgba(107, 226, 255, 0.13);
  border-radius: 16px;
  background: rgba(4, 18, 28, 0.58);
  padding: 14px;
}

.event-card {
  border-left: 3px solid var(--yellow);
}

.event-card.orange {
  border-left-color: var(--orange);
}

.event-card.red {
  border-left-color: var(--red);
}

.event-card.blue {
  border-left-color: var(--blue);
}

.event-card h3,
.task-card h3 {
  margin: 8px 0 8px;
}

.event-actions,
.step-actions,
.proposal-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.evidence-pill {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px;
}

.evidence-pill strong,
.evidence-pill span {
  display: block;
}

.evidence-pill span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.step-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.step {
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.step.completed {
  border-left: 3px solid var(--green);
}

.step small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.table-tools {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.table-tools input {
  min-width: min(440px, 100%);
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(107, 226, 255, 0.11);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid rgba(107, 226, 255, 0.1);
  padding: 12px 11px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(56, 244, 222, 0.05);
}

.quality-ok {
  color: var(--green);
}

.quality-bad {
  color: var(--red);
}

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

.insight-card {
  border: 1px solid rgba(107, 226, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.insight-card strong,
.insight-card span {
  display: block;
}

.insight-card strong {
  margin: 8px 0;
  font-size: 22px;
}

.integration-status {
  display: grid;
  gap: 10px;
}

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

.control-parameters {
  margin-top: 14px;
}

.control-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px minmax(180px, 0.9fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(107, 226, 255, 0.13);
  border-radius: 16px;
  background: rgba(4, 18, 28, 0.58);
  padding: 12px;
}

.control-form p {
  margin: 6px 0 0;
}

.proposal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.ai-panel {
  border-color: rgba(56, 244, 222, 0.25);
}

.ai-budget {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(107, 226, 255, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.toggle-line {
  display: inline-flex;
  grid-template-columns: auto;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.ai-form {
  gap: 10px;
  margin-bottom: 14px;
}

.ai-form input {
  min-width: 0;
  flex: 1;
}

.ai-answer {
  min-height: 150px;
  overflow: auto;
  border: 1px solid rgba(107, 226, 255, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(7, 22, 34, 0.78), rgba(2, 10, 18, 0.78)),
    radial-gradient(circle at top right, rgba(56, 244, 222, 0.1), transparent 20rem);
  padding: 16px;
  line-height: 1.65;
}

.ai-answer ul {
  margin: 8px 0 12px;
  padding-left: 20px;
}

.ai-answer h3 {
  margin: 12px 0 8px;
  color: #f6ffff;
}

.empty {
  border: 1px dashed rgba(107, 226, 255, 0.18);
  border-radius: 16px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 44px));
  border: 1px solid rgba(56, 244, 222, 0.25);
  border-radius: 16px;
  background: rgba(4, 18, 28, 0.92);
  color: var(--text);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .auth-screen {
    padding: 24px;
  }

  .auth-stage {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding-top: 26px;
  }

  .auth-hero {
    min-height: 650px;
  }

  .auth-plant-scene {
    right: 0;
    width: min(590px, calc(100% - 280px));
  }

  .auth-security-strip {
    width: min(520px, 100%);
  }

  .auth-public-links {
    width: min(620px, 100%);
  }

  .auth-card {
    align-self: stretch;
    justify-self: center;
    width: min(540px, 100%);
    min-height: 0;
  }

  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    grid-template-columns: minmax(220px, 1fr) repeat(3, auto);
  }

  .toolbar {
    justify-content: flex-start;
  }

  .hero-panel,
  .layout-grid-2,
  .layout-grid-3 {
    grid-template-columns: 1fr;
  }

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

  .process-flow {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .control-form {
    grid-template-columns: 1fr 110px;
  }
}

@media (max-width: 820px) {
  .auth-screen {
    padding: 16px;
  }

  .auth-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-top-actions {
    gap: 14px;
    font-size: 12px;
  }

  .auth-stage {
    gap: 18px;
    padding-top: 14px;
  }

  .auth-hero {
    min-height: 0;
  }

  .auth-card {
    border-radius: 18px;
    padding: 24px 18px;
  }

  .auth-hero-copy {
    padding-top: 16px;
  }

  .auth-hero-copy h1 {
    font-size: 34px;
  }

  .auth-hero-copy p {
    font-size: 15px;
  }

  .auth-feature-list {
    position: static;
    width: 100%;
    margin-top: 24px;
    gap: 14px;
  }

  .auth-feature-list div {
    grid-template-columns: 48px minmax(0, 1fr);
  }

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

  .auth-plant-scene {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    margin-top: 22px;
  }

  .auth-security-strip {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .auth-public-links {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .auth-card-brand {
    justify-content: flex-start;
    margin-bottom: 24px;
  }

  .auth-card-logo {
    width: 54px;
    height: 54px;
  }

  .auth-card-brand strong {
    font-size: 24px;
  }

  .auth-card-brand small {
    font-size: 14px;
  }

  .auth-form-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .topbar {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .system-pill,
  .time-pill,
  .admin-pill {
    justify-content: flex-start;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .hero-panel,
  .hero-status {
    display: block;
  }

  .score-ring {
    margin-bottom: 16px;
  }

  .kpi-grid,
  .cluster-overview,
  .evidence-grid,
  .insight-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .control-form,
  .proposal-card {
    grid-template-columns: 1fr;
  }
}

/* 01 reference redesign: dark SaaS sidebar with light operational cards. */
body:has(.app-shell:not([hidden])) {
  background: #f4f7fb;
}

.app-shell {
  grid-template-columns: 250px minmax(0, 1fr);
  background: #f4f7fb;
  color: #12213a;
}

.sidebar {
  border-right: 0;
  background:
    linear-gradient(180deg, #061a33 0%, #041327 58%, #061226 100%),
    radial-gradient(circle at 10% 0, rgba(45, 132, 255, 0.24), transparent 18rem);
  padding: 28px 14px 18px;
  box-shadow: 18px 0 50px rgba(12, 32, 64, 0.14);
}

.sidebar .brand {
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0 8px 22px;
}

.sidebar .brand-mark {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2f80ff, #54d4ff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(47, 128, 255, 0.28);
}

.sidebar .brand strong {
  color: #dcecff;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.sidebar .brand small {
  color: #8fa7c5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plant-visual-card {
  border-color: rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.plant-visual-media {
  min-height: 90px;
  border-radius: 10px;
}

.plant-visual-media img {
  height: 92px;
}

.side-navigation {
  gap: 7px;
}

.side-navigation a {
  min-height: 46px;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 8px;
  color: #d5e4f7;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
}

.side-navigation a::before {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(213, 228, 247, 0.32);
  border-radius: 5px;
  color: #9fb8d5;
  content: "□";
  font-size: 12px;
}

.side-navigation a::after {
  display: none;
}

.side-navigation a:hover,
.side-navigation a.active {
  border-color: rgba(63, 129, 255, 0.6);
  background: linear-gradient(135deg, #2d7df4, #3f86ff);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(47, 128, 255, 0.24);
  transform: none;
}

.side-navigation a:hover::before,
.side-navigation a.active::before {
  border-color: rgba(255, 255, 255, 0.62);
  color: #ffffff;
}

.side-card {
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.side-card strong {
  color: #ffffff;
}

.workspace {
  min-height: 100vh;
  background:
    radial-gradient(circle at 30% 0, rgba(47, 128, 255, 0.08), transparent 28rem),
    #f4f7fb;
}

.topbar,
main {
  width: min(1540px, calc(100% - 48px));
}

.topbar {
  grid-template-columns: minmax(320px, 1fr) minmax(560px, 0.95fr);
  padding: 24px 0 16px;
  border-bottom: 1px solid #dbe5f2;
  color: #12213a;
}

.topbar-title h1 {
  color: #10213d;
  font-size: 30px;
  font-weight: 900;
}

.topbar-title .subtitle {
  color: #60708d;
}

.topbar .eyebrow,
.panel .eyebrow {
  color: #316cf4;
  letter-spacing: 0.1em;
}

.topbar-actions {
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.search-box input,
.system-pill,
.time-pill,
.admin-pill,
.session-chip,
.toolbar label select,
.toolbar button,
.toolbar input {
  border: 1px solid #dbe5f2;
  background: #ffffff;
  color: #12213a;
  box-shadow: 0 8px 22px rgba(15, 37, 75, 0.05);
}

.system-pill small,
.time-pill small,
.admin-pill small,
.session-chip,
.subtitle,
.muted {
  color: #60708d;
}

.toolbar {
  gap: 12px;
}

.hero-panel,
.panel,
.notice,
.kpi-card,
.mini-card {
  border: 1px solid #dce6f3;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(14, 35, 68, 0.07);
  backdrop-filter: none;
}

.hero-panel {
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.7fr);
  border-radius: 12px;
  padding: 24px;
}

.hero-panel::before {
  background: radial-gradient(circle, rgba(47, 128, 255, 0.09), transparent 68%);
}

.hero-copy h2,
.panel h2,
.panel h3 {
  color: #12213a;
}

.hero-copy p,
.panel p,
.mini-card small,
.kpi-card small {
  color: #60708d;
}

.hero-status {
  border-color: #dce6f3;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.score-ring {
  border-color: rgba(47, 128, 255, 0.18);
  background:
    radial-gradient(circle, #ffffff 52%, transparent 53%),
    conic-gradient(#2f80ff var(--score, 72%), #e7eef8 0);
  color: #12213a;
  box-shadow: inset 0 0 0 1px #e6edf6;
}

.status-stack > div,
.event-card,
.task-card,
.notification-card,
.audit-card,
.proposal-card,
.insight-card {
  border: 1px solid #e1e9f5;
  background: #f8fbff;
}

.notice {
  border-radius: 12px;
  color: #334a68;
}

.notice strong {
  color: #e07800;
}

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

.kpi-card {
  min-height: 116px;
  border-radius: 12px;
}

.kpi-card::after {
  background: rgba(47, 128, 255, 0.08);
}

.kpi-card span,
.mini-card span,
.status-stack span {
  color: #6c7d99;
}

.kpi-card strong,
.mini-card strong,
.status-stack strong {
  color: #12213a;
}

.panel {
  border-radius: 12px;
}

.panel-action,
.badge,
.chip {
  border-color: #d9e7f6;
  background: #f3f8ff;
  color: #316cf4;
}

.badge.safe,
.quality-ok {
  border-color: rgba(20, 184, 129, 0.2);
  background: #eafaf4;
  color: #0d9868;
}

.badge.warning {
  border-color: rgba(245, 158, 11, 0.22);
  background: #fff7e8;
  color: #d97706;
}

.badge.danger,
.danger,
.quality-bad {
  border-color: rgba(239, 68, 68, 0.2);
  background: #fff1f2;
  color: #dc2626;
}

.table-wrap {
  border-color: #e1e9f5;
  background: #ffffff;
}

table {
  color: #12213a;
}

th {
  color: #697b96;
  background: #f8fbff;
}

td {
  border-bottom-color: #edf2f8;
}

tbody tr:hover {
  background: #f3f8ff;
}

select,
input,
button {
  border-color: #dbe5f2;
  background: #ffffff;
  color: #12213a;
}

button:hover:not(:disabled) {
  border-color: #7da7ff;
  background: #f2f7ff;
  transform: translateY(-1px);
}

.primary-button {
  border-color: #2f80ff;
  background: linear-gradient(135deg, #2f80ff, #4f91ff);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(47, 128, 255, 0.22);
}

.process-unit {
  border-color: #dce6f3;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  color: #12213a;
}

.process-unit small {
  color: #60708d;
}

.process-unit.active {
  border-color: rgba(47, 128, 255, 0.45);
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(47, 128, 255, 0.08), 0 10px 24px rgba(47, 128, 255, 0.09);
}

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

.module-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  border: 1px solid #dce6f3;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(14, 35, 68, 0.06);
  color: #12213a;
  padding: 16px;
  text-decoration: none;
}

.module-card span {
  color: #316cf4;
  font-size: 12px;
  font-weight: 900;
}

.module-card strong {
  font-size: 16px;
}

.module-card small {
  color: #60708d;
  line-height: 1.45;
}

.module-card:hover,
.module-card.active {
  border-color: rgba(47, 128, 255, 0.48);
  box-shadow: 0 16px 38px rgba(47, 128, 255, 0.12);
  transform: translateY(-1px);
}

.mini-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.module-list span {
  border: 1px solid #dce6f3;
  border-radius: 999px;
  background: #f8fbff;
  color: #334a68;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.module-list.compact span {
  padding: 6px 9px;
}

.ops-command-list {
  display: grid;
  gap: 10px;
}

.ops-command-list article {
  display: grid;
  gap: 5px;
  border: 1px solid #e1e9f5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
}

.ops-command-list strong {
  color: #12213a;
}

.ops-command-list span {
  color: #60708d;
  line-height: 1.5;
}

.aeration-summary {
  margin-top: 10px;
}

.plant-control-workspace {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid #dce6f3;
}

.plant-control-heading,
.plant-control-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plant-control-heading {
  justify-content: space-between;
}

.plant-control-heading > div:first-child {
  display: grid;
  gap: 4px;
}

.plant-control-heading small,
.plant-control-actions label,
.plant-energy-baseline summary {
  color: #60708d;
  font-size: 12px;
}

.plant-control-summary {
  margin: 0;
}

.plant-control-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.plant-control-plan .proposal-actions {
  margin-top: 0;
}

.plant-energy-baseline {
  border-top: 1px solid #e1e9f5;
  padding-top: 12px;
}

.plant-energy-baseline summary {
  cursor: pointer;
  font-weight: 800;
}

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

.plant-energy-form label,
.plant-energy-verify-form label {
  display: grid;
  gap: 5px;
  color: #60708d;
  font-size: 11px;
}

.plant-energy-verify-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

@media (max-width: 1180px) {
  .plant-energy-form {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 820px) {
  .plant-control-heading,
  .plant-control-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .plant-control-plan,
  .plant-energy-form,
  .plant-energy-verify-form {
    grid-template-columns: 1fr;
  }
}

.ai-answer {
  border-color: #dce6f3;
  background: #f8fbff;
  color: #12213a;
}

.toast {
  border-color: rgba(47, 128, 255, 0.25);
  background: #ffffff;
  color: #12213a;
  box-shadow: 0 18px 46px rgba(14, 35, 68, 0.16);
}

@media (max-width: 1180px) {
  .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .module-grid,
  .mini-dashboard {
    grid-template-columns: 1fr;
  }
}

/* 02 reference redesign: dark analytics module workspace. */
body:has(.app-shell:not([hidden])) {
  background: #031329;
}

.app-shell {
  grid-template-columns: 218px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% -12%, rgba(31, 119, 255, 0.22), transparent 38rem),
    linear-gradient(135deg, #031329 0%, #051d3a 52%, #06152c 100%);
  color: #eaf4ff;
}

.sidebar {
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(87, 153, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(7, 28, 57, 0.97), rgba(3, 16, 36, 0.98)),
    radial-gradient(circle at 30% 10%, rgba(44, 145, 255, 0.22), transparent 14rem);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.sidebar .brand {
  border-bottom-color: rgba(87, 153, 255, 0.18);
}

.sidebar .brand strong,
.side-card strong {
  color: #ffffff;
}

.sidebar .brand small,
.side-card small {
  color: #92a7c7;
}

.plant-visual-card,
.side-card {
  border-color: rgba(87, 153, 255, 0.24);
  background: rgba(9, 37, 75, 0.62);
}

.side-navigation a {
  color: #b9cbe5;
}

.side-navigation a::before {
  border-color: rgba(185, 203, 229, 0.26);
  color: #7ea4cf;
}

.side-navigation a:hover,
.side-navigation a.active {
  background: linear-gradient(135deg, #0f69ff, #0c47cf);
  border-color: rgba(64, 156, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(124, 200, 255, 0.12), 0 12px 24px rgba(15, 105, 255, 0.24);
}

.workspace {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 46% -10%, rgba(24, 109, 255, 0.24), transparent 34rem),
    linear-gradient(135deg, rgba(4, 20, 43, 0.88), rgba(5, 24, 48, 0.96));
}

.topbar,
main {
  width: min(1640px, calc(100% - 48px));
}

.topbar {
  border-bottom: 1px solid rgba(87, 153, 255, 0.22);
  color: #eaf4ff;
}

.topbar-title h1 {
  color: #ffffff;
  font-size: 26px;
}

.topbar-title .subtitle,
.muted {
  color: #a7b8d3;
}

.topbar .eyebrow,
.panel .eyebrow {
  color: #64b7ff;
}

.search-box input,
.system-pill,
.time-pill,
.admin-pill,
.session-chip,
.toolbar label select,
.toolbar button,
.toolbar input,
select,
input,
button {
  border-color: rgba(87, 153, 255, 0.24);
  background: rgba(9, 37, 75, 0.72);
  color: #eaf4ff;
  box-shadow: none;
}

input::placeholder {
  color: #7d93b2;
}

.system-pill small,
.time-pill small,
.admin-pill small,
.session-chip {
  color: #9fb2ce;
}

.hero-panel,
.panel,
.notice,
.kpi-card,
.mini-card,
.module-card {
  border: 1px solid rgba(87, 153, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(10, 48, 92, 0.78), rgba(6, 30, 62, 0.76)),
    radial-gradient(circle at 100% 0, rgba(31, 119, 255, 0.1), transparent 18rem);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 18px 42px rgba(0, 7, 20, 0.18);
  color: #eaf4ff;
}

.hero-panel,
.panel {
  border-radius: 8px;
}

.hero-copy h2,
.panel h2,
.panel h3,
.kpi-card strong,
.mini-card strong,
.status-stack strong,
.module-card strong {
  color: #ffffff;
}

.hero-copy p,
.panel p,
.kpi-card small,
.mini-card small,
.module-card small {
  color: #a7b8d3;
}

.hero-status,
.status-stack > div,
.event-card,
.task-card,
.notification-card,
.audit-card,
.proposal-card,
.insight-card,
.ops-command-list article {
  border-color: rgba(87, 153, 255, 0.18);
  background: rgba(8, 35, 70, 0.72);
}

.score-ring {
  border-color: rgba(64, 184, 255, 0.28);
  background:
    radial-gradient(circle, #092347 52%, transparent 53%),
    conic-gradient(#23a8ff var(--score, 72%), rgba(87, 153, 255, 0.14) 0);
  color: #ffffff;
}

.notice {
  color: #d5e5fb;
}

.notice strong {
  color: #ffd166;
}

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

.module-card {
  min-height: 106px;
  border-radius: 8px;
  background: rgba(8, 38, 76, 0.78);
}

.module-card span {
  color: #60b7ff;
}

.module-card:hover,
.module-card.active {
  border-color: rgba(37, 147, 255, 0.72);
  background: linear-gradient(180deg, rgba(13, 75, 145, 0.86), rgba(8, 43, 88, 0.86));
  box-shadow: 0 16px 34px rgba(13, 105, 255, 0.17);
}

.module-list span,
.panel-action,
.badge,
.chip {
  border-color: rgba(87, 153, 255, 0.22);
  background: rgba(12, 49, 92, 0.76);
  color: #8ec8ff;
}

.badge.safe,
.quality-ok {
  border-color: rgba(85, 247, 165, 0.28);
  background: rgba(85, 247, 165, 0.1);
  color: #55f7a5;
}

.badge.warning {
  border-color: rgba(255, 209, 102, 0.32);
  background: rgba(255, 209, 102, 0.12);
  color: #ffd166;
}

.badge.danger,
.danger,
.quality-bad {
  border-color: rgba(255, 92, 122, 0.36);
  background: rgba(255, 92, 122, 0.12);
  color: #ff6f8c;
}

.table-wrap {
  border-color: rgba(87, 153, 255, 0.2);
  background: rgba(6, 30, 62, 0.72);
}

table {
  color: #eaf4ff;
}

th {
  background: rgba(8, 35, 70, 0.78);
  color: #90a6c6;
}

td {
  border-bottom-color: rgba(87, 153, 255, 0.12);
}

tbody tr:hover {
  background: rgba(37, 147, 255, 0.08);
}

button:hover:not(:disabled) {
  border-color: rgba(80, 180, 255, 0.62);
  background: rgba(37, 147, 255, 0.14);
}

.primary-button {
  border-color: #1677ff;
  background: linear-gradient(135deg, #1677ff, #0e5be5);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 119, 255, 0.22);
}

.process-unit {
  border-color: rgba(87, 153, 255, 0.2);
  background: rgba(8, 35, 70, 0.72);
  color: #eaf4ff;
}

.process-unit strong,
.ops-command-list strong {
  color: #ffffff;
}

.process-unit small,
.ops-command-list span {
  color: #a7b8d3;
}

.process-unit.active {
  border-color: rgba(37, 147, 255, 0.72);
  background: rgba(13, 75, 145, 0.58);
}

.ai-answer {
  border-color: rgba(87, 153, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(7, 33, 67, 0.82), rgba(4, 20, 43, 0.82)),
    radial-gradient(circle at top right, rgba(31, 230, 255, 0.1), transparent 20rem);
  color: #eaf4ff;
}

.data-card {
  border-color: rgba(87, 153, 255, 0.18);
  background: rgba(8, 35, 70, 0.72);
}

.data-card strong {
  color: #ffffff;
}

.data-card span {
  color: #a7b8d3;
}

.data-card small {
  color: #8197b7;
}

.toast {
  border-color: rgba(87, 153, 255, 0.28);
  background: rgba(5, 23, 48, 0.96);
  color: #eaf4ff;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-strip,
  .module-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .module-grid,
  .metric-strip,
  .module-detail-grid {
    grid-template-columns: 1fr;
  }
}

.group-dashboard .metric-strip {
  grid-template-columns: repeat(6, minmax(132px, 1fr));
}

.group-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.group-sync-panel {
  margin-top: 18px;
  border: 1px solid rgba(86, 168, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 18, 40, 0.58);
  padding: 14px;
}

.group-sync-table-wrap {
  max-height: 360px;
  border-radius: 8px;
}

.group-sync-table-wrap table {
  min-width: 1080px;
}

.group-sync-table-wrap td {
  vertical-align: top;
}

.group-sync-table-wrap td small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
}

.group-source-cell {
  max-width: 240px;
  color: #c5d5ea;
  line-height: 1.45;
  white-space: normal;
}

.permission-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.account-create-form,
.project-create-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 18, 40, 0.58);
  padding: 14px;
}

.account-create-form .group-section-title,
.account-create-form #account-plant-options,
.project-create-form .group-section-title {
  grid-column: 1 / -1;
}

.permission-user-list,
.permission-editor {
  min-width: 0;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 18, 40, 0.58);
  padding: 14px;
}

.permission-user-card {
  display: grid;
  width: 100%;
  gap: 5px;
  border: 1px solid rgba(86, 168, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.68);
  color: #eaf4ff;
  padding: 11px;
  text-align: left;
}

.permission-user-card.active {
  border-color: rgba(31, 230, 255, 0.62);
  background: rgba(22, 119, 255, 0.2);
}

.permission-user-card.inactive {
  opacity: 0.58;
}

.permission-user-card strong {
  color: #ffffff;
}

.permission-user-card span,
.permission-user-card small,
.permission-editor-head span {
  color: var(--muted);
  font-size: 12px;
}

.permission-form {
  display: grid;
  gap: 14px;
}

.permission-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(86, 168, 255, 0.14);
  padding-bottom: 12px;
}

.permission-editor-head strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
}

.permission-section {
  display: grid;
  gap: 10px;
}

.permission-section h3 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 8px;
}

.permission-check-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.permission-check {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(86, 168, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 35, 70, 0.54);
  color: #dbeaff;
  padding: 8px 9px;
  font-size: 12px;
}

.permission-check input {
  flex: 0 0 auto;
}

.permission-check.disabled {
  opacity: 0.46;
}

.permission-module-list {
  display: grid;
  gap: 12px;
}

.permission-module-list section {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(86, 168, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.46);
  padding: 10px;
}

.permission-module-list section > strong {
  color: #ffffff;
  font-size: 13px;
}

.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(86, 168, 255, 0.14);
  padding-top: 12px;
}

.group-cockpit-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.group-map-panel,
.group-trend-panel {
  min-width: 0;
  border: 1px solid rgba(86, 168, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 18, 40, 0.58);
  padding: 14px;
}

.group-map-panel {
  grid-column: 1 / -1;
}

.group-distribution {
  display: grid;
  grid-template-columns: minmax(520px, 1.45fr) minmax(260px, 0.55fr);
  gap: 14px;
  align-items: stretch;
}

.group-map-legend {
  display: flex;
  grid-column: 1 / -1;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.group-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.group-map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.group-map-legend i.warning {
  background: var(--yellow);
}

.group-map-legend i.danger {
  background: var(--red);
}

.china-project-map {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(86, 168, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, rgba(85, 247, 165, 0.12), transparent 18rem),
    linear-gradient(135deg, rgba(8, 35, 70, 0.96), rgba(3, 18, 40, 0.98));
  box-shadow: inset 0 0 44px rgba(31, 230, 255, 0.08);
}

.china-project-map::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(31, 230, 255, 0.12);
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.china-project-map::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(86, 168, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 168, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 78%);
  pointer-events: none;
}

.china-project-map-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.china-project-label-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.china-project-label {
  position: absolute;
  display: grid;
  min-width: 116px;
  max-width: min(210px, 42vw);
  gap: 3px;
  border: 1px solid rgba(85, 247, 165, 0.42);
  border-radius: 8px;
  background: rgba(4, 18, 36, 0.86);
  color: #ffffff;
  padding: 8px 10px;
  text-align: left;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26), 0 0 26px rgba(31, 230, 255, 0.16);
  pointer-events: none;
}

.china-project-label.active {
  border-color: rgba(31, 230, 255, 0.92);
  background: rgba(6, 30, 62, 0.96);
  box-shadow: 0 0 0 3px rgba(31, 230, 255, 0.15), 0 0 30px rgba(31, 230, 255, 0.26);
}

.china-project-label.warning {
  border-color: rgba(255, 209, 102, 0.62);
}

.china-project-label.danger {
  border-color: rgba(255, 92, 122, 0.72);
}

.china-project-label strong,
.china-project-label span,
.china-project-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.china-project-label strong {
  font-size: 12px;
  line-height: 1.25;
}

.china-project-label span,
.china-project-label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.china-project-map-loading {
  display: grid;
  min-height: 420px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.group-map-canvas.china-project-map-fallback {
  min-height: 420px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(22, 119, 255, 0.12), rgba(85, 247, 165, 0.04)),
    repeating-linear-gradient(45deg, rgba(86, 168, 255, 0.055) 0 1px, transparent 1px 22px);
}

.group-map-canvas {
  position: relative;
  min-height: 296px;
  overflow: hidden;
  border: 1px solid rgba(86, 168, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 119, 255, 0.12), rgba(85, 247, 165, 0.04)),
    repeating-linear-gradient(45deg, rgba(86, 168, 255, 0.055) 0 1px, transparent 1px 22px);
}

.group-map-canvas::before {
  position: absolute;
  inset: 36px 46px;
  border: 1px solid rgba(31, 230, 255, 0.16);
  border-radius: 42% 58% 48% 52%;
  content: "";
}

.group-map-canvas::after {
  position: absolute;
  inset: 74px 84px;
  border: 1px dashed rgba(31, 230, 255, 0.2);
  border-radius: 55% 45% 42% 58%;
  content: "";
}

.group-map-axis {
  position: absolute;
  z-index: 1;
  color: rgba(144, 166, 198, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.group-map-axis.north {
  top: 12px;
  left: 50%;
}

.group-map-axis.west {
  top: 50%;
  left: 12px;
}

.group-map-axis.east {
  top: 50%;
  right: 12px;
}

.group-map-node {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 70px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(85, 247, 165, 0.5);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.94);
  color: #ffffff;
  padding: 8px 10px;
  text-align: left;
  box-shadow: 0 0 26px rgba(31, 230, 255, 0.18);
}

.group-map-node.active {
  border-color: rgba(31, 230, 255, 0.94);
  background: rgba(8, 38, 78, 0.98);
  box-shadow: 0 0 0 3px rgba(31, 230, 255, 0.16), 0 0 30px rgba(31, 230, 255, 0.28);
}

.group-map-node.warning {
  border-color: rgba(255, 209, 102, 0.7);
}

.group-map-node.danger {
  border-color: rgba(255, 92, 122, 0.8);
}

.group-map-node b {
  color: #ffffff;
  font-size: 13px;
}

.group-map-node span {
  color: var(--muted);
  font-size: 12px;
}

.group-map-detail {
  min-width: 0;
}

.group-map-detail-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid rgba(86, 168, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.7);
  padding: 12px;
}

.group-map-detail-card.warning {
  border-color: rgba(255, 209, 102, 0.38);
}

.group-map-detail-card.danger {
  border-color: rgba(255, 92, 122, 0.45);
}

.group-map-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.group-map-detail-head strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
}

.group-map-detail-head span,
.group-map-detail-meta,
.group-map-source span,
.group-map-source small {
  color: var(--muted);
  font-size: 12px;
}

.group-map-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.group-map-kpis div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(86, 168, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 35, 70, 0.52);
  padding: 8px;
}

.group-map-kpis dt {
  color: var(--muted);
  font-size: 11px;
}

.group-map-kpis dd {
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-map-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-map-source {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(86, 168, 255, 0.12);
  padding-top: 10px;
}

.group-map-source small {
  line-height: 1.45;
}

.group-map-detail-card button {
  justify-self: start;
  min-height: 34px;
}

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

.group-trend-card {
  display: grid;
  min-height: 128px;
  grid-template-columns: minmax(0, 0.92fr) minmax(96px, 0.78fr);
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(86, 168, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.72);
  padding: 12px;
}

.group-trend-card span,
.group-trend-card small {
  color: var(--muted);
  font-size: 12px;
}

.group-trend-card strong {
  display: block;
  margin: 8px 0 4px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.15;
}

.group-spark {
  display: flex;
  height: 58px;
  align-items: end;
  gap: 3px;
}

.group-spark i {
  flex: 1 1 auto;
  min-width: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--blue);
  opacity: 0.92;
}

.group-spark.green i {
  background: var(--green);
}

.group-spark.yellow i {
  background: var(--yellow);
}

.group-spark.red i {
  background: var(--red);
}

.group-spark.empty-spark {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(86, 168, 255, 0.2);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.group-reserved-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.group-module-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.68);
  padding: 14px;
}

.group-module-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.group-module-card strong {
  color: #ffffff;
}

.group-module-card p {
  margin: 0;
  color: #c5d5ea;
  font-size: 13px;
  line-height: 1.55;
}

.group-module-card small {
  color: var(--muted);
}

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

.group-section-title span {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.group-section-title small {
  color: var(--muted);
  line-height: 1.4;
  text-align: right;
}

.group-plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(284px, 1fr));
  gap: 14px;
}

.group-plant-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(86, 168, 255, 0.22);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.78);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.group-plant-card.safe {
  border-color: rgba(85, 247, 165, 0.28);
}

.group-plant-card.warning {
  border-color: rgba(255, 209, 102, 0.38);
}

.group-plant-card.danger {
  border-color: rgba(255, 92, 122, 0.45);
}

.group-plant-head,
.group-plant-foot,
.group-priority-item,
.group-compare-row {
  display: flex;
  align-items: center;
}

.group-plant-head {
  justify-content: space-between;
  gap: 12px;
}

.group-plant-head strong,
.group-priority-item strong,
.group-compare-name strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-plant-head small,
.group-priority-item span,
.group-compare-name span,
.group-compare-numbers small {
  color: var(--muted);
  font-size: 12px;
}

.group-plant-score {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.18), rgba(85, 247, 165, 0.08));
}

.group-plant-score span {
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.group-plant-score small {
  color: var(--muted);
}

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

.group-plant-kpis div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.group-plant-kpis span {
  color: var(--muted);
  font-size: 12px;
}

.group-plant-kpis strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-progress {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(86, 168, 255, 0.14);
}

.group-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.group-progress.warning i {
  background: var(--yellow);
}

.group-progress.danger i {
  background: var(--red);
}

.group-plant-foot {
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(86, 168, 255, 0.14);
  padding-top: 12px;
}

.group-plant-foot span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-plant-foot button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(31, 230, 255, 0.45);
  border-radius: 8px;
  background: rgba(31, 230, 255, 0.1);
  color: #dffcff;
  padding: 0 12px;
}

.group-priority-panel {
  border: 1px solid rgba(86, 168, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 18, 40, 0.64);
  padding: 14px;
}

.group-priority-list {
  display: grid;
  gap: 10px;
}

.group-priority-item {
  gap: 10px;
  min-width: 0;
  border-bottom: 1px solid rgba(86, 168, 255, 0.12);
  padding-bottom: 10px;
}

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

.group-priority-item b {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.18);
  color: var(--cyan);
  font-size: 12px;
}

.group-priority-item div {
  min-width: 0;
  flex: 1 1 auto;
}

.group-comparison-bars {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.group-compare-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(260px, 1.4fr) minmax(140px, 0.6fr);
  gap: 16px;
  border: 1px solid rgba(86, 168, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 23, 48, 0.68);
  padding: 12px;
}

.group-compare-name,
.group-compare-bars label,
.group-compare-numbers {
  min-width: 0;
}

.group-compare-bars label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.group-compare-numbers {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: #ffffff;
}

.group-compare-numbers span {
  font-weight: 800;
}

.group-table-wrap {
  margin-top: 18px;
  max-height: 420px;
}

.group-table-wrap small {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .group-dashboard .metric-strip {
    grid-template-columns: repeat(3, minmax(132px, 1fr));
  }

  .group-cockpit-grid,
  .group-command-grid,
  .group-compare-row,
  .account-create-form,
  .project-create-form,
  .permission-layout {
    grid-template-columns: 1fr;
  }

  .group-distribution,
  .group-reserved-modules {
    grid-template-columns: 1fr;
  }

  .china-project-map,
  .china-project-map-canvas,
  .china-project-map-loading,
  .group-map-canvas.china-project-map-fallback {
    min-height: 360px;
  }

  .a2o-3d-scene,
  .a2o-3d-canvas,
  .a2o-3d-loading,
  .a2o-3d-fallback {
    min-height: 390px;
  }

  .a2o-embedded-viewer {
    min-height: 600px;
  }

  .a2o-viewer-frame {
    min-height: 520px;
  }

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

  .group-section-title small {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .group-dashboard .metric-strip,
  .group-plant-kpis {
    grid-template-columns: 1fr;
  }

  .group-plant-foot,
  .group-priority-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-compare-bars label {
    grid-template-columns: 1fr;
  }

  .a2o-3d-scene,
  .a2o-3d-canvas,
  .a2o-3d-loading,
  .a2o-3d-fallback {
    min-height: 360px;
  }

  .a2o-embedded-viewer {
    min-height: 520px;
    padding: 8px;
  }

  .a2o-viewer-frame {
    min-height: 430px;
  }

  .a2o-viewer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .a2o-embedded-cards {
    grid-template-columns: 1fr;
  }

  .a2o-3d-overlay {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    padding: 10px;
  }

  .a2o-3d-label.zone {
    display: none;
  }

  .a2o-3d-label.probe {
    min-width: 108px;
    max-width: 42vw;
    padding: 6px 8px;
  }

  .a2o-blower-strip {
    display: none;
  }

  .group-trends,
  .group-trend-card,
  .permission-check-grid,
  .permission-check-grid.compact {
    grid-template-columns: 1fr;
  }

  .china-project-label {
    max-width: min(168px, 54vw);
    padding: 7px 8px;
  }
}
