:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --text: #0f1f36;
  --muted: #58657a;
  --line: #cdd7e5;
  --blue: #1456c8;
  --green: #057a55;
  --red: #c12f24;
  --amber: #b76b00;
  --soft-blue: #eaf2ff;
  --surface: #f8fbff;
  --surface-strong: #f1f6fc;
  --shadow: 0 18px 45px rgba(15, 31, 54, 0.1);
  --shadow-soft: 0 10px 24px rgba(15, 31, 54, 0.07);
  --focus: 0 0 0 4px rgba(20, 86, 200, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 8% 0%, rgba(20, 86, 200, 0.12), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(5, 122, 85, 0.1), transparent 32%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 62%, #eaf0f7 100%),
    none;
  background-size: auto, contain;
  background-position: 8% 0%, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Site-wide background: use html to avoid stacking-context issues */
html {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #eef4ff;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: transparent;
}

#appView {
  color: #0f172a;
}

#appView h1,
#appView h2,
#appView h3,
#appView h4,
#appView h5,
#appView h6,
#appView strong,
#appView b {
  color: #0f172a;
}

#appView p,
#appView label,
#appView span,
#appView .eyebrow,
#appView .intro,
#appView .tab-button,
#appView .status-badge,
#appView .project-card span,
#appView .project-card p {
  color: #334155;
}

/* Ensure main content sits above the background */
#appView, .login-screen, .login-stack, .layout, .app-header {
  position: relative;
  z-index: 1;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: transparent;
}

.login-screen::before,
.login-screen::after {
  content: none;
}

.login-screen::before {
  content: none;
}

.login-screen::after {
  content: none;
}

.login-stack {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(560px, 100%);
  gap: 22px;
  justify-items: center;
}

.login-brand {
  display: grid;
  justify-items: center;
  width: 100%;
  color: var(--text);
}

.login-title-wrap {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.login-ki-logo {
  display: block;
  box-sizing: border-box;
  width: min(330px, 78vw);
  height: auto;
  margin-bottom: 10px;
  padding: 12px 16px;
  border: 12px solid rgba(32, 42, 64, 0.62);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  object-fit: contain;
}

.login-title-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: clamp(2.15rem, 6vw, 3.35rem);
  font-weight: 900;
  line-height: 1.14;
}

.lightning-word {
  position: relative;
  display: inline-block;
  overflow: visible;
  padding: 0 0.03em 0.12em;
  margin-bottom: -0.08em;
  color: #ffffff;
  line-height: 1.16;
  background: linear-gradient(95deg, #ffffff 0%, #f8fafc 48%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.18));
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.2);
}

.lightning-word::after {
  position: absolute;
  inset: 0 0.03em 0.12em 0;
  color: transparent;
  background:
    linear-gradient(112deg, transparent 0 9%, #facc15 9.5% 11%, transparent 11.5% 100%),
    linear-gradient(68deg, transparent 0 38%, #ffd54a 38.5% 40%, transparent 40.5% 100%),
    linear-gradient(116deg, transparent 0 70%, #facc15 70.5% 72%, transparent 72.5% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  content: "Lightning";
  line-height: 1.16;
  opacity: 1;
  pointer-events: none;
  text-shadow:
    0 0 8px rgba(255, 231, 99, 0.7),
    0 0 18px rgba(250, 204, 21, 0.5);
  animation: lightningStrikeFlash 2.8s steps(1, end) infinite;
}

@keyframes lightningStrikeFlash {
  0%,
  9%,
  12%,
  16%,
  100% {
    opacity: 0;
  }

  10%,
  14% {
    opacity: 1;
  }

  11%,
  15% {
    opacity: 0.35;
  }
}

@keyframes loginBrandFlash {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 16px 34px rgba(23, 92, 211, 0.22);
    filter: brightness(1);
  }

  12%,
  16%,
  20% {
    transform: scale(1.04);
    box-shadow: 0 18px 38px rgba(23, 92, 211, 0.3);
    filter: brightness(1.08);
  }
}

@keyframes loginBoltFlash {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  10%,
  18%,
  24% {
    transform: scale(1.04) translateY(-1px);
    opacity: 0.92;
  }

  14%,
  22% {
    transform: scale(1.01) translateY(0);
    opacity: 1;
  }
}

@keyframes dashboardBrandFlash {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 22px rgba(234, 179, 8, 0.24);
    filter: brightness(1);
  }

  12%,
  18%,
  24% {
    transform: scale(1.05);
    box-shadow: 0 14px 28px rgba(234, 179, 8, 0.34);
    filter: brightness(1.08);
  }
}

@keyframes dashboardBoltFlash {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  10%,
  16%,
  22% {
    transform: scale(1.05) translateY(-1px);
    opacity: 0.95;
  }

  14%,
  20% {
    transform: scale(1.01) translateY(0);
    opacity: 1;
  }
}

/* Branded mark: rounded gradient tile with white bolt and yellow flash */
.brand-mark,
#loginView .brand-mark,
.app-brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(135deg, #0b76ff 0%, #00b39a 100%); /* blue -> teal */
  box-shadow: 0 10px 30px rgba(3,16,55,0.18), inset 0 -6px 18px rgba(0,0,0,0.06);
}

.brand-bolt,
#loginView .brand-bolt,
.app-brand-mark .brand-bolt {
  position: relative;
  width: 20px;
  height: 32px;
  background: #ffffff;
  clip-path: polygon(48% 0, 100% 0, 65% 42%, 100% 42%, 35% 100%, 48% 54%, 0 54%);
  box-shadow: 0 6px 14px rgba(2,6,23,0.18), 0 0 6px rgba(255,255,255,0.6) inset;
}

/* yellow flash highlight (angled bar) */
.brand-bolt::before,
.app-brand-mark .brand-bolt::before,
#loginView .brand-bolt::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 24px;
  background: linear-gradient(180deg, #fff59d 0%, #ffd54a 50%, #f59e0b 100%);
  transform: rotate(-20deg);
  border-radius: 2px;
  filter: blur(0.6px);
  mix-blend-mode: screen;
  opacity: 0.0;
  box-shadow: 0 6px 18px rgba(245,158,11,0.14);
  animation: logoFlashPulse 2.4s linear infinite;
}

@keyframes logoFlashPulse {
  0%, 65%, 100% { opacity: 0; transform: rotate(-20deg) scale(1); }
  66%, 68% { opacity: 1; transform: rotate(-20deg) scale(1.06); }
  69% { opacity: 0.6; transform: rotate(-20deg) scale(1.02); }
}

/* dashboard variant slightly smaller */
.app-brand-mark { width:34px; height:34px; border-radius:8px; }
.app-brand-mark .brand-bolt { width:14px; height:23px; }

.login-title {
  margin: 0;
  text-align: center;
  font-size: clamp(2.15rem, 6vw, 3.35rem);
  line-height: 1;
  white-space: nowrap;
}

.login-panel {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(22, 32, 51, 0.16);
  backdrop-filter: blur(4px);
}

.login-panel::before {
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
  content: "";
}

.login-panel-heading {
  padding: 30px 32px 0;
  text-align: center;
}

.login-panel-heading h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.login-panel-heading .eyebrow {
  font-size: 1.18rem;
}

.login-form {
  display: grid;
  gap: 16px;
  padding: 26px 32px 32px;
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap input {
  padding-left: 44px;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}

.user-icon::before {
  position: absolute;
  top: 1px;
  left: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  content: "";
}

.user-icon::after {
  position: absolute;
  right: 1px;
  bottom: 0;
  left: 1px;
  height: 8px;
  border: 2px solid var(--blue);
  border-radius: 9px 9px 3px 3px;
  content: "";
}

.lock-icon::before {
  position: absolute;
  top: 1px;
  left: 4px;
  width: 10px;
  height: 9px;
  border: 2px solid var(--green);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.lock-icon::after {
  position: absolute;
  right: 2px;
  bottom: 1px;
  left: 2px;
  height: 10px;
  border-radius: 3px;
  background: var(--green);
  content: "";
}

@media (max-width: 720px) {
  .login-title-top {
    gap: 10px;
  }

  .brand-mark {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .login-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 420px) {
  .login-screen {
    padding: 18px;
  }

  .login-title-top {
    font-size: 1.55rem;
  }

  .login-ki-logo {
    width: min(280px, 82vw);
    margin-bottom: 6px;
    padding: 9px 12px;
    border-width: 9px;
    border-radius: 19px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .brand-bolt {
    width: 15px;
    height: 24px;
  }

  .login-title {
    font-size: 1.55rem;
  }

  .login-panel-heading,
  .login-form {
    padding-right: 22px;
    padding-left: 22px;
  }
}

.app-header,
.layout,
.layout-single {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 26px;
}

#appView {
  min-height: 100vh;
  background: transparent;
}

.app-header-copy {
  position: relative;
  padding-left: 22px;
}

.app-brand-home {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  max-width: 100%;
  font-size: clamp(1.28rem, 2.05vw, 1.68rem);
  font-weight: 900;
  line-height: 1.08;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(7, 31, 70, 0.85);
}

.app-brand-home:hover,
.app-brand-home:focus-visible {
  color: #dbeafe;
}

.app-brand-home:focus-visible {
  outline: 3px solid rgba(23, 92, 211, 0.24);
  outline-offset: 4px;
  border-radius: 8px;
}

.app-brand-mark {
  display: grid;
  flex-basis: 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(234, 179, 8, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #facc15 100%);
  box-shadow: 0 10px 22px rgba(234, 179, 8, 0.24);
  animation: dashboardBrandFlash 2.4s ease-in-out infinite;
}

.app-brand-mark .brand-bolt {
  width: 22px;
  height: 35px;
  background: #fff8dc;
  box-shadow: 0 0 10px rgba(255, 248, 220, 0.55);
  animation: dashboardBoltFlash 2.4s ease-in-out infinite;
}

.app-header-copy::before {
  position: absolute;
  top: 4px;
  bottom: 2px;
  left: 0;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--green));
  content: "";
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions .status-badge,
.header-actions .icon-button {
  flex: 0 0 128px;
  width: 128px;
  min-width: 128px;
  height: 56px;
  min-height: 56px;
  padding: 0 12px;
  justify-content: center;
}

.header-actions .icon-button {
  gap: 10px;
  text-align: center;
}

.header-actions .icon-button span:last-child {
  display: block;
  line-height: 1.15;
}

.header-actions .status-badge {
  gap: 8px;
}

@media (max-width: 920px) {
  .app-brand-home {
    font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  }

  .app-brand-mark {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .app-brand-mark .brand-bolt {
    width: 18px;
    height: 30px;
  }

  .header-actions .status-badge,
  .header-actions .icon-button {
    flex-basis: 116px;
    width: 116px;
    min-width: 116px;
  }
}

@media (max-width: 560px) {
  .app-brand-home {
    gap: 8px;
    font-size: clamp(0.82rem, 3.35vw, 1.05rem);
  }

  .app-brand-mark {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .app-brand-mark .brand-bolt {
    width: 14px;
    height: 23px;
  }
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(7, 31, 70, 0.85);
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 4px 14px rgba(7, 31, 70, 0.9), 0 1px 2px rgba(7, 31, 70, 0.9);
}

.intro {
  max-width: 680px;
  margin-bottom: 0;
  color: #eef6ff;
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(7, 31, 70, 0.9);
}

.standard-badge,
.status-badge {
  display: grid;
  grid-template-columns: 36px 1fr;
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 38px rgba(22, 32, 51, 0.1);
  gap: 2px 12px;
}

.standard-badge span,
.status-badge span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.standard-badge strong,
.status-badge strong {
  font-size: 1.25rem;
}

.status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  gap: 10px;
}

.status-badge span:not(.status-symbol),
.status-badge strong {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1;
}

.status-badge strong {
  font-weight: 800;
}

.badge-icon {
  display: grid;
  grid-row: span 2;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
}

.standard-badge-icon::before {
  width: 18px;
  height: 22px;
  border: 2px solid var(--blue);
  border-radius: 3px;
  background:
    linear-gradient(var(--blue), var(--blue)) 4px 6px / 10px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 4px 12px / 10px 2px no-repeat;
  content: "";
}

.status-symbol {
  position: relative;
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #eefaf4;
}

.status-symbol::before {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(8, 116, 67, 0.14);
  content: "";
}

.status-symbol::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  padding-bottom: 36px;
}

.layout-single {
  display: grid;
  gap: 16px;
  padding-bottom: 36px;
}

.panel {
  border: 1px solid rgba(205, 215, 229, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(22, 32, 51, 0.06);
}

.panel-heading {
  padding: 22px 24px 0;
}

.panel-heading h2 {
  margin-bottom: 6px;
  font-size: 1.2rem;
  color: #071f46;
  font-weight: 700;
}

.panel-heading p,
.note {
  color: #344054;
  line-height: 1.5;
  font-weight: 500;
}

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

.standard-version-note {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.form-footer-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px 24px;
}

.wide-field {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b8c2d2;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(23, 92, 211, 0.14);
}

button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.button-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: #1048aa;
}

.secondary-button {
  border-color: #b8c2d2;
  background: #fff;
  color: var(--text);
}

.secondary-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.danger-button {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff;
  color: var(--red);
}

.danger-button:hover {
  border-color: var(--red);
  background: #fff5f5;
}

.login-icon::before,
.logout-icon::before {
  position: absolute;
  top: 2px;
  left: 0;
  width: 9px;
  height: 14px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  content: "";
}

.login-icon::after,
.logout-icon::after {
  position: absolute;
  top: 8px;
  right: 0;
  width: 13px;
  height: 2px;
  background: currentColor;
  box-shadow: 5px -4px 0 -1px currentColor, 5px 4px 0 -1px currentColor;
  content: "";
}

.login-icon {
  transform: scaleX(-1);
}

.add-icon::before,
.add-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.add-icon::before {
  width: 16px;
  height: 2px;
}

.add-icon::after {
  width: 2px;
  height: 16px;
}

.remove-icon::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.view-icon::before {
  position: absolute;
  inset: 3px 0;
  border: 2px solid currentColor;
  border-radius: 50% 50% 46% 46%;
  content: "";
  transform: rotate(45deg);
}

.view-icon::after {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.back-icon::before,
.next-icon::before {
  position: absolute;
  top: 8px;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.back-icon::before {
  right: 1px;
}

.next-icon::before {
  left: 1px;
}

.back-icon::after,
.next-icon::after {
  position: absolute;
  top: 4px;
  width: 8px;
  height: 8px;
  border: solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.back-icon::after {
  left: 1px;
  border-width: 0 0 2px 2px;
}

.next-icon::after {
  right: 1px;
  border-width: 2px 2px 0 0;
}

.save-icon::before {
  position: absolute;
  inset: 1px 2px 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
}

.save-icon::after {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 6px;
  height: 4px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 8px 0 0 currentColor;
  content: "";
}

.open-icon::before {
  position: absolute;
  inset: 3px 1px 4px 3px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
}

.open-icon::after {
  position: absolute;
  top: 3px;
  right: 1px;
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  content: "";
}

.delete-icon::before {
  position: absolute;
  top: 5px;
  right: 3px;
  bottom: 2px;
  left: 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
  content: "";
}

.delete-icon::after {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 4px 3px 0 -1px currentColor;
  content: "";
}

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

.action-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  min-height: 250px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
}

.action-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  content: "";
}

.action-panel:nth-child(2)::before {
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.action-panel h2 {
  margin-bottom: 8px;
  font-size: 1.45rem;
  color: #0f172a;
  font-weight: 700;
}

.action-panel p {
  max-width: 460px;
  margin-bottom: 0;
  color: #334155;
  line-height: 1.6;
  font-weight: 500;
}

.action-icon {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(23, 92, 211, 0.12);
}

.create-icon::before,
.create-icon::after {
  position: absolute;
  background: var(--blue);
  content: "";
}

.create-icon::before {
  width: 26px;
  height: 4px;
  border-radius: 999px;
}

.create-icon::after {
  width: 4px;
  height: 26px;
  border-radius: 999px;
}

.projects-icon {
  background: #eefaf4;
  box-shadow: inset 0 0 0 1px rgba(8, 116, 67, 0.14);
}

.projects-icon::before,
.projects-icon::after {
  position: absolute;
  width: 25px;
  height: 30px;
  border: 2px solid var(--green);
  border-radius: 4px;
  background:
    linear-gradient(var(--green), var(--green)) 6px 9px / 13px 2px no-repeat,
    linear-gradient(var(--green), var(--green)) 6px 16px / 13px 2px no-repeat;
  content: "";
}

.projects-icon::before {
  transform: translate(-5px, -4px);
}

.projects-icon::after {
  background-color: #eefaf4;
  transform: translate(5px, 4px);
}

.sub-header {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px 18px;
  border: 1px solid rgba(184, 194, 210, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(22, 32, 51, 0.08);
}

.editor-header {
  justify-content: space-between;
}

.editor-header > div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.editor-actions {
  display: flex;
  gap: 10px;
}

.protection-header > div:first-child {
  flex: 1 1 auto;
}

.protection-header-status {
  flex: 0 1 270px;
  margin-left: 10px;
  gap: 6px;
}

.protection-header-status .protection-status-card {
  gap: 6px;
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 7px;
}

.protection-header-status .protection-status-symbol {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.protection-header-status .protection-status-card h3 {
  margin-bottom: 0;
  font-size: 0.72rem;
}

.protection-header-status .protection-status-card p {
  font-size: 0.64rem;
  line-height: 1.15;
}

.sub-header h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

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

.page-title-icon {
  position: relative;
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(23, 92, 211, 0.12);
}

.details-page-icon::before {
  width: 22px;
  height: 26px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  background:
    linear-gradient(var(--blue), var(--blue)) 5px 7px / 12px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 5px 14px / 12px 2px no-repeat;
  content: "";
}

.saved-page-icon {
  background: #eefaf4;
}

.saved-page-icon::before,
.saved-page-icon::after {
  position: absolute;
  width: 21px;
  height: 25px;
  border: 2px solid var(--green);
  border-radius: 4px;
  background: #eefaf4;
  content: "";
}

.saved-page-icon::before {
  transform: translate(-4px, -3px);
}

.saved-page-icon::after {
  transform: translate(4px, 3px);
}

.environment-page-icon {
  background: #eefaf4;
}

.environment-page-icon::before {
  position: absolute;
  width: 23px;
  height: 23px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--green) 0 2px, transparent 3px),
    linear-gradient(var(--green), var(--green)) 50% 0 / 2px 100% no-repeat,
    linear-gradient(var(--green), var(--green)) 0 50% / 100% 2px no-repeat;
  content: "";
}

.environment-page-icon::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px #eefaf4;
  content: "";
}

.general-page-icon {
  background: #eef6ff;
}

.general-page-icon::before {
  width: 22px;
  height: 26px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  background:
    linear-gradient(var(--blue), var(--blue)) 5px 8px / 12px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 5px 15px / 12px 2px no-repeat;
  content: "";
}

.structures-page-icon,
.zones-page-icon {
  background: #eef6ff;
}

.structures-page-icon::before,
.zones-page-icon::before {
  width: 24px;
  height: 20px;
  border: 2px solid var(--blue);
  border-top: 0;
  content: "";
}

.structures-page-icon::after,
.zones-page-icon::after {
  position: absolute;
  top: 8px;
  width: 21px;
  height: 21px;
  border-top: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
  content: "";
  transform: rotate(45deg);
}

.lines-page-icon {
  background: #eefaf4;
}

.lines-page-icon::before {
  position: absolute;
  top: 8px;
  width: 17px;
  height: 28px;
  border-right: 3px solid var(--green);
  border-left: 3px solid var(--green);
  content: "";
  transform: skewX(-12deg);
}

.lines-page-icon::after {
  position: absolute;
  width: 25px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 -7px 0 var(--green), 0 7px 0 var(--green);
  content: "";
}

.protection-page-icon {
  background: #eefaf4;
}

.protection-page-icon::before {
  width: 24px;
  height: 28px;
  background: var(--green);
  clip-path: polygon(50% 0, 86% 12%, 86% 48%, 50% 100%, 14% 48%, 14% 12%);
  content: "";
}

.financial-page-icon {
  background: #fff7ed;
}

.financial-page-icon::before {
  width: 22px;
  height: 22px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  content: "";
}

.financial-page-icon::after {
  position: absolute;
  color: var(--amber);
  content: "$";
  font-weight: 800;
}

.section-kicker {
  color: #1456c8;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.project-template {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 36px;
}

.project-form-panel {
  overflow: hidden;
  border-color: rgba(184, 194, 210, 0.78);
  box-shadow: 0 18px 48px rgba(22, 32, 51, 0.1);
}

.project-form-panel::before {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  content: "";
}

.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.form-heading h2 {
  font-size: 1.35rem;
}

.form-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #b8c2d2;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(184, 194, 210, 0.72);
  border-radius: 8px;
  background: #fbfcff;
}

.form-section legend {
  padding: 0 8px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.compact-grid {
  grid-template-columns: repeat(2, minmax(180px, 280px));
}

.project-summary-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 24px;
  border: 1px solid rgba(23, 92, 211, 0.18);
  border-radius: 8px;
  background: linear-gradient(160deg, #162033 0%, #1f3a5f 62%, #087443 140%);
  color: #fff;
  box-shadow: 0 18px 48px rgba(22, 32, 51, 0.18);
}

.project-summary-panel .eyebrow {
  color: #93c5fd;
}

.project-summary-panel h2 {
  margin-bottom: 20px;
  font-size: 1.45rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.project-summary-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.project-summary-panel dl div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.project-summary-panel dt {
  margin-bottom: 5px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-summary-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.panel-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 28px 28px;
}

.environment-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 36px;
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(22, 32, 51, 0.1);
}

.environment-page::before {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--amber));
  content: "";
}

.parameters-layout {
  padding: 18px;
  background: #f8fafc;
}

.parameters-card {
  overflow: hidden;
}

.parameters-input-label {
  display: block;
  padding: 16px 18px 8px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.parameters-textarea {
  display: block;
  box-sizing: border-box;
  width: calc(100% - 36px);
  min-height: 330px;
  margin: 0 18px;
  padding: 14px 16px;
  resize: vertical;
  border: 1px solid #b8c2d2;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: 0.9rem/1.55 Consolas, "Courier New", monospace;
}

.parameters-textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(23, 92, 211, 0.14);
}

.parameters-note {
  margin: 8px 18px 18px;
}

.assessment-tabs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  overflow-x: auto;
}

.tab-button {
  display: inline-grid;
  min-width: 96px;
  min-height: 38px;
  place-items: center;
  padding: 9px 15px;
  border: 1px solid rgba(184, 194, 210, 0.74);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f9fbff;
  color: #344054;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tab-button:hover {
  color: var(--blue);
  background: #eef6ff;
}

.tab-button.is-muted {
  color: #667085;
  background: #f6f8fb;
  opacity: 0.78;
}

.tab-button.is-muted:hover {
  color: var(--blue);
  opacity: 1;
}

.tab-button.is-disabled {
  color: #98a2b3;
  background: #f2f4f7;
  cursor: not-allowed;
  opacity: 0.68;
  pointer-events: none;
}

.tab-button.is-active {
  border-color: rgba(23, 92, 211, 0.46);
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  color: #0b4db3;
  opacity: 1;
  box-shadow: inset 0 4px 0 var(--blue), 0 -1px 0 rgba(23, 92, 211, 0.12);
}

.environment-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 640px;
  background: #f8fafc;
}

.environment-form-panel {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.tool-group {
  display: flex;
  align-items: center;
  min-height: 62px;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(184, 194, 210, 0.72);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
}

.tool-group strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.9rem;
}

.tool-group span:not(.tool-icon, .risk-key) {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.tool-icon {
  position: relative;
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
}

.add-document-icon::before {
  width: 20px;
  height: 25px;
  border: 2px solid var(--blue);
  border-radius: 3px;
  background:
    linear-gradient(var(--blue), var(--blue)) 4px 7px / 10px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 4px 13px / 10px 2px no-repeat;
  content: "";
}

.add-document-icon::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) 50% 50% / 8px 2px no-repeat,
    linear-gradient(#fff, #fff) 50% 50% / 2px 8px no-repeat,
    var(--green);
  content: "";
}

.structure-tool-icon::before,
.zone-tool-icon::before {
  width: 24px;
  height: 20px;
  border: 2px solid #98a2b3;
  border-top: 0;
  content: "";
}

.structure-tool-icon::after,
.zone-tool-icon::after {
  position: absolute;
  top: 3px;
  width: 21px;
  height: 21px;
  border-top: 2px solid #98a2b3;
  border-left: 2px solid #98a2b3;
  content: "";
  transform: rotate(45deg);
}

.line-tool-icon::before {
  position: absolute;
  top: 2px;
  width: 20px;
  height: 28px;
  border-right: 3px solid #98a2b3;
  border-left: 3px solid #98a2b3;
  content: "";
  transform: skewX(-15deg);
}

.line-tool-icon::after {
  position: absolute;
  width: 28px;
  height: 2px;
  background: #98a2b3;
  box-shadow: 0 -8px 0 #98a2b3, 0 8px 0 #98a2b3;
  content: "";
}

.risk-key {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.acceptable-key {
  background: #86efac;
}

.excessive-key {
  background: #ff1f1f;
}

.environment-content {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  gap: 16px;
  padding: 22px;
}

.environment-note-strip {
  grid-column: 1 / -1;
}

.environment-card {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(22, 32, 51, 0.07);
}

.environment-content .environment-card {
  max-width: 820px;
  width: 100%;
}

.environment-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.environment-card-heading h3 {
  margin-bottom: 0;
  font-size: 1.12rem;
}

.mini-icon {
  position: relative;
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
}

.lightning-mini-icon::before {
  width: 16px;
  height: 26px;
  background: var(--blue);
  clip-path: polygon(52% 0, 100% 0, 66% 42%, 100% 42%, 32% 100%, 45% 55%, 0 55%);
  content: "";
}

.service-mini-icon {
  background: #eefaf4;
}

.service-mini-icon::before {
  position: absolute;
  top: 6px;
  width: 17px;
  height: 28px;
  border-right: 3px solid var(--green);
  border-left: 3px solid var(--green);
  content: "";
  transform: skewX(-12deg);
}

.service-mini-icon::after {
  position: absolute;
  width: 25px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 -7px 0 var(--green), 0 7px 0 var(--green);
  content: "";
}

.case-mini-icon::before {
  width: 22px;
  height: 26px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  background:
    linear-gradient(var(--blue), var(--blue)) 5px 8px / 12px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 5px 15px / 12px 2px no-repeat;
  content: "";
}

.standard-mini-icon {
  background: #eef6ff;
}

.standard-mini-icon::before {
  width: 22px;
  height: 26px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  background:
    linear-gradient(var(--blue), var(--blue)) 5px 7px / 12px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 5px 13px / 12px 2px no-repeat;
  content: "";
}

.standard-mini-icon::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 10px;
  height: 6px;
  border: solid var(--green);
  border-width: 0 0 3px 3px;
  content: "";
  transform: rotate(-45deg);
}

.risk-mini-icon {
  background: #fff7ed;
}

.risk-mini-icon::before {
  width: 0;
  height: 0;
  border-right: 12px solid transparent;
  border-bottom: 24px solid var(--amber);
  border-left: 12px solid transparent;
  content: "";
}

.risk-mini-icon::after {
  position: absolute;
  top: 13px;
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 11px 0 -1px #fff;
  content: "";
}

.financial-mini-icon {
  background: #eefaf4;
}

.financial-mini-icon::before {
  width: 24px;
  height: 24px;
  border: 2px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  content: "$";
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
}

.environment-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(120px, 0.45fr) minmax(190px, 0.75fr);
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
}

.keraunic-map-link {
  grid-column: 1 / -1;
  justify-self: start;
  margin: -2px 0 2px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #244a2a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.keraunic-map-link:hover,
.keraunic-map-link:focus-visible {
  color: #0f6b32;
}

.keraunic-map-dialog {
  width: min(94vw, 1180px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #aebfaf;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.32);
}

.keraunic-map-dialog::backdrop {
  background: rgba(7, 31, 20, 0.68);
  backdrop-filter: blur(3px);
}

.keraunic-map-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid #d7e0d7;
}

.keraunic-map-dialog-header h3,
.keraunic-map-dialog-header p {
  margin: 0;
}

.keraunic-map-dialog-header p,
.keraunic-map-note {
  color: #667085;
  font-size: 12px;
}

.keraunic-map-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #c7d8c8;
  border-radius: 50%;
  background: #f7faf7;
  color: #203c25;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.keraunic-map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ddecf3;
}

.keraunic-map-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 62.58%;
  height: 159.8%;
  max-width: none;
  object-fit: fill;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}

@media (max-height: 760px) and (orientation: landscape) {
  .keraunic-map-dialog {
    width: min(86vw, 1000px);
  }

  .keraunic-map-frame {
    max-height: 68vh;
  }
}

.keraunic-map-note {
  margin: 0;
  padding: 11px 18px 13px;
  border-top: 1px solid #d7e0d7;
}

.field-label-with-action { display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; }
.field-notes-link { flex: 0 0 auto; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: #2563eb; font: inherit; font-size: 11px; font-style: italic; font-weight: 800; letter-spacing: .04em; cursor: pointer; }
.field-notes-link:hover, .field-notes-link:focus-visible { color: #1d4ed8; }
.fire-load-notes-dialog { width: min(92vw, 900px); max-width: none; max-height: 88vh; margin: auto; padding: 0; overflow: hidden; border: 1px solid #aebfaf; border-radius: 14px; background: #fff; color: #17251b; box-shadow: 0 24px 80px rgba(16, 24, 40, .32); }
.fire-load-notes-dialog::backdrop { background: rgba(7, 31, 20, .68); backdrop-filter: blur(3px); }
.fire-load-notes-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-bottom: 1px solid #d7e0d7; background: #f7faf7; }
.fire-load-notes-header h3, .fire-load-notes-header p { margin: 0; }
.fire-load-notes-header p { margin-top: 3px; color: #667085; font-size: 12px; }
.fire-load-notes-content { max-height: calc(88vh - 76px); padding: 18px 22px 22px; overflow-y: auto; font-size: 14px; line-height: 1.55; }
.fire-load-notes-content p { margin: 0 0 12px; }
.fire-load-notes-content p:last-child { margin-bottom: 0; }
.fire-load-notes-content strong { display: inline-block; min-width: 62px; color: #173d24; }
.fire-load-note-group ol { margin: -3px 0 14px 40px; padding-left: 18px; }
.fire-load-note-group li { margin: 5px 0; padding-left: 5px; }

.environment-field {
  min-width: 0;
}

.environment-field.wide-field {
  grid-column: auto;
}

.environment-ce-field {
  grid-column: span 2;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #b8c2d2;
  border-radius: 6px;
  background: #fff;
}

.unit-input input {
  border: 0;
  min-width: 96px;
}

.unit-input span {
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.highlight-input {
  background: #fff8a6;
}

.field-unit {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.environment-value-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.environment-value-strip div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(8, 116, 67, 0.18);
  border-radius: 8px;
  background: #f0fdf4;
  text-align: center;
}

.environment-value-strip span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.environment-value-strip strong {
  color: var(--green);
  font-size: 1.1rem;
}

.environment-note-strip div {
  padding: 14px 16px;
  border: 1px solid rgba(23, 92, 211, 0.12);
  border-radius: 8px;
  background: #eef6ff;
}

.environment-note-strip strong {
  display: block;
  margin-bottom: 5px;
  color: var(--blue);
}

.environment-note-strip span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.general-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 640px;
  background: #f8fafc;
}

.general-form-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-content: start;
  align-items: start;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.general-layout > .environment-risk-panel {
  border-top: 0;
}

.general-fields {
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
}

textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid #b8c2d2;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  resize: vertical;
}

textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(23, 92, 211, 0.14);
}

.assessment-standard-options {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.assessment-standard-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 17px 18px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.assessment-standard-option input {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  accent-color: var(--blue);
}

.assessment-standard-option.is-selected {
  border-color: #c7e4f7;
  background: #e4f3ff;
}

.assessment-standard-option.is-disabled {
  background: #fafafa;
  color: #c8c8c8;
  cursor: not-allowed;
}

.assessment-standard-option.is-disabled input {
  accent-color: #c8c8c8;
}

.general-risk-options {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.general-risk-option {
  display: grid;
  grid-template-columns: auto 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fbfcff;
  cursor: pointer;
}

.general-risk-option input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--blue);
}

.general-risk-option strong {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f2f4f7;
  color: #667085;
  font-size: 1rem;
}

.general-risk-option span {
  color: var(--text);
  font-weight: 700;
}

.general-risk-option b {
  color: var(--green);
  font-size: 0.95rem;
}

.general-risk-option.is-selected {
  border-color: var(--blue);
  background: #eef6ff;
}

.general-risk-option.is-selected strong {
  background: var(--blue);
  color: #fff;
}

.input-placeholder-page {
  min-height: 0;
}

.financial-input-panel {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.financial-card {
  max-width: 760px;
  width: min(760px, 100%);
}

.financial-fields-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(180px, 0.55fr);
  gap: 12px 16px;
  align-items: end;
  padding: 18px 20px;
}

.financial-fields-grid .environment-field {
  display: grid;
  gap: 6px;
}

.financial-linked-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.8fr) minmax(180px, 0.55fr);
  gap: 12px 16px;
  align-items: end;
}

.financial-note {
  display: grid;
  gap: 5px;
  margin: 0 20px 20px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 92, 211, 0.14);
  border-radius: 8px;
  background: #eef6ff;
  color: var(--muted);
  font-size: 0.88rem;
}

.financial-note strong {
  color: var(--blue);
}

.admin-users-panel {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(460px, 1.15fr);
  gap: 18px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 20px 28px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.admin-users-hero {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(23, 92, 211, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
}

.admin-users-hero h3 {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: 1.2rem;
}

.admin-users-hero p:last-child {
  margin: 0;
  color: var(--muted);
}

.admin-users-hero > span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e4f3ff;
  color: var(--blue);
  font-weight: 900;
}

.admin-user-card {
  align-self: start;
}

.admin-user-form {
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
}

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

.admin-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fbfcff;
}

.admin-permission-grid legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 900;
}

.admin-permission-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(184, 194, 210, 0.64);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.admin-permission-grid input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.user-account-list {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.user-account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.user-account-details {
  display: contents;
}

.user-account-item h4 {
  grid-column: 1;
  grid-row: 1;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1rem;
}

.user-account-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-content: flex-end;
  gap: 8px;
}

.user-permission-list {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 6px;
}

.user-permission-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
}

.user-access-edit-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.user-access-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(184, 194, 210, 0.66);
  border-radius: 8px;
  background: #fbfcff;
}

.user-access-editor legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.user-access-editor label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-access-editor input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.backup-restore-card {
  grid-column: 1 / -1;
}

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

.backup-restore-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 14px;
}

.backup-project-list {
  max-height: 360px;
  overflow: auto;
}

.backup-project-meta {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

@media (max-width: 920px) {
  .admin-users-panel,
  .admin-user-fields,
  .admin-permission-grid {
    grid-template-columns: 1fr;
  }

  .admin-users-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .user-access-edit-panel,
  .user-access-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .user-account-item {
    grid-template-columns: 1fr;
  }

  .user-account-item h4,
  .user-account-actions,
  .user-permission-list,
  .user-access-edit-panel {
    grid-column: 1;
  }

  .user-account-actions {
    grid-row: 2;
    justify-content: flex-start;
  }

  .user-permission-list {
    grid-row: 3;
  }

  .user-access-edit-panel {
    grid-row: 4;
  }
}

.placeholder-content {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 48px 24px;
  text-align: center;
}

.placeholder-content .page-title-icon {
  margin-bottom: 16px;
}

.placeholder-content h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.placeholder-content p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.structure-input-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.structure-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.structure-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-action {
  border-color: rgba(180, 35, 24, 0.25);
  color: var(--red);
}

.danger-action:hover {
  border-color: var(--red);
  background: #fff5f5;
  color: var(--red);
}

.danger-action:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.structure-top-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.7fr) minmax(118px, 0.35fr);
  gap: 16px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.structure-primary-field,
.structure-shield-field {
  min-width: 0;
}

.structure-detail-card {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.structure-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.structure-detail-tab {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 7px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.structure-detail-tab.is-active {
  background: #fff;
  color: var(--blue);
}

.structure-detail-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(300px, 0.72fr);
  gap: 18px 24px;
  padding: 16px 18px 22px;
}

.structure-fields-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(124px, 0.38fr);
  gap: 14px 16px;
  align-content: start;
}

.structure-fields-grid .wide-field {
  grid-column: 1 / -1;
}

.structure-fields-grid .structure-paired-field {
  grid-column: 1;
}

.structure-dimensions-heading {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.structure-dimensions-heading h3 {
  margin: 0;
  color: #071f46;
  font-size: 0.98rem;
  font-weight: 800;
}

.coefficient-field,
.dimension-field {
  max-width: none;
}

.structure-fields-grid .dimension-field {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 12px;
}

.structure-fields-grid .dimension-field input {
  min-height: 34px;
  padding: 6px 10px;
  text-align: right;
}

.readonly-input {
  pointer-events: none;
  background: #f3f6fb;
  color: var(--muted);
  cursor: default;
}

.structure-collection-results {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(23, 92, 211, 0.14);
  border-radius: 8px;
  background: #f8fbff;
}

.structure-collection-results div {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fff;
}

.structure-collection-results span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.structure-collection-results strong {
  color: #071f46;
  font-size: 1.05rem;
  text-align: right;
}

.structure-collection-results p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.structure-standard-note {
  display: grid;
  grid-column: 1 / -1;
  gap: 5px;
  align-self: start;
  padding: 13px 15px;
  border: 1px solid rgba(23, 92, 211, 0.12);
  border-radius: 8px;
  background: #eef6ff;
}

.structure-standard-note strong {
  color: var(--blue);
  font-size: 0.88rem;
}

.structure-standard-note span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.structure-adjacent-card {
  grid-column: 1;
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.structure-location-card {
  display: grid;
  grid-column: 1;
  grid-template-columns: minmax(260px, 1fr) minmax(124px, 0.38fr);
  gap: 14px 16px;
  align-self: start;
}

.structure-location-card .structure-cd-field {
  max-width: none;
}

.structure-adjacent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.structure-adjacent-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, 54px);
  gap: 4px;
  padding: 4px;
  border: 1px solid #c8d2e1;
  border-radius: 8px;
  background: #f8fafc;
}

.structure-adjacent-choice {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.structure-adjacent-choice.is-active {
  background: var(--blue);
  color: #fff;
}

.structure-adjacent-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(118px, 0.38fr);
  gap: 14px 16px;
  padding: 16px;
}

.structure-adjacent-grid .coefficient-field {
  max-width: none;
}

.structure-diagram {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(23, 92, 211, 0.04) 45% 55%, transparent 55%),
    #fff;
}

.structure-shape-image {
  position: absolute;
  inset: 20px;
  z-index: 2;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  object-fit: contain;
  object-position: center;
}

.structure-shape-caption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  z-index: 3;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(184, 194, 210, 0.72);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.structure-diagram.has-image .building-shape,
.structure-diagram.has-image .dimension-line {
  display: none;
}

.structure-fields-grid .structure-dimension-hidden {
  display: none !important;
}

.building-shape {
  position: absolute;
  right: 72px;
  bottom: 72px;
  width: 220px;
  height: 120px;
  transform: skewY(-8deg);
}

.building-top,
.building-front,
.building-side {
  position: absolute;
  display: block;
  border: 3px solid #0b0f19;
}

.building-top {
  left: 10px;
  top: -48px;
  width: 190px;
  height: 78px;
  background: #fff5b8;
  transform: skewX(-30deg);
}

.building-front {
  left: 10px;
  top: 28px;
  width: 118px;
  height: 86px;
  background: #ffe51f;
}

.building-side {
  left: 128px;
  top: 28px;
  width: 86px;
  height: 86px;
  background: #ad941b;
  transform: skewY(-24deg);
  transform-origin: left top;
}

.dimension-line {
  position: absolute;
  color: #0b0f19;
  font-size: 1.1rem;
  font-weight: 900;
}

.dimension-height {
  right: 338px;
  bottom: 150px;
}

.dimension-width {
  right: 310px;
  bottom: 42px;
  transform: rotate(25deg);
}

.dimension-length {
  right: 94px;
  bottom: 48px;
  transform: rotate(-24deg);
}

.assessment-risk-summary-slot {
  border-top: 1px solid var(--line);
}

.line-input-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.line-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.line-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.line-top-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(380px, 1fr);
  gap: 16px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.line-detail-card {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.line-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.line-detail-tab {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 7px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.line-detail-tab.is-active {
  background: #fff;
  color: var(--blue);
}

.line-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.line-form-stack {
  display: grid;
  gap: 16px;
  padding: 16px 18px 20px;
  background: #f8fafc;
}

.line-section-card {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.line-section-heading {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.line-section-heading h3,
.line-section-heading p {
  margin: 0;
}

.line-section-heading h3 {
  font-size: 1rem;
}

.line-section-heading p {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.line-fields-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(220px, 0.65fr);
  gap: 14px 16px;
  padding: 16px;
  align-items: start;
}

.line-field-column {
  display: contents;
}

.line-field-column .environment-field {
  width: 100%;
  max-width: none;
}

.line-selection-column > .environment-field {
  grid-column: 1;
}

.line-value-column > .environment-field {
  grid-column: 2;
}

.line-value-column > .environment-field:nth-child(1) { grid-row: 3; }
.line-value-column > .environment-field:nth-child(2) { grid-row: 4; }
.line-value-column > .environment-field:nth-child(3) { grid-row: 5; }
.line-value-column > .environment-field:nth-child(4) { grid-row: 6; }
.line-value-column > .environment-field:nth-child(5) { grid-row: 10; }

.line-value-column > .coefficient-field {
  padding: 10px 12px;
  border: 1px solid #dfc77e;
  border-radius: 8px;
  background: #fffaf0;
}

.line-grid-column-heading {
  padding: 0 2px 8px;
  border-bottom: 2px solid var(--green);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.line-grid-column-heading.is-value {
  border-bottom-color: #b9902f;
  color: #755611;
}

.line-fields-grid > .coefficient-field {
  padding: 10px 12px;
  border: 1px solid #dfc77e;
  border-radius: 8px;
  background: #fffaf0;
}

.line-fields-grid .wide-field {
  grid-column: 1 / -1;
}

/* Unified assessment-tab design, based on the Lines selection/value template. */
#parametersView .environment-card,
#generalInputView .environment-card,
#environmentView .environment-card,
#structuresView .structure-top-grid,
#structuresView .structure-detail-card,
#structuresView .structure-adjacent-card,
#structuresView .structure-location-card,
#linesView .line-section-card,
#zonesView .zone-top-grid,
#zonesView .zone-detail-card,
#zonesView .zone-section-card,
#protectionView .environment-card,
#protectionView .protection-measure-group,
#financialView .environment-card {
  border: 1px solid rgba(184, 194, 210, 0.88);
  border-top: 3px solid var(--green);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.045);
}

#parametersView .environment-card-heading,
#generalInputView .environment-card-heading,
#protectionView .environment-card-heading,
#financialView .environment-card-heading,
#linesView .line-section-heading,
#zonesView .zone-section-heading,
#structuresView .structure-adjacent-heading,
#protectionView .protection-measure-heading {
  border-bottom: 1px solid #d8e5dd;
  background: linear-gradient(90deg, #f1f8f4 0%, #fbfdfc 68%, #fffaf0 100%);
}

#linesView .line-section-heading,
#zonesView .zone-section-heading,
#structuresView .structure-adjacent-heading {
  padding: 14px 16px;
}

#parametersView .environment-card-heading h3,
#generalInputView .environment-card-heading h3,
#protectionView .environment-card-heading h3,
#financialView .environment-card-heading h3,
#linesView .line-section-heading h3,
#zonesView .zone-section-heading h3,
#structuresView .structure-adjacent-heading h3 {
  color: #174f35;
}

#parametersView .eyebrow,
#generalInputView .eyebrow,
#protectionView .eyebrow,
#financialView .eyebrow {
  color: var(--green);
}

#parametersView .environment-field,
#generalInputView .assessment-standard-option,
#environmentView .environment-field,
#structuresView .environment-field:not(.coefficient-field),
#linesView .environment-field:not(.coefficient-field),
#zonesView .environment-field:not(.coefficient-field),
#protectionView .environment-field:not(.coefficient-field),
#financialView .environment-field:not(:has(.highlight-input)) {
  border-color: #d8e5dd;
  background: #fbfdfc;
}

#environmentView .environment-field:has(.highlight-input),
#structuresView .coefficient-field,
#linesView .coefficient-field,
#zonesView .coefficient-field,
#protectionView .coefficient-field,
#financialView .environment-field:has(.highlight-input) {
  padding: 10px 12px;
  border: 1px solid #dfc77e;
  border-radius: 8px;
  background: #fffaf0;
}

#parametersView input:focus,
#parametersView textarea:focus,
#generalInputView input:focus,
#environmentView input:focus,
#environmentView select:focus,
#structuresView input:focus,
#structuresView select:focus,
#linesView input:focus,
#linesView select:focus,
#zonesView input:focus,
#zonesView select:focus,
#protectionView input:focus,
#protectionView select:focus,
#financialView input:focus,
#financialView select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 122, 79, 0.12);
  outline: none;
}

#parametersView .assessment-tabs .is-active,
#generalInputView .assessment-tabs .is-active,
#structuresView .assessment-tabs .is-active,
#environmentView .assessment-tabs .is-active,
#linesView .assessment-tabs .is-active,
#zonesView .assessment-tabs .is-active,
#protectionView .assessment-tabs .is-active,
#financialView .assessment-tabs .is-active {
  border-bottom-color: var(--green);
  background: #f1f8f4;
  color: #174f35;
}

.line-value-panel {
  display: grid;
  align-content: start;
  border-left: 1px solid var(--line);
  background: #fff;
}

.line-value-heading {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.line-value-heading h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.line-value-grid {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  padding: 16px 18px 18px;
}

.line-value-grid span,
.line-value-grid strong {
  display: grid;
  align-items: center;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fbfcff;
  font-size: 0.86rem;
}

.line-value-grid span {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.line-value-grid strong {
  background: #fff8a6;
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.zone-input-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.zone-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.zone-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.zone-top-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(380px, 1fr);
  gap: 16px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.zone-detail-card {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.zone-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.zone-detail-tab {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 7px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.zone-detail-tab.is-active {
  background: #fff;
  color: var(--blue);
}

.zone-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.zone-form-stack {
  display: grid;
  gap: 16px;
  padding: 16px 18px 20px;
  background: #f8fafc;
}

.zone-section-card {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.zone-section-heading {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.zone-section-heading h3,
.zone-section-heading p {
  margin: 0;
}

.zone-section-heading h3 {
  font-size: 1rem;
}

.zone-section-heading p {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.zone-fields-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(118px, 0.28fr);
  gap: 14px 16px;
  padding: 16px;
}

.zone-fields-grid .wide-field {
  grid-column: 1 / -1;
}

.zone-value-panel {
  display: grid;
  align-content: start;
  border-left: 1px solid var(--line);
  background: #fff;
}

.zone-value-heading {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.zone-value-heading h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.zone-value-grid {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  padding: 16px 18px 18px;
}

.zone-value-grid span,
.zone-value-grid strong {
  display: grid;
  align-items: center;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  background: #fbfcff;
  font-size: 0.86rem;
}

.zone-value-grid span {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.zone-value-grid strong {
  background: #fff8a6;
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.structure-profile-tile,
.zone-profile-tile,
.line-profile-tile {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 28px 24px;
  padding: 22px 26px 26px 16px;
  border: 1px solid #c8d2e1;
  border-radius: 8px;
  background: #f8fafd;
}

.structure-profile-icon,
.zone-profile-icon {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 34px;
  border: 2px solid #98a6ba;
  border-top: 0;
}

.structure-profile-icon::before,
.zone-profile-icon::before {
  position: absolute;
  top: -13px;
  left: 4px;
  width: 27px;
  height: 27px;
  border-top: 2px solid #98a6ba;
  border-left: 2px solid #98a6ba;
  content: "";
  transform: rotate(45deg);
}

.structure-profile-icon::after,
.zone-profile-icon::after {
  position: absolute;
  top: -7px;
  right: -5px;
  width: 2px;
  height: 17px;
  background: #98a6ba;
  content: "";
}

.zone-profile-icon::before {
  left: 8px;
  width: 24px;
  height: 24px;
}

.zone-profile-icon::after {
  right: auto;
  left: -5px;
  top: -2px;
  height: 18px;
}

.line-profile-icon {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 32px;
}

.line-profile-icon::before {
  position: absolute;
  top: 8px;
  left: 1px;
  width: 34px;
  height: 18px;
  border-top: 3px solid #98a6ba;
  border-bottom: 3px solid #98a6ba;
  content: "";
  transform: skewX(-12deg);
}

.line-profile-icon::after {
  position: absolute;
  top: 3px;
  left: 7px;
  width: 27px;
  height: 31px;
  border-left: 3px solid #98a6ba;
  border-right: 3px solid #98a6ba;
  content: "";
  transform: skewX(-12deg);
}

.structure-profile-copy h3,
.structure-profile-copy p,
.zone-profile-copy h3,
.zone-profile-copy p,
.line-profile-copy h3,
.line-profile-copy p {
  display: table;
  margin: 0;
  color: #071f46;
  font-weight: 900;
  line-height: 1.08;
}

.structure-profile-copy h3,
.zone-profile-copy h3 {
  display: table;
  margin-bottom: 4px;
  padding: 0 3px;
  background: var(--blue);
  color: #fff;
  font-size: 1.3rem;
}

.structure-profile-copy p,
.zone-profile-copy p {
  display: table;
  padding: 0 3px;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
}

.line-profile-copy h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.line-profile-copy p {
  color: #5f6c86;
  font-size: 1rem;
}

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

.protection-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  padding: 14px 18px;
  border: 1px solid #c6d2e5;
  border-radius: 8px;
  background: rgba(248, 250, 253, 0.9);
}

.protection-status-symbol {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.protection-status-card.is-acceptable .protection-status-symbol {
  background: #7ee6a1;
}

.protection-status-card.is-excessive .protection-status-symbol {
  background: #ff2a2a;
}

.protection-status-card h3 {
  margin: 0 0 4px;
  color: #071f46;
  font-size: 1.05rem;
  line-height: 1.1;
}

.protection-status-card p {
  margin: 0;
  color: #5f6c86;
  font-size: 0.92rem;
  font-weight: 800;
}

.protection-page {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(22, 32, 51, 0.08);
}

.protection-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.protection-form-panel {
  min-width: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.protection-mini-icon {
  border-color: rgba(23, 92, 211, 0.34);
  background: #eef4ff;
}

.protection-mini-icon::before {
  position: absolute;
  inset: 8px 11px 7px;
  border: 2px solid var(--blue);
  border-top-width: 6px;
  border-radius: 4px 4px 7px 7px;
  content: "";
}

.protection-mini-icon::after {
  position: absolute;
  top: 9px;
  left: 15px;
  width: 10px;
  height: 15px;
  background: var(--blue);
  clip-path: polygon(55% 0, 100% 0, 64% 42%, 100% 42%, 32% 100%, 45% 56%, 0 56%);
  content: "";
}

.protection-fields-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.protection-measure-group {
  overflow: hidden;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
}

.protection-measure-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.protection-measure-heading span {
  display: inline-grid;
  width: 42px;
  min-height: 26px;
  place-items: center;
  border: 1px solid rgba(23, 92, 211, 0.18);
  border-radius: 6px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.protection-measure-heading h4 {
  margin: 0;
  color: #071f46;
  font-size: 0.96rem;
  line-height: 1.2;
}

.protection-measure-fields {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 132px;
  gap: 12px 14px;
  padding: 12px;
}

.protection-measure-fields .coefficient-field {
  max-width: 132px;
}

.protection-measure-fields .coefficient-field input {
  text-align: right;
}

.protection-comparison-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  background: #fff;
}

.protection-comparison-heading {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.protection-comparison-heading h3 {
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.protection-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
  padding: 16px 18px 18px;
  background: #f8fafc;
}

.protection-risk-row {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(184, 194, 210, 0.82);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(22, 32, 51, 0.05);
}

.protection-page > .assessment-risk-summary-slot {
  display: none;
}

.protection-risk-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.protection-risk-title span {
  display: grid;
  min-width: 42px;
  min-height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 900;
}

.protection-risk-title strong {
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.protection-risk-title em {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.protection-risk-title em.is-acceptable {
  border-color: rgba(8, 116, 67, 0.24);
  background: #eefaf4;
  color: var(--green);
}

.protection-risk-title em.is-excessive {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff1f0;
  color: var(--red);
}

.protection-risk-limit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.protection-risk-limit strong {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.protection-risk-bars {
  display: grid;
  gap: 10px;
}

.measure-bar-card {
  display: grid;
  gap: 8px;
}

.r2-component-breakdown {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid #d0d5dd;
}

.r2-component-heading {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.r2-component-heading strong {
  color: var(--blue);
  font-size: 0.76rem;
}

.r2-component-table {
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
}

.r2-component-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.6fr) repeat(2, minmax(92px, 1fr));
  border-top: 1px solid #e4e7ec;
  font-size: 0.72rem;
}

.r2-component-row:first-child {
  border-top: 0;
}

.r2-component-row > * {
  min-width: 0;
  padding: 6px 8px;
  text-align: right;
}

.r2-component-row > :first-child {
  text-align: left;
}

.r2-component-row.is-header {
  background: #f2f6fb;
  color: var(--muted);
  font-weight: 900;
}

.r2-component-row.is-total {
  background: #eefaf4;
  color: var(--green);
}

.measure-bar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.measure-bar-heading strong {
  font-family: Arial, Helvetica, sans-serif;
}

.without-measures .measure-bar-heading {
  color: var(--red);
}

.with-measures .measure-bar-heading {
  color: var(--green);
}

.measure-track {
  position: relative;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #b8c2d2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7f9fc);
}

.measure-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 2px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.without-measures .measure-fill {
  background: #ef2a2f;
}

.with-measures .measure-fill {
  background: #11863f;
}

.acceptable-threshold-line {
  position: absolute;
  top: -7px;
  bottom: -7px;
  z-index: 2;
  width: 3px;
  border-radius: 999px;
  background: #f5c400;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
  transform: translateX(-50%);
}

.with-measures .acceptable-threshold-line {
  background: #f5c400;
}

.measure-track b {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: 34px;
  place-items: center;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 900;
}

.environment-risk-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  background: #fff;
}

.environment-risk-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.environment-risk-heading h3 {
  margin-bottom: 0;
  font-size: 1.12rem;
}

.risk-status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(8, 116, 67, 0.2);
  border-radius: 999px;
  background: #eefaf4;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.risk-summary-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 94px 34px 94px 104px 114px;
  gap: 8px 10px;
  align-items: center;
  padding: 14px 18px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
  font-size: 0.82rem;
}

.risk-summary-grid > span:nth-child(-n + 6) {
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

.risk-summary-grid > span:nth-child(6n + 1) {
  text-align: left;
}

.risk-summary-grid input {
  min-height: 28px;
  padding: 5px 8px;
  border-color: #d0d5dd;
  background: #fff;
  font-size: 0.82rem;
  text-align: right;
}

.risk-summary-grid input.risk-value-acceptable {
  border-color: #7dd9a3;
  background: #e9fbf0;
  color: #08783f;
  font-weight: 800;
}

.risk-summary-grid input.risk-value-excessive {
  border-color: #ff9b9b;
  background: #fff0f0;
  color: #c01818;
  font-weight: 800;
}

.risk-breakdown {
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
  background: #f8fafc;
}

.risk-breakdown-tabs {
  display: grid;
  grid-template-columns: 1fr 70px 70px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 700;
  overflow: hidden;
}

.risk-breakdown-tabs span {
  padding: 8px;
  border-right: 1px solid var(--line);
}

.risk-group {
  margin-bottom: 10px;
  border: 1px solid rgba(184, 194, 210, 0.78);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(22, 32, 51, 0.05);
}

.risk-group h3 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  background: #f8fbff;
  font-size: 0.95rem;
}

.risk-equation {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #344054;
  font-size: 0.82rem;
}

.risk-equation-formula {
  font-weight: 800;
  line-height: 1.5;
}

.risk-equation p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.risk-group table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.risk-group th {
  padding: 6px 8px;
  border-bottom: 1px solid #d0d5dd;
  background: #eef4ff;
  color: #344054;
  text-align: left;
  font-weight: 800;
}

.risk-group td {
  padding: 4px 8px;
  border-bottom: 1px solid #d0d5dd;
}

.risk-group:not(.risk-events-group) td:nth-last-child(-n + 4) {
  width: 82px;
  text-align: right;
}

.risk-events-group th:first-child,
.risk-events-group td:first-child {
  text-align: left;
}

.risk-events-group td:nth-last-child(-n + 2) {
  text-align: left;
}

.results-panel {
  align-self: start;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 24px 10px;
}

.metric {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.metric span,
.risk-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric strong {
  font-size: 1.45rem;
}

.risk-list {
  display: grid;
  gap: 12px;
  padding: 12px 24px 10px;
}

.risk-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber);
  border-radius: 8px;
}

.risk-card h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.risk-card strong {
  align-self: center;
  font-size: 1.2rem;
}

.risk-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.risk-card b {
  justify-self: end;
}

.risk-card.is-pass {
  border-left-color: var(--green);
}

.risk-card.is-pass b {
  color: var(--green);
}

.risk-card.is-fail {
  border-left-color: var(--red);
}

.risk-card.is-fail b {
  color: var(--red);
}

.note {
  margin: 8px 24px 24px;
  font-size: 0.9rem;
}

.project-search-panel {
  display: grid;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.project-search-panel label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.project-search-panel input {
  width: 100%;
}

.project-list {
  display: grid;
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.project-card,
.empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.project-card {
  border-left: 5px solid var(--blue);
}

.project-card span {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.project-card h3,
.empty-state h3 {
  margin-bottom: 6px;
  color: #0f172a;
}

.project-card p,
.empty-state p {
  margin-bottom: 0;
  color: #475569;
}

.project-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.empty-state {
  align-items: flex-start;
  flex-direction: column;
  border-left: 5px solid var(--green);
}

/* Professional visual polish layer */
::selection {
  background: rgba(20, 86, 200, 0.16);
  color: var(--text);
}

#appView {
  background-color: #eef4ff;
  background-image: url("../../images/Background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.app-header {
  padding-top: 30px;
}

.app-brand-home,
.eyebrow,
.section-kicker,
.tab-button,
button,
label,
.user-permission-list span,
.risk-key {
  letter-spacing: 0;
}

h1,
h2,
h3 {
  color: #071d3a;
  letter-spacing: 0;
}

.intro,
.action-panel p,
.panel-heading p,
.project-card p,
.empty-state p,
.placeholder-content p {
  color: #5c6a7f;
}

#appView .app-header-copy .app-brand-home,
#appView .app-header-copy .eyebrow,
#appView .app-header-copy h1,
#appView .app-header-copy .intro {
  color: #ffd400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.72), 0 0 12px rgba(255, 212, 0, 0.35);
}

#appView .app-header-copy .intro {
  font-weight: 700;
}

#appView .app-header-copy .app-brand-home {
  color: #dc2626;
}

.login-screen {
  background-color: #eef4ff;
  background-image: url("../../images/Background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.login-brand {
  color: #f8fbff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.login-title {
  color: #f8fbff;
}

.brand-mark {
  border-color: rgba(20, 86, 200, 0.18);
  background: linear-gradient(140deg, #1456c8 0%, #0f7d8a 52%, #057a55 100%);
  box-shadow: 0 14px 30px rgba(20, 86, 200, 0.2);
}

.login-panel,
.panel,
.action-panel,
.sub-header,
.environment-page,
.environment-card,
.structure-detail-card,
.project-card,
.empty-state,
.admin-users-hero,
.admin-user-card,
.user-account-item,
.structure-top-grid,
.line-top-grid,
.zone-top-grid,
.tool-group {
  border-color: rgba(190, 202, 218, 0.82);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.login-panel {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
}

.login-panel,
.environment-page,
.action-panel,
.project-card,
.empty-state {
  box-shadow: var(--shadow);
}

.login-panel::before,
.action-panel::before,
.environment-page::before {
  background: linear-gradient(90deg, #1456c8 0%, #0f7d8a 48%, #057a55 100%);
}

.action-panel:nth-child(2)::before {
  background: linear-gradient(90deg, #057a55 0%, #0f7d8a 48%, #b76b00 100%);
}

.action-panel,
.project-card,
.user-account-item,
.tool-group {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.action-panel:hover,
.project-card:hover,
.user-account-item:hover,
.tool-group:hover {
  border-color: rgba(20, 86, 200, 0.28);
  box-shadow: 0 18px 38px rgba(15, 31, 54, 0.12);
  transform: translateY(-1px);
}

.action-icon,
.page-title-icon,
.mini-icon,
.badge-icon,
.status-symbol {
  background: linear-gradient(180deg, #eef6ff 0%, #e4efff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(20, 86, 200, 0.12),
    0 8px 18px rgba(20, 86, 200, 0.08);
}

.projects-icon,
.saved-page-icon {
  background: linear-gradient(180deg, #ecfbf5 0%, #def7ed 100%);
}

input,
select {
  border-color: #b9c6d8;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:hover,
select:hover {
  border-color: #91a7c3;
}

input:focus,
select:focus {
  border-color: var(--blue);
  background: #fff;
  outline: 0;
  box-shadow: var(--focus);
}

button {
  border-radius: 7px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

button:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

.primary-button {
  border-color: #1456c8;
  background: linear-gradient(180deg, #1f6be0 0%, #1456c8 100%);
  box-shadow: 0 10px 20px rgba(20, 86, 200, 0.2);
}

.primary-button:hover {
  background: linear-gradient(180deg, #2b78ee 0%, #104bb0 100%);
  box-shadow: 0 12px 24px rgba(20, 86, 200, 0.24);
  transform: translateY(-1px);
}

.secondary-button {
  border-color: #b9c6d8;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  color: #13243d;
  box-shadow: 0 8px 18px rgba(15, 31, 54, 0.06);
}

.secondary-button:hover {
  border-color: rgba(20, 86, 200, 0.52);
  background: #eef6ff;
  color: var(--blue);
  transform: translateY(-1px);
}

.danger-button {
  border-color: rgba(193, 47, 36, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fff8f7 100%);
  color: var(--red);
}

.danger-button:hover {
  border-color: rgba(193, 47, 36, 0.6);
  background: #fff1ef;
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-action:disabled {
  box-shadow: none;
  transform: none;
}

.standard-badge,
.status-badge {
  border-color: rgba(190, 202, 218, 0.86);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.status-badge {
  backdrop-filter: blur(10px);
}

.assessment-tabs {
  border-bottom-color: #cdd7e5;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
}

.tab-button {
  border-color: rgba(185, 198, 216, 0.82);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  color: #46556b;
}

.tab-button:hover {
  background: #eef6ff;
}

.tab-button.is-active {
  border-color: rgba(20, 86, 200, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  color: #104bb0;
  box-shadow: inset 0 4px 0 #1456c8, 0 -1px 0 rgba(20, 86, 200, 0.14);
}

.environment-layout,
.environment-form-panel,
.structure-input-panel,
.financial-input-panel,
.input-placeholder-page {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
}

.environment-card-heading,
.structure-tabs,
.line-tabs,
.zone-tabs {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%);
}

.highlight-input {
  background: linear-gradient(180deg, #fff8a7 0%, #fff39a 100%);
}

.readonly-input {
  background: #f1f5f9;
  color: #526175;
}

.project-card {
  border-left-color: #1456c8;
}

.project-card h3,
.empty-state h3 {
  color: #071d3a;
}

.user-permission-list span {
  background: #eaf2ff;
  color: #104bb0;
}

.protection-status-card {
  background: rgba(255, 255, 255, 0.82);
}

.protection-status-card.is-acceptable .protection-status-symbol,
.acceptable-key {
  background: #45d483;
}

.protection-status-card.is-excessive .protection-status-symbol,
.excessive-key {
  background: #ff3434;
}

@media (max-width: 840px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .action-panel,
  .project-card,
  .editor-header,
  .editor-header > div {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-header {
    justify-content: flex-start;
  }

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

  .assessment-tabs {
    justify-content: flex-start;
  }

  .general-layout,
  .environment-layout {
    grid-template-columns: 1fr;
  }

  .general-form-panel,
  .environment-form-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .general-form-panel,
  .environment-grid,
  .environment-note-strip,
  .environment-value-strip,
  .structure-top-grid,
  .structure-detail-layout,
  .structure-fields-grid,
  .structure-collection-results,
  .structure-adjacent-grid,
  .line-top-grid,
  .line-detail-layout,
  .line-fields-grid,
  .zone-top-grid,
  .zone-detail-layout,
  .zone-fields-grid,
  .protection-layout,
  .protection-fields-grid,
  .protection-measure-fields,
  .protection-status-grid {
    grid-template-columns: 1fr;
  }

  .environment-field.wide-field {
    grid-column: 1 / -1;
  }

  .line-grid-column-heading {
    display: none;
  }

  .line-field-column {
    display: grid;
    align-content: start;
    gap: 14px;
    grid-column: 1;
  }

  .line-value-column > .environment-field {
    grid-column: 1;
    grid-row: auto;
  }

  .coefficient-field,
  .dimension-field {
    max-width: none;
  }

  .structure-fields-grid .dimension-field {
    grid-template-columns: 1fr;
  }

  .structure-diagram {
    grid-column: auto;
    grid-row: auto;
    min-height: 240px;
  }

  .line-value-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .zone-value-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .protection-form-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .protection-measure-fields .coefficient-field {
    max-width: none;
  }

  .protection-risk-header {
    grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(108px, 0.6fr));
    overflow-x: auto;
  }

  .general-risk-option {
    grid-template-columns: auto 44px minmax(0, 1fr);
  }

  .general-risk-option b {
    grid-column: 3;
  }

  .risk-summary-grid {
    overflow-x: auto;
    grid-template-columns: minmax(220px, 1fr) repeat(5, 100px);
  }

  .sub-header,
  .project-card-actions,
  .panel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .page-title {
    align-items: flex-start;
  }

  .project-summary-panel {
    position: static;
  }

  .layout,
  .dashboard,
  .form-grid,
  .form-section-grid,
  .compact-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .risk-card {
    grid-template-columns: 1fr;
  }

  .risk-card b {
    justify-self: start;
  }
}

#appLogoButton,
#appLogoButton > span:last-child {
  color: #ff1f1f !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.72), 0 0 12px rgba(255, 31, 31, 0.35) !important;
}

#dashboardView .action-panel {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(3px);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
}

#loginView .login-panel {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

#loginView .login-panel h2,
#loginView .login-panel p,
#loginView .login-panel label {
  color: #f8fbff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

#loginView .login-panel .intro {
  color: #e2e8f0;
  font-weight: 700;
}

.field-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Text polish only: remove text glow/shadow while keeping the existing design. */
body,
body *,
body *::before,
body *::after {
  text-shadow: none !important;
}

.lightning-word {
  filter: none !important;
}

.project-summary-panel .eyebrow {
  color: #ffffff !important;
  opacity: 1;
}

.project-summary-panel #summaryProjectName {
  color: #ffd84d !important;
}

.risk-events-group th:first-child,
.risk-events-group td:first-child {
  width: auto;
  text-align: left !important;
}

#dashboardView,
#dashboardView h1,
#dashboardView h2,
#dashboardView h3,
#dashboardView p,
#dashboardView span,
#dashboardView .intro,
#dashboardView .eyebrow,
#dashboardView .action-panel,
#dashboardView .action-panel h2,
#dashboardView .action-panel p,
#appView .app-header-copy .app-brand-home,
#appView .app-header-copy .eyebrow,
#appView .app-header-copy h1,
#appView .app-header-copy .intro {
  color: #071d3a !important;
}
.methodology-basis-grid { margin: 18px 0; }
.compact-textarea { min-height: 110px; margin-bottom: 18px; }
