:root {
  --etpa-navy: #04182c;
  --etpa-blue: #0f2e44;
  --etpa-teal: #00b5a3;
  --etpa-teal-soft: #66d6ce;
  --etpa-line: #d8dee6;
  --ink: var(--etpa-navy);
  --muted: #526575;
  --line: var(--etpa-line);
  --surface: #f5f8fa;
  --surface-strong: #e9f1f4;
  --white: #ffffff;
  --water: var(--etpa-teal);
  --water-dark: var(--etpa-blue);
  --green: var(--etpa-teal);
  --amber: var(--etpa-teal-soft);
  --sand: #edf7f6;
  --focus-ring: rgba(0, 181, 163, 0.24);
  --shadow: 0 18px 45px rgba(4, 24, 44, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--water-dark);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.75rem;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
}

.sidebar-brand-logo {
  flex: 0 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.nav a {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: 8px;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 84px;
  height: 30px;
  padding: 3px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.theme-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border: 2px solid var(--amber);
  border-radius: 999px;
}

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

.theme-icon::before {
  inset: -6px;
  border-top: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(45deg);
}

.theme-icon::after {
  inset: -6px;
  border-left: 2px solid var(--amber);
  border-right: 2px solid var(--amber);
  transform: rotate(45deg);
}

.theme-knob {
  display: block;
  width: 22px;
  height: 22px;
  background: var(--water-dark);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(24, 34, 31, 0.2);
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-icon {
  background: var(--amber);
  box-shadow: inset 7px 0 0 var(--surface-strong);
}

.theme-toggle[aria-pressed="true"] .theme-icon::before,
.theme-toggle[aria-pressed="true"] .theme-icon::after {
  display: none;
}

.theme-toggle[aria-pressed="true"] .theme-knob {
  transform: translateX(4px);
  background: var(--etpa-teal-soft);
}

.nav-button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--surface);
  transition: grid-template-columns 180ms ease;
}

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

.app-main {
  position: relative;
  z-index: 0;
  min-width: 0;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  overflow: visible;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.sidebar-header {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sidebar-dots form {
  margin: 0;
}

.sidebar-action,
.sidebar-collapse {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.sidebar-action:hover,
.sidebar-action:focus-visible,
.sidebar-collapse:hover,
.sidebar-collapse:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: rgba(0, 181, 163, 0.28);
  outline: none;
}

.compact-theme {
  width: 68px;
  height: 38px;
}

.compact-theme .theme-icon {
  transform: scale(0.74);
  transform-origin: center;
  margin-left: 1px;
}

.compact-theme .theme-knob {
  width: 20px;
  height: 20px;
}

.sidebar-brand {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.sidebar-brand-note {
  grid-column: 1 / -1;
  margin: -2px 0 0 54px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.25;
}

.sidebar-brand-text {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.sidebar-brand-text strong {
  color: var(--ink);
  line-height: 1.15;
}

.sidebar-brand-text small {
  color: var(--water-dark);
  font-size: 0.74rem;
  font-weight: 780;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#account-menu-button {
  min-width: 0;
}

.sidebar-user:hover,
.sidebar-user:focus-visible {
  background: var(--surface-strong);
  border-color: rgba(0, 181, 163, 0.26);
  outline: none;
}

.sidebar-avatar {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--white);
  background: var(--water-dark);
  border-radius: 999px;
  font-weight: 900;
}

.sidebar-user small,
.sidebar-section {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sidebar-user-meta {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-user-meta small,
.sidebar-user-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding: 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-section {
  margin: 14px 0 5px;
  padding-left: 10px;
  letter-spacing: 0.06em;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link[aria-current="page"] {
  color: var(--ink);
  background: rgba(0, 181, 163, 0.08);
  border-color: rgba(0, 181, 163, 0.18);
  outline: none;
}

.sidebar-link[aria-current="page"] {
  color: var(--etpa-navy);
  background:
    linear-gradient(90deg, rgba(0, 181, 163, 0.16), rgba(102, 214, 206, 0.08)),
    var(--surface-strong);
  border-color: rgba(0, 181, 163, 0.32);
  box-shadow: inset 3px 0 0 var(--water);
}

.sidebar-link[aria-current="page"] .sidebar-icon {
  color: var(--water-dark);
  border-color: var(--water);
}

.sidebar-link.disabled {
  opacity: 0.56;
  cursor: default;
}

.sidebar-link.disabled:hover {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.sidebar-link.compact {
  min-height: 38px;
}

.logout-link {
  cursor: pointer;
}

.sidebar-account {
  flex: 0 0 auto;
  padding: 14px 18px 18px;
  background: linear-gradient(
    0deg,
    var(--white) 0%,
    rgba(251, 248, 241, 0.76) 78%,
    rgba(251, 248, 241, 0) 100%
  );
  border-top: 1px solid var(--line);
}

.account-menu {
  position: relative;
}

.account-more {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: auto;
}

.account-more::before,
.account-more::after {
  position: absolute;
  left: 7px;
  width: 4px;
  height: 4px;
  content: "";
  background: var(--muted);
  border-radius: 999px;
}

.account-more::before {
  top: 3px;
  box-shadow: 0 5px 0 var(--muted);
}

.account-more::after {
  bottom: 1px;
}

.account-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 80;
  display: grid;
  gap: 3px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(24, 34, 31, 0.18);
  backdrop-filter: blur(16px);
}

.account-dropdown[hidden] {
  display: none;
}

.account-menu form {
  margin: 0;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 780;
  text-align: left;
  cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  color: var(--water-dark);
  background: rgba(0, 181, 163, 0.1);
  outline: none;
}

.account-menu-item.danger {
  color: #a33a28;
}

.account-menu-item.danger:hover,
.account-menu-item.danger:focus-visible {
  color: #7a2e1f;
  background: #f8e6df;
}

.account-menu-separator {
  height: 1px;
  margin: 4px 2px;
  background: var(--line);
}

.menu-theme-toggle {
  justify-content: flex-start;
  width: 100%;
  height: auto;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.menu-theme-toggle .theme-icon {
  width: 18px;
  height: 18px;
  margin-left: 0;
  transform: scale(0.74);
}

.menu-theme-toggle .theme-knob {
  display: none;
}

.sidebar-collapsed .app-sidebar {
  align-items: center;
  padding: 0;
}

.sidebar-collapsed .sidebar-header,
.sidebar-collapsed .sidebar-nav,
.sidebar-collapsed .sidebar-account {
  width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

.sidebar-collapsed .sidebar-dots {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  width: 100%;
}

.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .sidebar-user,
.sidebar-collapsed .sidebar-nav {
  width: 100%;
}

.sidebar-collapsed .sidebar-nav {
  overflow-x: visible;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-collapsed .sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-collapsed .sidebar-brand,
.sidebar-collapsed .sidebar-user,
.sidebar-collapsed .sidebar-link {
  justify-content: center;
}

.sidebar-collapsed .sidebar-brand-text,
.sidebar-collapsed .sidebar-brand-note,
.sidebar-collapsed .sidebar-user-meta,
.sidebar-collapsed .sidebar-section,
.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .account-more {
  display: none;
}

.sidebar-collapsed .sidebar-user {
  padding: 10px;
}

.sidebar-collapsed .sidebar-avatar {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
}

.sidebar-collapsed .account-dropdown {
  left: calc(100% + 12px);
  right: auto;
  bottom: 0;
  width: 248px;
}

.sidebar-collapsed .sidebar-link {
  position: relative;
  z-index: 1;
  min-height: 42px;
  padding: 10px;
}

.sidebar-collapsed .sidebar-link:hover,
.sidebar-collapsed .sidebar-link:focus-visible {
  z-index: 90;
}

.sidebar-tooltip {
  position: fixed;
  z-index: 150;
  max-width: 220px;
  padding: 7px 10px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid rgba(0, 181, 163, 0.35);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 34, 31, 0.2);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 120ms ease;
  pointer-events: none;
}

.sidebar-tooltip[data-open="true"] {
  opacity: 1;
}

.collapse-icon {
  border: 0;
}

.collapse-icon::before {
  position: absolute;
  inset: 4px 3px 4px 7px;
  content: "";
  border-bottom: 2px solid var(--muted);
  border-left: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

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

.dashboard-icon {
  background:
    linear-gradient(var(--muted), var(--muted)) 0 0 / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 11px 0 / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 0 11px / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 11px 11px / 7px 7px no-repeat;
}

.calculator-icon,
.clients-icon,
.projects-icon,
.users-icon,
.suppliers-icon,
.costs-icon,
.monitoring-icon,
.site-icon,
.logout-icon {
  border: 2px solid var(--muted);
  border-radius: 5px;
}

.calculator-icon::before {
  position: absolute;
  inset: 5px 3px auto;
  height: 2px;
  content: "";
  background: var(--muted);
}

.projects-icon::before,
.clients-icon::before,
.users-icon::before,
.suppliers-icon::before,
.costs-icon::before,
.monitoring-icon::before,
.site-icon::before,
.logout-icon::before {
  position: absolute;
  content: "";
  background: var(--muted);
}

.projects-icon::before {
  left: 3px;
  right: 3px;
  top: 4px;
  height: 2px;
  box-shadow:
    0 5px 0 var(--muted),
    0 10px 0 var(--muted);
}

.clients-icon::before {
  left: 5px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow: 0 8px 0 2px var(--muted);
}

.users-icon::before {
  left: 2px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  box-shadow:
    8px 0 0 var(--muted),
    0 8px 0 1px var(--muted),
    8px 8px 0 1px var(--muted);
}

.suppliers-icon::before {
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 8px;
  border-radius: 2px 2px 0 0;
}

.costs-icon::before {
  left: 6px;
  top: 2px;
  width: 2px;
  height: 12px;
}

.monitoring-icon::before {
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 2px;
  box-shadow:
    3px -4px 0 var(--muted),
    7px -8px 0 var(--muted);
}

.site-icon {
  border-radius: 999px;
}

.site-icon::before {
  left: 2px;
  right: 2px;
  top: 7px;
  height: 2px;
}

.logout-icon::before {
  right: -4px;
  top: 6px;
  width: 8px;
  height: 2px;
}

.sidebar-collapsed .collapse-icon::before {
  inset: 4px 7px 4px 3px;
  transform: rotate(225deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
  min-height: calc(100vh - 72px);
  padding: clamp(44px, 7vw, 90px) clamp(20px, 5vw, 72px) clamp(34px, 5vw, 76px);
  background:
    linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(233, 241, 244, 0.96) 54%,
      rgba(216, 222, 230, 0.92) 100%
    ),
    linear-gradient(90deg, rgba(0, 181, 163, 0.12), rgba(15, 46, 68, 0.08));
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--water-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.55rem, 5vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
}

.subtitle {
  max-width: 670px;
  margin: 24px 0 0;
  color: var(--water-dark);
  font-size: clamp(1.08rem, 1.8vw, 1.38rem);
  font-weight: 780;
}

.summary {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--water-dark);
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(135deg, var(--water-dark), var(--water));
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(15, 46, 68, 0.18);
}

.button.secondary {
  color: var(--water-dark);
  background: rgba(255, 255, 255, 0.62);
}

.button.danger {
  color: #a33a28;
  border-color: #cc8f82;
  background: #fff8f6;
}

.button.danger:hover,
.button.danger:focus-visible {
  color: #7a2e1f;
  background: #f9ece8;
  border-color: #a33a28;
}

.button.danger-subtle {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 760;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 181, 163, 0.18);
}

.hero-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 420px;
  padding: clamp(18px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(0, 181, 163, 0.2);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.water-panel {
  position: relative;
  display: grid;
  place-items: end start;
  min-height: 280px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.water-panel::before {
  position: absolute;
  inset: auto 0 0;
  height: 68%;
  content: "";
}

.water-panel::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 72px;
  content: "";
  border: 8px solid rgba(255, 255, 255, 0.72);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.water-panel span {
  position: relative;
  z-index: 1;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
}

.water-panel.before {
  background: #f7f0df;
  color: #6c3b1f;
}

.water-panel.before::before {
  background:
    linear-gradient(180deg, rgba(224, 168, 91, 0.32), rgba(166, 88, 45, 0.66)),
    var(--sand);
}

.water-panel.after {
  background: #eaf8f7;
  color: var(--water-dark);
}

.water-panel.after::before {
  background:
    linear-gradient(
      180deg,
      rgba(173, 230, 235, 0.38),
      rgba(0, 181, 163, 0.62)
    ),
    #c9eef1;
}

.module-line {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.module-line span {
  display: block;
  width: 58px;
  height: 58px;
  background: var(--white);
  border: 8px solid var(--water);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 46, 68, 0.16);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.metrics div {
  min-width: 0;
  padding: 24px clamp(20px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
}

.section {
  padding: clamp(54px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 32px;
}

.section-heading p:not(.eyebrow),
.contact-copy p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.problem-section,
.applications-section {
  background: var(--surface);
}

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

.pain-card {
  min-height: 168px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pain-card span {
  display: block;
  width: 42px;
  height: 6px;
  margin-bottom: 34px;
  background: var(--amber);
  border-radius: 999px;
}

.pain-card p,
.feature-card p {
  margin: 0;
  color: var(--muted);
}

.feature-band {
  background: var(--water-dark);
  color: var(--white);
}

.feature-band .eyebrow,
.feature-band .section-heading p {
  color: #bfe4ec;
}

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

.feature-card {
  min-height: 196px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.feature-card p {
  margin-top: 12px;
  color: #dcebed;
}

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

.applications-grid span {
  display: grid;
  min-height: 82px;
  place-items: center;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom: 5px solid var(--green);
  border-radius: 8px;
  font-weight: 850;
  text-align: center;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 70px);
  background: var(--white);
}

.contact-copy {
  max-width: 640px;
}

.journey-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.journey-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.journey-list span {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--water-dark);
  color: var(--white);
  border-radius: 8px;
  font-weight: 900;
}

.lead-form {
  display: grid;
  gap: 10px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lead-form label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.lead-form textarea {
  min-height: 120px;
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--water);
  outline: 3px solid rgba(0, 181, 163, 0.18);
}

.lead-form button {
  margin-top: 8px;
  cursor: pointer;
}

.form-success {
  margin: 0 0 8px;
  padding: 12px 14px;
  color: #234d22;
  background: #e2f2df;
  border: 1px solid #bddfb8;
  border-radius: 8px;
  font-weight: 800;
}

.flash-stack {
  display: grid;
  gap: 10px;
  padding: 0 clamp(20px, 5vw, 72px);
  margin-top: 12px;
}

.flash-message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(4, 24, 44, 0.08);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.flash-message p {
  margin: 0;
  font-weight: 760;
}

.flash-message.success {
  color: #06443d;
  background: #e7f8f6;
  border-color: rgba(0, 181, 163, 0.28);
}

.flash-message.error {
  color: #7a2e1f;
  background: #f8e6df;
  border-color: #edc7ba;
}

.flash-message.info {
  color: var(--water-dark);
  background: rgba(102, 214, 206, 0.18);
  border-color: rgba(0, 181, 163, 0.28);
}

.flash-close {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.flash-close:hover,
.flash-close:focus-visible {
  background: rgba(4, 24, 44, 0.08);
  border-color: rgba(4, 24, 44, 0.12);
  outline: none;
}

.flash-message.is-dismissing {
  opacity: 0;
  transform: translateY(-6px);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
}

.auth-page,
.app-page {
  min-height: calc(100vh - 72px);
  background:
    linear-gradient(
      180deg,
      rgba(237, 243, 239, 0.9),
      rgba(247, 248, 244, 1) 46%
    ),
    var(--surface);
}

.auth-page {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 72px);
}

.auth-page .flash-stack {
  width: min(100%, 1120px);
  padding: 0;
  margin: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, 460px);
  align-items: stretch;
  gap: clamp(18px, 3vw, 28px);
  width: min(100%, 1120px);
}

.auth-brand-panel {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: clamp(22px, 4vw, 42px);
  min-height: 520px;
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 18%, rgba(102, 214, 206, 0.28), transparent 30%),
    linear-gradient(135deg, var(--etpa-navy), var(--etpa-blue));
  border: 1px solid rgba(102, 214, 206, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-brand-logo {
  width: clamp(58px, 7vw, 78px);
  height: clamp(58px, 7vw, 78px);
  flex: 0 0 auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
}

.auth-brand-panel .eyebrow {
  color: var(--etpa-teal-soft);
}

.auth-brand-panel h1 {
  max-width: 620px;
  font-size: clamp(2.1rem, 4vw, 4.5rem);
}

.auth-brand-statement {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.18rem, 2vw, 1.7rem);
  font-weight: 850;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.auth-trust-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-trust-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: #dffdf9;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(102, 214, 206, 0.24);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 850;
}

.auth-panel {
  width: 100%;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel h2 {
  font-size: clamp(1.85rem, 3vw, 2.7rem);
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.auth-form label {
  font-size: 0.92rem;
  font-weight: 850;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.auth-form input:focus {
  border-color: var(--water);
  outline: 3px solid rgba(0, 181, 163, 0.18);
}

.auth-form button {
  cursor: pointer;
}

.password-input-wrap {
  position: relative;
  width: 100%;
}

.password-input-wrap input {
  padding-right: 46px !important;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: rgba(0, 181, 163, 0.2);
  outline: none;
}

.password-toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 14px / 10px;
}

.password-toggle-icon::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.password-toggle[aria-pressed="true"] .password-toggle-icon::before {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  height: 2px;
  content: "";
  background: currentColor;
  transform: rotate(-23deg);
}

.auth-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-hero {
  padding: clamp(42px, 6vw, 76px) clamp(20px, 5vw, 72px) clamp(24px, 4vw, 44px);
  background:
    linear-gradient(120deg, rgba(15, 46, 68, 0.96), rgba(0, 181, 163, 0.9)),
    var(--water-dark);
  color: var(--white);
}

.app-hero h1 {
  font-size: clamp(2.2rem, 4vw, 4.4rem);
}

.app-hero .eyebrow,
.app-hero .summary {
  color: #d7eef2;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(24px, 4vw, 46px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 84px);
}

.app-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(4, 24, 44, 0.08);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.app-card.active {
  border-color: rgba(0, 181, 163, 0.42);
}

.app-card:hover,
.app-card:focus-visible {
  border-color: rgba(0, 181, 163, 0.55);
  box-shadow: 0 16px 42px rgba(0, 181, 163, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.app-card span {
  width: fit-content;
  padding: 6px 8px;
  color: var(--water-dark);
  background: var(--surface-strong);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.app-card h2 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

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

.dashboard-layout {
  gap: 16px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.dashboard-hero > div:first-child {
  max-width: 720px;
}

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

.dashboard-quick-actions .button {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.32);
}

.dashboard-quick-actions .button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.dashboard-quick-actions .button.secondary:hover,
.dashboard-quick-actions .button.secondary:focus-visible {
  color: var(--etpa-navy);
  background: var(--white);
}

.dashboard-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-kpi-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(216, 222, 230, 0.2)),
    var(--white);
  border: 1px solid rgba(0, 181, 163, 0.14);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(4, 24, 44, 0.08);
}

.dashboard-kpi-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--water), var(--etpa-teal-soft));
}

.dashboard-kpi-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-kpi-value {
  color: var(--water-dark);
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  font-weight: 900;
  line-height: 1.12;
}

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

.dashboard-status-section {
  display: grid;
  gap: 12px;
}

.dashboard-status-panels {
  align-items: stretch;
}

.dashboard-status-panel {
  display: grid;
  gap: 10px;
  min-height: 100%;
}

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

.dashboard-status-grid,
.dashboard-activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.dashboard-status-item {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: center;
  min-height: 84px;
  padding: 10px 12px;
  text-align: center;
  border: 1px solid rgba(0, 181, 163, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(216, 222, 230, 0.22)),
    rgba(255, 255, 255, 0.72);
}

.dashboard-status-item:hover {
  border-color: rgba(0, 181, 163, 0.3);
}

.dashboard-status-label,
.dashboard-status-value {
  color: var(--ink);
}

.dashboard-status-label {
  font-size: 0.8rem;
  font-weight: 760;
}

.dashboard-status-value {
  color: var(--water-dark);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-table .actions-cell {
  font-weight: 850;
}

.dashboard-layout .empty-results.compact {
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(0, 181, 163, 0.08), rgba(102, 214, 206, 0.08)),
    var(--white);
  border-color: rgba(0, 181, 163, 0.18);
}

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

.dashboard-activity-list li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-activity-list li strong {
  color: var(--ink);
  font-size: 0.93rem;
}

.dashboard-activity-list li span {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-activity-list li small {
  color: var(--muted);
  font-size: 0.78rem;
}

.resource-page {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(
      circle at top right,
      rgba(0, 181, 163, 0.12),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(237, 243, 239, 0.86),
      rgba(247, 248, 244, 1) 42%
    ),
    var(--surface);
}

.resource-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.68fr) minmax(0, 1.32fr);
  align-items: start;
  gap: 22px;
  padding: clamp(24px, 4vw, 46px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 84px);
}

.resource-form {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(24, 34, 31, 0.09);
}

.required-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.required-marker {
  color: #b54731;
  font-weight: 900;
}

.field-help {
  position: static !important;
  display: block;
  margin-top: -3px;
  color: var(--muted) !important;
  font-size: 0.78rem;
  font-weight: 650 !important;
  line-height: 1.35;
}

.password-strength {
  position: static !important;
  display: block;
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.35;
}

.compact-fields textarea {
  min-height: 110px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

.compact-fields textarea:focus {
  border-color: var(--water);
  outline: 3px solid rgba(0, 181, 163, 0.18);
}

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

.resource-list {
  min-width: 0;
}

.resource-listing,
.resource-form-page {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 46px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 84px);
}

.entity-listing,
.entity-detail {
  --entity-panel-padding: clamp(18px, 2vw, 22px);
  --entity-panel-gap: clamp(14px, 1.8vw, 18px);
}

.resource-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.entity-toolbar {
  padding-inline: 2px;
}

.resource-search {
  display: flex;
  flex: 1 1 380px;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.resource-search label {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.resource-search input {
  min-width: min(320px, 100%);
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.resource-search select {
  min-width: 180px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.resource-search input:focus {
  border-color: var(--water);
  outline: 3px solid rgba(0, 181, 163, 0.18);
}

.resource-search select:focus {
  border-color: var(--water);
  outline: 3px solid rgba(0, 181, 163, 0.18);
}

.entity-card {
  padding: var(--entity-panel-padding);
}

.list-card {
  padding: var(--entity-panel-padding);
}

.list-card > .section-title {
  margin: 0;
  padding: 0;
}

.table-shell {
  padding: 0;
  margin-top: 10px;
}

.table-shell .table-scroll {
  margin-top: 0;
}

.actions-heading {
  text-align: right;
}

.actions-cell {
  text-align: right;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.table-actions form {
  margin: 0;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  color: var(--water-dark);
  border: 1px solid rgba(0, 181, 163, 0.24);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.table-action:hover,
.table-action:focus-visible {
  color: var(--white);
  background: var(--water-dark);
  border-color: var(--water-dark);
  outline: none;
}

.table-action-danger {
  color: #a33a28;
  border-color: #cc8f82;
}

.table-action-danger:hover,
.table-action-danger:focus-visible {
  color: #7a2e1f;
  background: #f8e6df;
  border-color: #a33a28;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.detail-panel {
  display: grid;
  gap: var(--entity-panel-gap);
  padding: var(--entity-panel-padding);
}

.detail-panel > .section-title {
  margin: 0;
  padding: 0;
}

.detail-panel .summary {
  margin-top: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.detail-grid div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-grid strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.detail-notes {
  margin-top: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-notes h3 {
  margin-bottom: 8px;
}

.detail-notes p {
  margin: 0;
  color: var(--muted);
}

.summary-inline {
  font-size: clamp(1.2rem, 1.8vw, 1.7rem) !important;
}

.empty-results.compact {
  min-height: auto;
  padding: 16px;
}

.detail-summary-grid {
  margin-top: 0;
}

.project-dossier-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.project-dossier-summary div {
  min-height: 108px;
  padding: 16px;
}

.project-dossier-summary .summary-inline {
  font-family: inherit;
  font-size: clamp(1.02rem, 1.45vw, 1.28rem) !important;
  line-height: 1.24;
}

.detail-subsection {
  box-shadow: none;
}

.detail-subsection > .tool-heading {
  background: linear-gradient(90deg, rgba(0, 181, 163, 0.06), transparent);
}

.resource-page .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.resource-page .section-title > div {
  padding: 20px;
}

.resource-page .section-title h2 {
  font-size: clamp(1.2rem, 1.7vw, 1.65rem);
  line-height: 1.16;
}

.section-title span {
  align-self: start;
  padding: 6px 8px;
  color: var(--water-dark);
  background: var(--surface-strong);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section-title-with-action {
  border-bottom: 1px solid var(--line);
}

.section-title-with-action > div {
  min-width: 0;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
}

.section-actions .button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.metadata-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metadata-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.metadata-value {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
}

.metadata-code {
  font-family: "Segoe UI", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--water-dark);
  background: var(--surface-strong);
  border: 1px solid rgba(0, 181, 163, 0.24);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 820;
}

.filter-metadata-grid {
  margin-top: 2px;
}

.resource-table td strong,
.resource-table td small {
  display: block;
}

.resource-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.entity-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.entity-table th,
.entity-table td {
  padding: 14px 16px;
  letter-spacing: 0;
  line-height: 1.42;
}

.entity-table th {
  letter-spacing: 0.04em;
}

.entity-table tbody tr:hover {
  background: rgba(0, 181, 163, 0.05);
}

.entity-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.entity-table th.actions-heading,
.entity-table td.actions-cell {
  width: 1%;
  white-space: nowrap;
}

.entity-table td.actions-cell {
  vertical-align: middle;
}

.primary-cell,
.muted-cell {
  letter-spacing: 0;
}

.primary-cell {
  color: var(--ink);
  font-weight: 700;
}

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

.entity-table td small {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-detail .resource-actions {
  padding-inline: 2px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 4px;
  border-color: #e0bcb2;
  box-shadow: none;
  background:
    linear-gradient(
      180deg,
      rgba(248, 230, 223, 0.2),
      rgba(255, 255, 255, 0.94)
    ),
    var(--white);
}

.danger-zone-content {
  min-width: 0;
}

.danger-zone-title {
  margin: 0;
  color: #854232;
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1.25;
}

.danger-zone-description {
  margin: 0;
  color: #8f5b4e;
  font-size: 0.84rem;
  font-weight: 620;
  line-height: 1.35;
}

.danger-action {
  flex: 0 0 auto;
}

.danger-action form {
  margin: 0;
}

@media (max-width: 760px) {
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .danger-action {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .entity-table {
    min-width: 760px;
  }

  .entity-table td small {
    max-width: 220px;
  }
}

.calculator-page {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(
      circle at top right,
      rgba(0, 181, 163, 0.12),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(237, 243, 239, 0.86),
      rgba(247, 248, 244, 1) 42%
    ),
    var(--surface);
}

.calculator-hero {
  padding: clamp(42px, 6vw, 76px) clamp(20px, 5vw, 72px) clamp(24px, 4vw, 44px);
  background:
    linear-gradient(120deg, rgba(15, 46, 68, 0.96), rgba(0, 181, 163, 0.9)),
    var(--water-dark);
  color: var(--white);
}

.calculator-hero h1 {
  max-width: 980px;
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.calculator-hero .eyebrow,
.calculator-hero .summary {
  color: #d7eef2;
}

.calculator-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: 22px;
  padding: clamp(24px, 4vw, 46px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 84px);
}

.calculator-form,
.result-section,
.result-summary-grid div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(24, 34, 31, 0.09);
}

.calculator-form {
  position: static;
  display: grid;
  gap: 20px;
  padding: 24px;
}

.tool-heading h2 {
  font-size: clamp(1.25rem, 1.7vw, 1.7rem);
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid label {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-grid label span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.field-grid input,
.field-grid select {
  width: 100%;
  min-height: 50px;
  padding: 12px 32px 12px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
}

.field-grid textarea {
  width: 100%;
  min-height: 116px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  resize: vertical;
}

.field-grid input:focus,
.field-grid select:focus,
.field-grid textarea:focus {
  border-color: var(--water);
  outline: 3px solid rgba(0, 181, 163, 0.18);
}

.field-grid small {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--muted);
  font-weight: 850;
}

.field-readonly {
  display: grid;
  gap: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field-readonly-label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.field-readonly-value {
  font-size: 0.98rem;
  font-weight: 800;
}

.calculator-errors {
  display: grid;
  gap: 8px;
}

.calculator-errors p {
  margin: 0;
  padding: 10px 12px;
  color: #7a2e1f;
  background: #f8e6df;
  border: 1px solid #edc7ba;
  border-radius: 8px;
  font-weight: 780;
}

.calculator-errors:empty {
  display: none;
}

.calculator-status {
  margin: -6px 0 0;
  padding: 9px 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 780;
}

.calculator-form[data-state="loading"] .calculator-status {
  color: var(--water-dark);
  border-color: rgba(0, 181, 163, 0.28);
}

.calculator-form[data-state="invalid"] .calculator-status {
  color: #7a2e1f;
  background: #f8e6df;
  border-color: #edc7ba;
}

.calculator-results {
  display: grid;
  gap: 14px;
  min-width: 0;
  transition: opacity 160ms ease;
}

.calculator-results.is-stale {
  opacity: 0.58;
}

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

.result-summary-grid div {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 134px;
  padding: 20px;
  overflow: hidden;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.result-summary-grid div::before {
  width: 46px;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--water), var(--water-dark));
  border-radius: 999px;
}

.result-summary-grid div:hover {
  border-color: rgba(0, 181, 163, 0.38);
  box-shadow: 0 18px 46px rgba(0, 181, 163, 0.14);
  transform: translateY(-1px);
}

.result-summary-grid span,
.result-summary-grid small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.result-summary-grid strong {
  color: var(--water-dark);
  font-family: "Segoe UI", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(1.75rem, 2.7vw, 2.6rem);
  line-height: 1;
}

.result-section {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.collapsible-subsection {
  border-top: 1px solid var(--line);
}

.collapsible-subsection + .collapsible-subsection {
  margin-top: 10px;
}

.collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 780;
  list-style: none;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary::after {
  width: 8px;
  height: 8px;
  margin-left: auto;
  content: "";
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.collapsible-subsection[open] .collapsible-summary::after {
  transform: rotate(225deg);
}

.collapsible-summary:hover,
.collapsible-summary:focus-visible {
  background: rgba(0, 181, 163, 0.08);
  outline: none;
}

.collapsible-content {
  padding: 0 20px 16px;
}

.collapsible-content .table-scroll,
.collapsible-content .interpretation-list {
  margin-top: 0;
}

.result-section > .tool-heading {
  padding: 20px 22px;
  background: linear-gradient(90deg, rgba(0, 181, 163, 0.08), transparent);
  border-bottom: 1px solid var(--line);
}

.result-section > .interpretation-list,
.result-section > .table-scroll {
  padding: 0 20px 20px;
}

.table-scroll {
  width: 100%;
  margin-top: 0;
  overflow-x: auto;
  overflow-y: visible;
}

.result-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.result-table th,
.result-table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.result-table th {
  color: var(--water-dark);
  background: var(--surface-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-table td:first-child {
  color: var(--ink);
  font-weight: 850;
}

.result-table td:nth-child(2),
.result-table td:nth-child(3) {
  white-space: nowrap;
}

.result-table td:last-child {
  color: var(--muted);
}

.info-heading,
.info-cell {
  width: 74px;
  text-align: center;
}

.info-heading span,
.info-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.info-heading span {
  color: var(--water-dark);
  background: rgba(0, 181, 163, 0.1);
}

.info-tooltip {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.info-button {
  color: var(--water-dark);
  background: var(--surface-strong);
  border: 1px solid rgba(0, 181, 163, 0.2);
  cursor: help;
}

.info-button:hover,
.info-button:focus-visible {
  color: var(--white);
  background: var(--water-dark);
  border-color: var(--water-dark);
  outline: none;
}

.info-bubble {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: min(320px, 70vw);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(24, 34, 31, 0.16);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  pointer-events: none;
}

.info-bubble::after {
  position: absolute;
  right: 10px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  content: "";
  background: inherit;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.info-tooltip:hover .info-bubble,
.info-tooltip:focus-within .info-bubble {
  opacity: 1;
  transform: translateY(0);
}

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

.interpretation-list li {
  padding: 12px 14px;
  background: var(--surface);
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  color: var(--muted);
}

.empty-results {
  min-height: 220px;
}

.theme-dark {
  --ink: #eaf4f6;
  --muted: #a9b8c4;
  --line: #24384a;
  --surface: #06111e;
  --surface-strong: #24384a;
  --white: #0a1d2c;
  --water: #00b5a3;
  --water-dark: #66d6ce;
  --green: #00b5a3;
  --amber: #66d6ce;
  --sand: #0f2e44;
  --focus-ring: rgba(102, 214, 206, 0.28);
  background: #06111e;
  color: var(--ink);
}

.theme-dark .site-header {
  background: rgba(4, 24, 44, 0.94);
  border-bottom-color: #24384a;
}

.theme-dark .brand-mark {
  background: #00b5a3;
  color: #06111e;
}

.theme-dark .nav a {
  color: #a9b8c4;
}

.theme-dark .nav a:hover,
.theme-dark .nav a:focus-visible,
.theme-dark .nav a[aria-current="page"] {
  background: #24384a;
  color: #eaf4f6;
}

.theme-dark .nav-button {
  color: #a9b8c4;
}

.theme-dark .nav-button:hover,
.theme-dark .nav-button:focus-visible {
  background: #24384a;
  color: #eaf4f6;
}

.theme-dark .theme-toggle {
  background: #0a1d2c;
  border-color: #24384a;
}

.theme-dark .app-sidebar {
  background: #0f1623;
  border-right-color: #24384a;
}

.theme-dark .sidebar-header {
  border-bottom-color: #24384a;
}

.theme-dark .sidebar-user {
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .sidebar-user:hover,
.theme-dark .sidebar-user:focus-visible {
  background: #24384a;
  border-color: rgba(0, 181, 163, 0.34);
}

.theme-dark .sidebar-account {
  background: linear-gradient(
    0deg,
    #0f1623 0%,
    rgba(15, 22, 35, 0.92) 78%,
    rgba(15, 22, 35, 0) 100%
  );
  border-top-color: #24384a;
}

.theme-dark .account-dropdown {
  background: rgba(17, 24, 39, 0.96);
  border-color: rgba(30, 41, 59, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.theme-dark .account-menu-item {
  color: #eaf4f6;
}

.theme-dark .account-menu-item:hover,
.theme-dark .account-menu-item:focus-visible {
  color: #66d6ce;
  background: rgba(0, 181, 163, 0.1);
}

.theme-dark .account-menu-item.danger {
  color: #fca5a5;
}

.theme-dark .account-menu-item.danger:hover,
.theme-dark .account-menu-item.danger:focus-visible {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.36);
}

.theme-dark .account-menu-separator {
  background: #24384a;
}

.theme-dark .sidebar-link {
  color: #a9b8c4;
}

.theme-dark .sidebar-brand-note,
.theme-dark .sidebar-brand-text small {
  color: #66d6ce;
}

.theme-dark .sidebar-link:hover,
.theme-dark .sidebar-link:focus-visible,
.theme-dark .sidebar-link[aria-current="page"] {
  color: #eaf4f6;
  background: rgba(0, 181, 163, 0.12);
  border-color: rgba(0, 181, 163, 0.24);
}

.theme-dark .sidebar-link[aria-current="page"] {
  background:
    linear-gradient(90deg, rgba(0, 181, 163, 0.18), rgba(102, 214, 206, 0.08)),
    rgba(30, 41, 59, 0.72);
  box-shadow: inset 3px 0 0 #66d6ce;
}

.theme-dark .sidebar-link.disabled:hover {
  color: #a9b8c4;
  background: transparent;
  border-color: transparent;
}

.theme-dark .sidebar-tooltip {
  color: #eaf4f6;
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.theme-dark .sidebar-footer {
  border-top-color: #24384a;
}

.theme-dark .hero {
  background:
    radial-gradient(
      circle at top right,
      rgba(0, 181, 163, 0.14),
      transparent 34%
    ),
    linear-gradient(
      130deg,
      rgba(13, 21, 32, 0.98),
      rgba(10, 17, 25, 1) 58%,
      rgba(15, 22, 35, 0.98) 100%
    ),
    #06111e;
}

.theme-dark .hero-visual,
.theme-dark .metrics,
.theme-dark .pain-card,
.theme-dark .applications-grid span,
.theme-dark .contact-section,
.theme-dark .lead-form {
  background: rgba(17, 24, 39, 0.76);
  border-color: rgba(30, 41, 59, 0.92);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.theme-dark .problem-section,
.theme-dark .applications-section {
  background: #06111e;
}

.theme-dark .feature-band {
  background:
    linear-gradient(125deg, rgba(14, 116, 144, 0.5), rgba(10, 17, 25, 0.98)),
    #06111e;
}

.theme-dark .journey-list li {
  background: rgba(17, 24, 39, 0.76);
  border-color: #24384a;
}

.theme-dark .lead-form input,
.theme-dark .lead-form select,
.theme-dark .lead-form textarea {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .lead-form input:focus,
.theme-dark .lead-form select:focus,
.theme-dark .lead-form textarea:focus {
  border-color: #00b5a3;
  outline-color: rgba(0, 181, 163, 0.22);
}

.theme-dark .form-success {
  color: #d8f3d2;
  background: #17341d;
  border-color: #376b3e;
}

.theme-dark .flash-message {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.theme-dark .flash-message.success {
  color: #d8f3d2;
  background: rgba(23, 52, 29, 0.9);
  border-color: #376b3e;
}

.theme-dark .flash-message.error {
  color: #ffd4c7;
  background: rgba(59, 32, 27, 0.92);
  border-color: #714237;
}

.theme-dark .flash-message.info {
  color: #66d6ce;
  background: rgba(0, 181, 163, 0.12);
  border-color: rgba(0, 181, 163, 0.32);
}

.theme-dark .flash-close:hover,
.theme-dark .flash-close:focus-visible {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.22);
}

.theme-dark .calculator-page,
.theme-dark .resource-page {
  background:
    radial-gradient(
      circle at top right,
      rgba(0, 181, 163, 0.14),
      transparent 34%
    ),
    linear-gradient(180deg, rgba(13, 21, 32, 0.96), rgba(10, 17, 25, 1) 48%),
    #06111e;
}

.theme-dark .auth-page,
.theme-dark .app-page {
  background:
    radial-gradient(circle at 16% 12%, rgba(0, 181, 163, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(13, 21, 32, 0.96), rgba(10, 17, 25, 1) 48%),
    #06111e;
}

.theme-dark .auth-brand-panel {
  background:
    radial-gradient(circle at 88% 18%, rgba(102, 214, 206, 0.2), transparent 30%),
    linear-gradient(135deg, #04182c, #0b2639);
  border-color: rgba(102, 214, 206, 0.2);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.theme-dark .auth-brand-logo {
  background: rgba(234, 244, 246, 0.92);
  border-color: rgba(102, 214, 206, 0.22);
}

.theme-dark .auth-panel,
.theme-dark .app-card,
.theme-dark .resource-form,
.theme-dark .dashboard-kpi-card {
  background: rgba(17, 24, 39, 0.76);
  border-color: rgba(30, 41, 59, 0.92);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.theme-dark .auth-form input {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .password-toggle {
  color: #a9b8c4;
}

.theme-dark .password-toggle:hover,
.theme-dark .password-toggle:focus-visible {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(0, 181, 163, 0.32);
}

.theme-dark .compact-fields textarea {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .auth-form input:focus {
  border-color: #00b5a3;
  outline-color: rgba(0, 181, 163, 0.22);
}

.theme-dark .app-hero {
  background:
    linear-gradient(125deg, rgba(14, 116, 144, 0.92), rgba(10, 17, 25, 0.98)),
    #06111e;
  border-bottom: 1px solid #24384a;
}

.theme-dark .app-card span {
  color: #66d6ce;
  background: rgba(30, 41, 59, 0.72);
}

.theme-dark .section-title span {
  color: #66d6ce;
  background: rgba(30, 41, 59, 0.72);
}

.theme-dark .app-card:hover,
.theme-dark .app-card:focus-visible {
  border-color: rgba(0, 181, 163, 0.55);
  box-shadow: 0 18px 44px rgba(0, 181, 163, 0.14);
}

.theme-dark .calculator-hero {
  background:
    linear-gradient(125deg, rgba(14, 116, 144, 0.92), rgba(10, 17, 25, 0.98)),
    #06111e;
  border-bottom: 1px solid #24384a;
}

.theme-dark .calculator-form,
.theme-dark .result-section,
.theme-dark .result-summary-grid div {
  background: rgba(17, 24, 39, 0.76);
  border-color: rgba(30, 41, 59, 0.92);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.theme-dark .field-grid input,
.theme-dark .field-grid select,
.theme-dark .field-grid textarea {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .field-readonly {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .field-grid input:focus,
.theme-dark .field-grid select:focus,
.theme-dark .field-grid textarea:focus {
  border-color: #00b5a3;
  outline-color: rgba(0, 181, 163, 0.22);
}

.theme-dark .compact-fields textarea:focus {
  border-color: #00b5a3;
  outline-color: rgba(0, 181, 163, 0.22);
}

.theme-dark .resource-search input {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .resource-search select {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .resource-search input:focus {
  border-color: #00b5a3;
  outline-color: rgba(0, 181, 163, 0.22);
}

.theme-dark .resource-search select:focus {
  border-color: #00b5a3;
  outline-color: rgba(0, 181, 163, 0.22);
}

.theme-dark .table-action {
  color: #66d6ce;
  border-color: rgba(0, 181, 163, 0.28);
  background: rgba(30, 41, 59, 0.5);
}

.theme-dark .table-action:hover,
.theme-dark .table-action:focus-visible {
  color: #06111e;
  background: #66d6ce;
  border-color: #66d6ce;
}

.theme-dark .table-action-danger {
  color: #fdc7c7;
  border-color: rgba(250, 161, 161, 0.34);
  background: rgba(99, 32, 32, 0.26);
}

.theme-dark .table-action-danger:hover,
.theme-dark .table-action-danger:focus-visible {
  color: #fecaca;
  background: rgba(116, 39, 39, 0.34);
  border-color: #fca5a5;
}

.theme-dark .required-marker {
  color: #fda4af;
}

.theme-dark .button.danger {
  color: #fdc7c7;
  background: rgba(99, 32, 32, 0.26);
  border-color: rgba(250, 161, 161, 0.34);
}

.theme-dark .button.danger:hover,
.theme-dark .button.danger:focus-visible {
  color: #fecaca;
  background: rgba(116, 39, 39, 0.34);
  border-color: #fca5a5;
}

.theme-dark .danger-zone {
  border-color: #6a4741;
  background:
    linear-gradient(180deg, rgba(59, 32, 27, 0.32), rgba(17, 24, 39, 0.8)),
    rgba(17, 24, 39, 0.76);
}

.theme-dark .danger-zone-title {
  color: #f7c3b7;
}

.theme-dark .danger-zone-description {
  color: #ddb0a5;
}

.theme-dark .detail-grid div,
.theme-dark .detail-notes,
.theme-dark .metadata-item {
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .dashboard-kpi-label,
.theme-dark .dashboard-activity-list li span,
.theme-dark .dashboard-activity-list li small {
  color: #a9b8c4;
}

.theme-dark .dashboard-kpi-value,
.theme-dark .dashboard-status-label,
.theme-dark .dashboard-status-value,
.theme-dark .dashboard-activity-list li strong {
  color: #eaf4f6;
}

.theme-dark .dashboard-kpi-card::before {
  background: linear-gradient(90deg, #00b5a3, #66d6ce);
}

.theme-dark .dashboard-quick-actions .button.secondary {
  color: #eaf4f6;
  background: rgba(30, 41, 59, 0.52);
  border-color: rgba(102, 214, 206, 0.32);
}

.theme-dark .dashboard-quick-actions .button.secondary:hover,
.theme-dark .dashboard-quick-actions .button.secondary:focus-visible {
  color: #04182c;
  background: #66d6ce;
}

.theme-dark .dashboard-status-item,
.theme-dark .dashboard-activity-list li {
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.68), rgba(15, 46, 68, 0.38)),
    rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .dashboard-layout .empty-results.compact {
  color: #a9b8c4;
  background:
    linear-gradient(90deg, rgba(0, 181, 163, 0.1), rgba(102, 214, 206, 0.06)),
    rgba(17, 24, 39, 0.76);
  border-color: rgba(0, 181, 163, 0.24);
}

.theme-dark .status-pill {
  color: #66d6ce;
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(0, 181, 163, 0.28);
}

.theme-dark .calculator-errors p {
  color: #ffd4c7;
  background: #3b201b;
  border-color: #714237;
}

.theme-dark .calculator-status {
  color: #a9b8c4;
  background: rgba(30, 41, 59, 0.5);
  border-color: #24384a;
}

.theme-dark .calculator-form[data-state="loading"] .calculator-status {
  color: #66d6ce;
  border-color: rgba(0, 181, 163, 0.28);
}

.theme-dark .calculator-form[data-state="invalid"] .calculator-status {
  color: #ffd4c7;
  background: #3b201b;
  border-color: #714237;
}

.theme-dark .result-summary-grid strong,
.theme-dark .tool-heading h2,
.theme-dark .result-table td:first-child {
  color: #eaf4f6;
}

.theme-dark .result-table th {
  color: #66d6ce;
  background: rgba(30, 41, 59, 0.72);
}

.theme-dark .result-table th,
.theme-dark .result-table td {
  border-bottom-color: #24384a;
}

.theme-dark .entity-table tbody tr:hover {
  background: rgba(0, 181, 163, 0.08);
}

.theme-dark .result-section > .tool-heading {
  background: linear-gradient(90deg, rgba(0, 181, 163, 0.1), transparent);
  border-bottom-color: #24384a;
}

.theme-dark .collapsible-subsection {
  border-top-color: #24384a;
}

.theme-dark .collapsible-summary:hover,
.theme-dark .collapsible-summary:focus-visible {
  background: rgba(0, 181, 163, 0.12);
}

.theme-dark .interpretation-list li {
  background: rgba(30, 41, 59, 0.5);
  color: #c8d5dc;
}

.theme-dark .site-footer {
  background: #04182c;
  border-top: 1px solid #24384a;
}

@media (max-width: 1120px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar,
  .sidebar-collapsed .app-sidebar {
    align-items: stretch;
    position: static;
    height: auto;
    min-height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-header,
  .sidebar-collapsed .sidebar-header,
  .sidebar-account,
  .sidebar-collapsed .sidebar-account {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .sidebar-collapsed .sidebar-dots {
    display: flex;
    justify-items: initial;
    width: auto;
  }

  .sidebar-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .sidebar-collapsed .sidebar-brand,
  .sidebar-collapsed .sidebar-user,
  .sidebar-collapsed .sidebar-nav {
    width: auto;
  }

  .sidebar-collapsed .sidebar-brand,
  .sidebar-collapsed .sidebar-user,
  .sidebar-collapsed .sidebar-link {
    justify-content: flex-start;
  }

  .sidebar-collapsed .sidebar-label {
    display: inline;
  }

  .sidebar-collapsed .sidebar-brand-text {
    display: grid;
  }

  .sidebar-collapsed .sidebar-brand-note {
    display: block;
  }

  .sidebar-collapsed .sidebar-user-meta,
  .sidebar-collapsed .sidebar-section {
    display: block;
  }

  .sidebar-nav {
    display: grid;
    max-height: 42vh;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-account {
    margin-top: 4px;
  }

  .sidebar-collapsed .account-more {
    display: block;
  }

  .sidebar-collapsed .account-dropdown,
  .account-dropdown {
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    width: auto;
  }

  .sidebar-section {
    grid-column: 1 / -1;
  }

  .pain-grid,
  .applications-grid,
  .auth-layout,
  .calculator-workspace,
  .resource-workspace,
  .app-grid,
  .dashboard-two-column,
  .dashboard-three-column {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-quick-actions {
    justify-content: flex-start;
  }

  .auth-brand-panel {
    min-height: auto;
  }

  .calculator-form {
    position: static;
  }
}

@media (max-width: 1120px) and (min-width: 761px) {
  .pain-grid,
  .applications-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .hero,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 360px;
  }

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

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .header-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .theme-toggle {
    width: 76px;
  }

  .compact-theme {
    width: 68px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-brand-note {
    margin-left: 0;
  }

  .dashboard-quick-actions,
  .dashboard-quick-actions .button {
    width: 100%;
  }

  .dashboard-quick-actions .button {
    justify-content: center;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-visual {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .water-panel {
    min-height: 220px;
  }

  .module-line {
    grid-template-columns: repeat(3, 1fr);
  }

  .module-line span {
    width: 52px;
    height: 52px;
  }

  .metrics,
  .pain-grid,
  .applications-grid,
  .result-summary-grid {
    grid-template-columns: 1fr;
  }

  .resource-page .section-title.section-title-with-action {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: flex-start;
    padding: 0 20px 16px;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .lead-form button {
    width: 100%;
  }
}
