:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(248, 250, 252, 0.9);
  --line: rgba(15, 23, 42, 0.1);
  --blue: #2fa5cc;
  --teal: #2684a3;
  --primary-50: #e8f5fa;
  --primary-100: #d1ebf5;
  --primary-200: #a3d7eb;
  --primary-300: #75c3e1;
  --primary-400: #47afd7;
  --primary-500: #2fa5cc;
  --primary-600: #2684a3;
  --primary-700: #1d637a;
  --primary-800: #1a5266;
  --primary-900: #143d4d;
  --primary-950: #0f2a35;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --coral: #c8553d;
  --amber: #b7791f;
  --success: #268460;
  --violet: #6d5bd0;
  --canvas: #f8fafc;
  --body-background: var(--canvas) url("/static/assets/platform-background-light.png") center / cover fixed no-repeat;
  --body-overlay:
    linear-gradient(135deg, rgba(248, 250, 252, 0.7), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 18% 18%, rgba(47, 165, 204, 0.08), transparent 36%);
  --control-bg: rgba(255, 255, 255, 0.88);
  --input-bg: #ffffff;
  --radius-shell: 18px;
  --radius-panel: 16px;
  --radius-control: 10px;
  --shadow-shell: 0 32px 88px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 18px 44px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 22px 58px rgba(47, 165, 204, 0.18);
  font-family: "Source Sans Pro", Inter, Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.dark-theme {
  color-scheme: dark;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --panel: rgba(17, 24, 39, 0.84);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --surface-soft: rgba(30, 41, 59, 0.82);
  --line: rgba(148, 163, 184, 0.2);
  --blue: #75c3e1;
  --teal: #47afd7;
  --primary-50: rgba(47, 165, 204, 0.14);
  --primary-100: rgba(47, 165, 204, 0.2);
  --primary-200: rgba(117, 195, 225, 0.32);
  --primary-300: #75c3e1;
  --primary-400: #47afd7;
  --primary-500: #2fa5cc;
  --primary-600: #75c3e1;
  --primary-700: #a3d7eb;
  --primary-800: #d1ebf5;
  --primary-900: #e8f5fa;
  --primary-950: #f8fdff;
  --slate-50: #0f172a;
  --slate-100: #111827;
  --slate-200: #1e293b;
  --slate-700: #cbd5e1;
  --slate-900: #e5e7eb;
  --coral: #ff6f61;
  --amber: #f2b84b;
  --success: #2ecc71;
  --violet: #a78bfa;
  --canvas: #020617;
  --body-background: #020617 url("/static/assets/wave-background_floodwaive-dark.png") center / cover fixed no-repeat;
  --body-overlay:
    linear-gradient(135deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at 20% 16%, rgba(47, 165, 204, 0.18), transparent 38%);
  --control-bg: rgba(15, 23, 42, 0.78);
  --input-bg: rgba(15, 23, 42, 0.92);
  --shadow-shell: 0 32px 88px rgba(0, 0, 0, 0.42);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 22px 58px rgba(47, 165, 204, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--body-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--body-overlay);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

body.has-modal-open {
  overflow: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  padding: 8px 10px;
  border-radius: var(--radius-control);
  background: var(--slate-900);
  color: white;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

button,
a {
  font: inherit;
}

main {
  position: relative;
  z-index: 1;
}

.shell-header {
  position: relative;
  z-index: 1200;
  overflow: visible;
}

.shell-header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 760;
}

.brand-text {
  white-space: nowrap;
}

.app-version {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(47, 165, 204, 0.22);
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 8px 18px rgba(47, 165, 204, 0.2));
}

.shell-header-center {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.shell-header-center strong {
  max-width: min(520px, 44vw);
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-header-center span {
  max-width: min(520px, 44vw);
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-header-avatars {
  display: flex;
  justify-content: center;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.main-nav a,
.identity a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  color: var(--muted);
}

.main-nav a:hover,
.identity a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.identity-menu {
  position: relative;
  display: block;
}

.identity-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.identity-trigger:hover,
.identity-menu.is-open .identity-trigger {
  background: var(--primary-50);
  color: var(--primary-700);
}

.identity-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.72;
}

.identity-menu.is-open .identity-trigger::after {
  transform: rotate(225deg) translate(-1px, -2px);
}

.identity-picture-frame {
  width: 30px;
  height: 30px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(8, 80, 65, 0.16);
  border-radius: 999px;
  background: var(--primary-50);
}

.identity-picture,
.identity-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.identity-picture {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.identity-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
  font-size: 0.82rem;
  font-weight: 780;
}

.identity-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1300;
  display: none;
  min-width: 280px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  box-shadow: var(--shadow-card);
}

.identity-menu.is-open .identity-dropdown,
.identity-menu:focus-within .identity-dropdown {
  display: block;
}

.identity-dropdown a {
  width: 100%;
  justify-content: flex-start;
}

.identity-dropdown-section + .identity-dropdown-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.identity-dropdown-heading {
  display: block;
  padding: 4px 6px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.identity-dropdown .identity-tool-link {
  display: grid;
  align-items: start;
  gap: 2px;
  min-height: 48px;
}

.identity-tool-link span {
  color: var(--ink);
  font-weight: 780;
}

.identity-tool-link small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand + .theme-toggle {
  margin-left: auto;
}

.shell-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tour-toggle,
.language-toggle,
.theme-toggle {
  position: relative;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  color: var(--primary-700);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.tour-toggle {
  min-width: 62px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
}

.language-toggle {
  gap: 5px;
  min-width: 76px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.theme-toggle {
  width: 42px;
}

.language-toggle-option {
  color: var(--muted);
  transition: color 0.16s ease;
}

.language-toggle-divider {
  color: var(--line-strong);
}

:root[data-language="en"] .language-toggle-option[data-language-option="en"],
:root[data-language="de"] .language-toggle-option[data-language-option="de"] {
  color: var(--primary-700);
}

.tour-toggle:hover,
.tour-toggle:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--primary-200);
  color: var(--primary-500);
  outline: 0;
  box-shadow: var(--shadow-hover);
}

.tour-toggle[data-tooltip]::after,
.language-toggle[data-tooltip]::after,
.theme-toggle[data-tooltip]::after {
  top: calc(100% + 8px);
  bottom: auto;
  transform: translate(-50%, -4px);
}

.tour-toggle[data-tooltip]:hover::after,
.tour-toggle[data-tooltip]:focus-visible::after,
.language-toggle[data-tooltip]:hover::after,
.language-toggle[data-tooltip]:focus-visible::after,
.theme-toggle[data-tooltip]:hover::after,
.theme-toggle[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.driver-popover {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: var(--shadow-hover);
  font-family: inherit;
}

.driver-popover-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.driver-popover-description {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.driver-popover-progress-text {
  color: var(--muted);
  font-weight: 750;
}

.driver-popover-footer button {
  border-radius: var(--radius-control);
  font-family: inherit;
  font-weight: 780;
  text-shadow: none;
}

.driver-popover-next-btn,
.driver-popover-done-btn {
  border-color: transparent !important;
  background: var(--primary-700) !important;
  color: #fff !important;
}

.driver-popover-prev-btn {
  border-color: var(--line) !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}

.theme-toggle-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.theme-toggle-icon.moon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
}

.theme-toggle-icon.moon::after {
  content: "";
  position: absolute;
  inset: 2px 0 2px 6px;
  border-radius: 50%;
  background: var(--control-bg);
}

.theme-toggle-icon.sun {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-18deg) scale(0.8);
}

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

.theme-toggle-icon.sun::before {
  width: 2px;
  height: 24px;
}

.theme-toggle-icon.sun::after {
  width: 24px;
  height: 2px;
}

.dark-theme .theme-toggle-icon.moon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(18deg) scale(0.8);
}

.dark-theme .theme-toggle-icon.sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.hero-dashboard,
.dashboard-area-panel,
.login-layout,
.page-title,
.section-block,
.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.hero-dashboard {
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: clamp(28px, 5vw, 56px);
}

.hero-dashboard h1,
.dashboard-area-panel h1,
.page-title h1,
.login-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-600);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions,
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.tool-card a,
.project-row a,
.card-actions a,
.toolbar a,
.toolbar button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  cursor: pointer;
}

.primary-action {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  color: white;
  border-color: rgba(47, 165, 204, 0.2);
  box-shadow: 0 12px 26px rgba(47, 165, 204, 0.24);
}

.secondary-action,
.tool-card a,
.project-row a,
.card-actions a,
.toolbar a,
.toolbar button {
  background: var(--control-bg);
  color: var(--ink);
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible,
.tool-card a:hover,
.tool-card a:focus-visible,
.project-row a:hover,
.project-row a:focus-visible,
.card-actions a:hover,
.card-actions a:focus-visible,
.toolbar a:hover,
.toolbar a:focus-visible,
.toolbar button:hover,
.toolbar button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--primary-200);
  box-shadow: 0 16px 32px rgba(47, 165, 204, 0.18);
  outline: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.metrics-grid article,
.project-card,
.tool-card,
.project-row {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.warmup-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  background: var(--body-background);
}

.warmup-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--body-overlay);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.warmup-screen {
  width: min(960px, calc(100vw - 32px));
  min-height: min(760px, calc(100vh - 32px));
  display: grid;
  place-items: center;
  gap: 22px;
  margin: 0;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--panel);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
  text-align: center;
}

.warmup-visual {
  position: relative;
  width: min(520px, 78vw);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 50%, rgba(47, 165, 204, 0.12), transparent 58%),
    transparent;
  isolation: isolate;
}

.warmup-animation {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 32px;
  mix-blend-mode: screen;
  filter: drop-shadow(0 28px 60px rgba(15, 23, 42, 0.18));
}

.warmup-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.warmup-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
}

.warmup-status {
  min-height: 32px;
  margin: 0;
  color: var(--primary-700);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 820;
}

.warmup-progress {
  width: min(320px, 72vw);
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 165, 204, 0.16);
}

.warmup-progress span {
  width: 44%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-700), var(--blue));
  animation: warmup-progress 1.25s ease-in-out infinite alternate;
}

@keyframes warmup-progress {
  from {
    transform: translateX(-45%);
  }
  to {
    transform: translateX(175%);
  }
}

.dark-theme .warmup-animation {
  filter: drop-shadow(0 28px 60px rgba(47, 165, 204, 0.16));
}

.metrics-grid article {
  padding: 24px;
}

.metrics-grid span {
  display: block;
  color: var(--primary-600);
  font-size: 2.2rem;
  font-weight: 780;
}

.metrics-grid p,
.project-card p,
.tool-card p,
.project-row p,
.page-title p,
.login-copy p,
.small-note {
  color: var(--muted);
}

.section-block,
.page-title,
.toolbar {
  padding: 24px;
  margin-top: 18px;
}

.section-heading,
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.section-heading h2,
.project-card h2,
.tool-card h2,
.tool-card h3,
.project-row h3,
.login-panel h2 {
  margin: 0;
}

.dashboard-area-panel {
  min-height: min(620px, calc(100vh - 150px));
  display: grid;
  align-content: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 56px);
}

.department-dashboard,
.department-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--panel);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.department-dashboard {
  display: grid;
  gap: 28px;
  padding: clamp(28px, 5vw, 56px);
}

.department-dashboard-copy {
  max-width: 860px;
}

.department-dashboard-copy h1,
.department-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.96;
}

.department-dashboard-copy p,
.department-hero p {
  color: var(--muted);
}

.department-dashboard-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.department-search-control {
  flex: 1 1 420px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.department-search-control input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-transform: none;
  padding: 0 16px;
  outline: 0;
}

.department-search-control input:focus {
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(47, 165, 204, 0.14);
}

.department-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.department-view-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 780;
  padding: 0 14px;
}

.department-view-toggle button.active {
  background: var(--panel-strong);
  color: var(--primary-700);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.department-empty-state {
  flex: 1 0 100%;
  margin: 0;
  color: var(--muted);
  font-weight: 740;
}

.department-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.department-card {
  position: relative;
  min-height: 280px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(145deg, rgba(47, 165, 204, 0.12), transparent 44%),
    var(--panel-strong);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.department-card:hover,
.department-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--primary-200);
  box-shadow: var(--shadow-hover);
  outline: 0;
}

.department-card.is-locked {
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.34);
  background:
    linear-gradient(145deg, rgba(148, 163, 184, 0.14), transparent 44%),
    var(--panel-strong);
  box-shadow: var(--shadow-card);
}

.department-card.is-locked:hover,
.department-card.is-locked:focus-visible {
  transform: none;
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: var(--shadow-card);
}

.department-card-top {
  display: grid;
  gap: 9px;
}

.department-card-kicker {
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.department-card strong {
  font-size: 1.35rem;
  line-height: 1.12;
}

.department-card small,
.department-card-footer small {
  color: var(--muted);
  line-height: 1.45;
}

.department-card-meta,
.department-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.department-card-footer span,
.department-card-footer small,
.department-access-note strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(47, 165, 204, 0.18);
  border-radius: 999px;
  background: rgba(47, 165, 204, 0.1);
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 740;
}

.department-card-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.35;
}

.department-card-footer small {
  background: var(--surface-soft);
  color: var(--muted);
}

.department-access-group,
.department-access-subtle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: var(--muted);
  font-size: 0.82rem;
}

.department-access-group {
  padding-left: 12px;
  border-left: 2px solid rgba(47, 165, 204, 0.35);
}

.department-access-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.department-access-email {
  color: var(--ink);
  font-weight: 780;
  text-decoration: none;
}

.department-access-email:hover,
.department-access-email:focus-visible {
  color: var(--primary-700);
  text-decoration: underline;
  outline: 0;
}

.tool-card.is-locked {
  border-color: rgba(148, 163, 184, 0.34);
}

.tool-card-group {
  color: var(--muted);
  font-size: 0.82rem;
}

.tool-access-lock {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
}

.department-avatar-rail,
.department-hero-avatars {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.department-avatar-rail.is-empty {
  color: var(--muted);
  font-size: 0.85rem;
}

.department-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-left: -10px;
  border: 3px solid var(--panel-strong);
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.8rem;
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  animation: department-avatar-slide 0.42s ease both;
  animation-delay: calc(var(--avatar-index, 0) * 70ms);
}

.department-avatar:first-child {
  margin-left: 0;
}

.department-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.department-avatar.large {
  width: 70px;
  height: 70px;
  margin-left: -14px;
  border-width: 4px;
  font-size: 1.05rem;
}

.department-avatar.mini {
  width: 30px;
  height: 30px;
  margin-left: -8px;
  border-width: 2px;
  font-size: 0.7rem;
}

.department-avatar-more {
  background: var(--ink);
  color: var(--panel);
}

@keyframes department-avatar-slide {
  from {
    opacity: 0;
    transform: translateX(22px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.department-hero {
  position: relative;
  --department-hero-image: none;
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  text-align: center;
  border-color: rgba(47, 165, 204, 0.22);
  background-color: var(--panel);
  background-image:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.36) 36%, rgba(255, 255, 255, 0.22) 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.56)),
    var(--department-hero-image);
  background-position: center;
  background-size: cover;
  box-shadow:
    0 24px 54px rgba(15, 23, 42, 0.14),
    inset 0 -1px 0 rgba(15, 23, 42, 0.06);
}

.department-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-700), var(--blue), var(--green));
  z-index: 2;
}

.department-back {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 3;
}

.department-learn-more {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;
}

.department-hero-copy {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
}

.department-hero-copy p {
  max-width: 780px;
  margin: 0;
}

.department-hero-avatars {
  position: relative;
  z-index: 1;
  justify-content: center;
  padding: 4px 0;
}

.department-hero-empty {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.92rem;
}

.department-access-note {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.department-tool-grid {
  margin-top: 18px;
}

.dark-theme .department-hero {
  border-color: rgba(148, 163, 184, 0.18);
  background-image:
    radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.44) 38%, rgba(2, 6, 23, 0.66) 78%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.7)),
    var(--department-hero-image);
  box-shadow:
    0 24px 62px rgba(2, 6, 23, 0.38),
    inset 0 -1px 0 rgba(2, 6, 23, 0.86);
}

.department-flow-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 34px 96px rgba(15, 23, 42, 0.26);
}

.department-flow-dialog::backdrop {
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(10px);
}

.department-flow-modal {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 32px);
  padding: clamp(22px, 4vw, 36px);
  overflow: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(47, 165, 204, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(47, 165, 204, 0.08), transparent 48%),
    var(--panel-strong);
}

.department-flow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.department-flow-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
}

.department-flow-header p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.department-flow-header a {
  display: inline-flex;
  margin-left: 10px;
  color: var(--primary-700);
  font-weight: 780;
}

.department-flow-close {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
}

.department-flow-close:hover,
.department-flow-close:focus-visible {
  border-color: var(--primary-300);
  color: var(--primary-700);
  outline: 0;
}

.department-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-soft);
}

.department-flow-steps span {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 165, 204, 0.18);
  border-radius: var(--radius-control);
  background: var(--panel-strong);
}

.department-flow-steps strong {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-700);
  color: var(--panel-strong);
  font-size: 0.78rem;
}

.department-flow-steps em {
  color: var(--ink);
  font-style: normal;
  font-size: 0.84rem;
  font-weight: 820;
  text-transform: uppercase;
}

.department-flow-map {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(280px, 1.2fr) auto minmax(180px, 0.9fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 420px;
}

.department-flow-lane {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 310px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-soft);
}

.department-flow-lane h3 {
  margin: 0;
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.department-flow-card-list,
.department-flow-chip-list {
  display: grid;
  gap: 10px;
}

.department-flow-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(47, 165, 204, 0.18);
  border-radius: var(--radius-control);
  background: var(--panel-strong);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.department-flow-card.input {
  border-color: rgba(47, 165, 204, 0.26);
  background:
    linear-gradient(135deg, rgba(47, 165, 204, 0.14), transparent 70%),
    var(--panel-strong);
}

.department-flow-card.outcome {
  border-color: rgba(38, 132, 96, 0.26);
  background:
    linear-gradient(135deg, rgba(38, 132, 96, 0.14), transparent 70%),
    var(--panel-strong);
}

.department-flow-card strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.department-flow-card span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.department-flow-chip-list span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(47, 165, 204, 0.24);
  border-radius: var(--radius-control);
  background:
    linear-gradient(135deg, rgba(47, 165, 204, 0.18), transparent 70%),
    var(--panel-strong);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
}

.department-flow-arrow {
  color: var(--primary-700);
  font-size: 1.9rem;
  font-weight: 900;
}

.department-flow-team {
  min-height: 380px;
  display: grid;
  place-items: center;
}

.department-flow-orbit {
  --orbit-radius: clamp(105px, 12vw, 132px);
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1;
  border: 1px solid rgba(47, 165, 204, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(47, 165, 204, 0.12), transparent 62%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.06), transparent);
}

.department-flow-orbit::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px dashed rgba(47, 165, 204, 0.32);
  border-radius: 50%;
}

.department-flow-core {
  position: absolute;
  inset: 50%;
  width: 136px;
  height: 136px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 14px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(47, 165, 204, 0.3);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(29, 99, 122, 0.92));
  color: #fff;
  text-align: center;
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.2);
}

.department-flow-core strong {
  font-size: 0.82rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.department-flow-core span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
}

.department-flow-member {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--panel-strong);
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
  transform: translate(-50%, -50%) rotate(var(--orbit-angle)) translate(var(--orbit-radius)) rotate(var(--orbit-counter-angle));
}

.department-flow-member img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.department-flow-member:hover,
.department-flow-member:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(47, 165, 204, 0.18),
    0 16px 34px rgba(47, 165, 204, 0.24);
}

.dark-theme .department-flow-dialog {
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.5);
}

.dark-theme .department-flow-orbit {
  background:
    radial-gradient(circle, rgba(47, 165, 204, 0.18), transparent 62%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.62), transparent);
}

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

.tool-area-overview {
  margin-top: 18px;
}

.area-button {
  position: relative;
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.area-button::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
  opacity: 0.9;
}

.area-button:hover,
.area-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--primary-200);
  box-shadow: var(--shadow-hover);
  outline: 0;
}

.area-button span {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0;
}

.area-button small {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-faq-panel {
  margin-bottom: 36px;
}

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

.faq-section + .faq-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.faq-section h3 {
  margin: 0;
  color: var(--primary-700);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.faq-item summary {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item summary:focus-visible {
  outline: 2px solid rgba(47, 165, 204, 0.4);
  outline-offset: -2px;
}

.faq-item p {
  max-width: 920px;
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.55;
}

.faq-item a {
  font-weight: 780;
}

.faq-item code {
  color: var(--ink);
  font-size: 0.88em;
}

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

.dashboard-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.tool-button {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.tool-button:hover,
.tool-button:focus-visible {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-hover);
  outline: 0;
}

.tool-button span {
  font-weight: 760;
}

.tool-button small {
  color: var(--muted);
  text-transform: uppercase;
}

.dashboard-project-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.compact-row {
  padding: 12px 14px;
}

.project-grid,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.tool-category-list {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

.tool-category {
  scroll-margin-top: 92px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.tool-category > .section-heading {
  align-items: end;
}

.tool-category > .section-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.tool-area-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.project-card,
.tool-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.empty-tool-category {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 18px;
  max-width: 100%;
  border: 1px dashed rgba(28, 52, 77, 0.28);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.7);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.empty-tool-category span {
  color: var(--muted);
}

.area-empty {
  margin-top: 18px;
}

.tool-card a,
.card-actions {
  margin-top: auto;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.status-dot.active {
  background: var(--primary-500);
}

.status-dot.complete {
  background: var(--coral);
}

.status-dot.warning {
  background: var(--amber);
}

.status-dot.error {
  background: var(--coral);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.login-layout {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 6vw, 64px);
}

.login-panel {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.login-logo {
  width: 84px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 12px 24px rgba(47, 165, 204, 0.18));
}

.notice {
  padding: 14px;
  border-radius: var(--radius-control);
  background: rgba(200, 85, 61, 0.1);
  color: #7a2f20;
}

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

.waivebook-hero {
  align-items: center;
}

.waivebook-title-lockup {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}

.waivebook-logo {
  width: clamp(86px, 12vw, 132px);
  height: clamp(86px, 12vw, 132px);
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: var(--radius-panel);
  filter: drop-shadow(0 12px 26px rgba(47, 165, 204, 0.16));
}

.people-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px;
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.search-control,
.admin-form input,
.admin-form textarea,
.admin-inline-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 9px 11px;
  background: white;
  color: var(--ink);
}

.search-control {
  width: min(360px, 100%);
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.76);
}

.segmented-control button,
.icon-button,
.danger-action {
  min-height: 36px;
  border-radius: var(--radius-control);
  border: 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.segmented-control button.active,
.icon-button:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
}

.people-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 18px;
  margin-top: 18px;
}

.graph-panel,
.detail-panel,
.admin-panel,
.email-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

#people-graph {
  --waivebook-edge: rgba(23, 32, 42, 0.36);
  --waivebook-business-unit-edge: #185fa5;
  --waivebook-department-edge: #993556;
  --waivebook-member-edge: #0f6e56;
  --waivebook-flow-edge: #b7791f;
  --waivebook-label: #17202a;
  --waivebook-node-stroke: rgba(255, 255, 255, 0.9);
  --waivebook-grid-line: rgba(23, 32, 42, 0.045);
  --waivebook-graph-bg: rgba(255, 255, 255, 0.72);
  width: 100%;
  height: 660px;
  overflow: hidden;
  border-radius: var(--radius-shell);
  background:
    linear-gradient(var(--waivebook-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--waivebook-grid-line) 1px, transparent 1px),
    var(--waivebook-graph-bg);
  background-size: 36px 36px, 36px 36px, auto;
}

#people-graph svg {
  display: block;
  width: 100%;
  height: 100%;
}

.detail-panel {
  padding: 22px;
  min-height: 340px;
}

.detail-person-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #dce8ef;
}

.detail-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  font-weight: 780;
}

.detail-email {
  min-width: 0;
  color: var(--primary-600);
  font-weight: 680;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.detail-email:hover {
  text-decoration: underline;
}

.detail-section {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-cover {
  height: 112px;
  margin: -28px -28px 0;
  border-radius: var(--radius-shell) var(--radius-shell) 0 0;
  background:
    linear-gradient(135deg, rgba(47, 165, 204, 0.94), rgba(29, 99, 122, 0.9)),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover;
}

.profile-head {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: -54px;
}

.profile-head > div {
  min-width: 0;
  padding-top: 60px;
}

.profile-head .eyebrow {
  margin: 0 0 6px;
}

.profile-head h2 {
  margin: 0;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.profile-avatar {
  width: 116px;
  height: 116px;
  border: 4px solid white;
  border-radius: 50%;
  object-fit: cover;
  background: #dce8ef;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.profile-avatar.placeholder,
.profile-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
  font-weight: 780;
}

.profile-role,
.profile-bio,
.profile-section p {
  color: var(--muted);
}

.profile-role {
  margin: 8px 0 0;
  font-weight: 690;
  line-height: 1.35;
}

.profile-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.profile-section h3 {
  margin: 0 0 14px;
  font-size: 0.92rem;
}

.profile-bio {
  margin: 0;
  line-height: 1.55;
}

.profile-facts {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.profile-fact {
  display: grid;
  grid-template-columns: minmax(88px, 104px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 42px;
  padding-block: 2px;
  min-width: 0;
}

.profile-fact span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.profile-fact strong {
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  text-transform: uppercase;
}

.pill-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.82rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-pill {
  background: rgba(183, 121, 31, 0.14);
  color: var(--amber);
}

.status-pill.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.my-profile-hero {
  align-items: flex-end;
}

.my-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: start;
  margin-top: 36px;
  max-width: 100%;
  overflow-x: clip;
}

.my-profile-card,
.my-profile-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.my-profile-card {
  min-height: 100%;
  padding: 34px;
}

.my-profile-card .profile-cover {
  height: 136px;
  margin: -34px -34px 0;
}

.my-profile-card .profile-head {
  gap: 30px;
  margin-top: -58px;
  margin-bottom: 18px;
}

.my-profile-card .profile-head > div {
  padding-top: 76px;
}

.my-profile-card .profile-section,
.my-profile-panel .profile-section {
  padding-top: 32px;
  margin-top: 32px;
}

.my-profile-side {
  display: grid;
  gap: 24px;
}

.my-profile-panel {
  padding: 34px;
  border-radius: var(--radius-shell);
  overflow: hidden;
}

.my-profile-absences-panel {
  margin-top: 36px;
  padding: 34px;
  min-width: 0;
  overflow: hidden;
}

.absence-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.absence-toolbar > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.segmented-control.compact {
  gap: 4px;
}

.segmented-control.compact button {
  min-height: 34px;
  padding: 6px 12px;
}

.section-heading.compact {
  gap: 22px;
  margin-bottom: 22px;
}

.section-heading.compact h2 {
  font-size: 1.05rem;
}

.my-profile-record-facts {
  gap: 16px;
  margin-top: 28px;
}

.my-profile-record-facts .profile-fact {
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 56px;
}

.my-profile-notion-link {
  margin-top: 22px;
}

.profile-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.profile-link-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(8, 80, 65, 0.16);
  border-radius: var(--radius-control);
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.9rem;
  font-weight: 760;
}

.profile-link-button:hover,
.profile-link-button:focus-visible {
  border-color: rgba(8, 80, 65, 0.28);
  background: rgba(47, 165, 204, 0.14);
  color: var(--primary-800);
}

.profile-link-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #0f6e56;
  color: white;
}

.profile-link-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.absence-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.absence-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.absence-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-soft);
}

.absence-column.is-empty-filter {
  opacity: 0.58;
}

.absence-column.is-empty-filter::after {
  content: "No entries for the selected year.";
  display: block;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.88rem;
}

.absence-column-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.absence-column-heading h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.absence-column-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.absence-group {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.absence-group-heading,
.absence-year-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.absence-group-heading strong {
  color: var(--ink);
  font-size: 1rem;
}

.absence-group-heading span,
.absence-year-heading small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.absence-year {
  display: grid;
  gap: 10px;
}

.absence-year-heading span {
  color: var(--primary-700);
  font-size: 0.86rem;
  font-weight: 820;
}

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

.absence-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(8, 80, 65, 0.1);
  border-radius: var(--radius-control);
  background: var(--panel);
}

.absence-entry div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.absence-entry a,
.absence-entry strong {
  color: var(--ink);
  font-weight: 790;
  text-decoration: none;
}

.absence-entry a:hover {
  text-decoration: underline;
}

.absence-entry div span,
.absence-entry p {
  color: var(--muted);
  font-size: 0.84rem;
}

.absence-entry p {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.45;
}

.salary-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 24px;
  align-items: end;
}

.salary-summary-card,
.salary-panel,
.salary-result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  box-shadow: var(--shadow-card);
}

.salary-summary-card {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.salary-summary-card span,
.salary-summary-card small {
  color: var(--muted);
}

.salary-summary-card strong {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

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

.salary-stepper article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
}

.salary-stepper article span {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 850;
}

.salary-stepper article small,
.salary-family-card p,
.salary-level-row small,
.salary-score-row small,
.salary-composition-row span,
.salary-result-summary span {
  color: var(--muted);
}

.salary-layout,
.salary-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.salary-panel,
.salary-result-panel {
  min-width: 0;
  padding: 24px;
}

.salary-family-grid,
.salary-level-list,
.salary-scorecard-grid,
.salary-composition {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.salary-family-card,
.salary-level-row,
.salary-scorecard,
.salary-composition-row {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.salary-family-card.active {
  border-color: rgba(47, 165, 204, 0.42);
  box-shadow: 0 16px 34px rgba(47, 165, 204, 0.12);
}

.salary-family-card label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 820;
}

.salary-family-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-500);
}

.salary-weight-row,
.salary-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

.salary-weight-row input,
.salary-score-row input {
  width: 100%;
  accent-color: var(--primary-500);
}

.salary-level-row {
  display: grid;
  gap: 12px;
}

.salary-level-row > div:first-child,
.salary-scorecard-head,
.salary-composition-row,
.salary-result-summary div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.salary-level-row > div:first-child span {
  color: var(--primary-700);
  font-weight: 760;
}

.salary-scorecard-panel {
  margin-top: 18px;
}

.salary-scorecard-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.salary-scorecard-head h3 {
  margin: 2px 0 0;
}

.salary-scorecard-head > strong {
  color: var(--primary-700);
  font-size: 1.4rem;
}

.salary-score-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px) 28px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.salary-score-row span {
  display: grid;
  gap: 3px;
}

.salary-scale {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.salary-scale-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--success));
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.salary-scale-track span {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 28px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--primary-600);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
  transform: translate(-50%, -50%);
}

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

.salary-scale-labels span,
.salary-result-summary div {
  display: grid;
  gap: 4px;
}

.salary-scale-labels span:nth-child(2) {
  text-align: center;
}

.salary-scale-labels span:nth-child(3) {
  text-align: right;
}

.salary-scale-labels strong,
.salary-result-summary strong,
.salary-composition-row strong {
  color: var(--ink);
}

.my-profile-section-list {
  display: grid;
  gap: 16px;
}

.my-profile-section-list article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.my-profile-section-list strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
}

.my-profile-section-list ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

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

.admin-panel {
  padding: 24px;
  margin-top: 18px;
}

.admin-inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.admin-inline-form input {
  flex: 1 1 260px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  margin-top: 18px;
}

.admin-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.admin-form h3 {
  margin: 0 0 4px;
}

.admin-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-form button,
.admin-form .secondary-action,
.admin-form .danger-action {
  width: 100%;
}

.danger-action {
  border: 1px solid rgba(200, 85, 61, 0.3);
  background: rgba(200, 85, 61, 0.12);
  color: #7a2f20;
}

.admin-form button:disabled,
.admin-form input:disabled,
.admin-form textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.email-preview {
  margin-top: 18px;
  overflow: hidden;
}

.email-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.email-preview iframe {
  width: 100%;
  height: 520px;
  border: 0;
  background: white;
}

.onboarding-email-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  margin-top: 18px;
}

.onboarding-email-panel,
.onboarding-email-directory {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.onboarding-email-panel,
.onboarding-email-directory {
  padding: 24px;
}

.onboarding-email-note {
  margin-bottom: 20px;
  background: var(--primary-50);
  color: var(--primary-700);
}

.onboarding-email-admin {
  margin-top: 6px;
}

.onboarding-email-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.onboarding-email-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.onboarding-email-form input,
.onboarding-email-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.onboarding-email-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.onboarding-profile-list {
  display: grid;
  gap: 9px;
  max-height: 620px;
  overflow: auto;
  margin-top: 16px;
  padding-right: 4px;
}

.onboarding-profile-list button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.onboarding-profile-list button:hover,
.onboarding-profile-list button:focus-visible {
  border-color: var(--primary-200);
  outline: 0;
}

.onboarding-profile-list img,
.profile-initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.onboarding-profile-list strong,
.onboarding-profile-list small,
.onboarding-profile-list em {
  display: block;
}

.onboarding-profile-list small,
.onboarding-profile-list em {
  color: var(--muted);
}

.onboarding-profile-list em {
  font-size: 0.76rem;
}

.onboarding-preview {
  margin-top: 18px;
}

.learning-hero .small-note {
  margin-bottom: 0;
}

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

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

.quiz-card,
.quiz-attempt-summary,
.quiz-form,
.learning-admin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.quiz-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.quiz-card h2 {
  margin: 0;
}

.quiz-card p {
  color: var(--muted);
}

.quiz-card-topline,
.quiz-score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-card-topline .eyebrow {
  margin-bottom: 0;
}

.quiz-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.quiz-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
}

.learning-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(28, 52, 77, 0.12);
}

.learning-progress.large {
  height: 14px;
}

.learning-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
}

.quiz-score-line {
  margin-top: auto;
  color: var(--muted);
}

.quiz-score-line strong {
  color: var(--ink);
  font-size: 1.4rem;
}

.learning-status.completed {
  background: var(--primary-50);
  color: var(--primary-700);
}

.learning-status.overdue {
  background: rgba(200, 85, 61, 0.12);
  color: #7a2f20;
}

.learning-status.open,
.learning-status.due {
  background: rgba(183, 121, 31, 0.14);
  color: var(--amber);
}

.quiz-attempt-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.quiz-attempt-summary,
.quiz-form,
.learning-admin-card {
  padding: 22px;
}

.quiz-attempt-summary h2 {
  margin-top: 0;
}

.quiz-detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.quiz-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.quiz-detail-list dt {
  color: var(--muted);
}

.quiz-detail-list dd {
  margin: 0;
  font-weight: 760;
}

.quiz-form {
  display: grid;
  gap: 16px;
}

.quiz-question {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.quiz-question.correct {
  border-color: rgba(47, 165, 204, 0.42);
}

.quiz-question.incorrect {
  border-color: rgba(200, 85, 61, 0.4);
}

.quiz-question legend {
  display: grid;
  gap: 6px;
  padding: 0 4px;
  font-size: 1.05rem;
  font-weight: 760;
}

.quiz-question legend span {
  color: var(--primary-600);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quiz-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.72);
}

.quiz-options input {
  margin-top: 3px;
}

.quiz-explanation,
.quiz-result {
  margin: 14px 0 0;
  color: var(--muted);
}

.quiz-result {
  padding: 14px;
  border-radius: var(--radius-control);
  background: var(--primary-50);
  color: var(--primary-700);
}

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

.learning-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.learning-admin-content[hidden],
.learning-admin-locked[hidden] {
  display: none;
}

.learning-admin-locked {
  margin-top: 16px;
  background: var(--primary-50);
  color: var(--primary-700);
}

.compact-heading h3 {
  margin: 0;
}

.learning-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.learning-admin-quiz {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 170px) minmax(120px, 140px) minmax(130px, 160px) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.learning-admin-quiz div,
.learning-admin-quiz label {
  display: grid;
  gap: 5px;
}

.learning-admin-quiz small,
.learning-admin-quiz label {
  color: var(--muted);
  font-size: 0.82rem;
}

.learning-admin-quiz input,
.learning-admin-quiz select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.learning-progress-table {
  max-height: 560px;
  margin-top: 16px;
  overflow: auto;
}

.learning-progress-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.learning-progress-table small {
  display: block;
  color: var(--muted);
}

.slideshow-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  gap: 18px;
}

.slideshow-topbar,
.slide-nav,
.slides-frame,
.slideshow-controls {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.slideshow-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: clamp(22px, 4vw, 36px);
}

.slideshow-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.slide-count {
  min-width: 92px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: white;
  color: var(--muted);
  font-weight: 760;
}

.slide-nav {
  display: flex;
  gap: 6px;
  padding: 10px;
  overflow-x: auto;
}

.slide-nav button {
  min-height: 38px;
  white-space: nowrap;
  border: 0;
  border-radius: var(--radius-control);
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.slide-nav button.active,
.slide-nav button:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
}

.slides-frame {
  position: relative;
  min-height: 610px;
  overflow: hidden;
}

.slide {
  min-height: 610px;
  display: none;
  padding: clamp(28px, 5vw, 56px);
}

.slide.active {
  display: grid;
  align-content: center;
  gap: 28px;
}

.slide h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.slide h3 {
  margin: 0 0 8px;
}

.slide p {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.slide-hero {
  display: grid;
  gap: 14px;
}

.slide-hero img {
  width: 90px;
  height: auto;
}

.slide-stat-strip,
.principle-grid,
.business-unit-grid,
.tool-system-grid,
.flow-lanes,
.security-grid,
.next-link-grid {
  display: grid;
  gap: 14px;
}

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

.slide-stat-strip div,
.principle-grid section,
.business-unit-grid section,
.tool-system-grid section,
.flow-lanes section,
.security-grid div,
.next-link-grid a,
.conduct-list div {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.slide-stat-strip div {
  padding: 22px;
}

.slide-stat-strip strong {
  display: block;
  color: var(--primary-600);
  font-size: 2.4rem;
  line-height: 1;
}

.slide-stat-strip span,
.unit-heading span,
.security-grid span,
.conduct-list span,
.next-link-grid span {
  color: var(--muted);
}

.slide-two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
}

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

.highlight-list span {
  padding: 14px;
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-control);
  background: white;
  color: var(--ink);
  font-weight: 690;
}

.principle-grid,
.tool-system-grid,
.security-grid,
.next-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.principle-grid section,
.tool-system-grid section,
.flow-lanes section {
  padding: 20px;
}

.conduct-list {
  display: grid;
  gap: 10px;
  max-width: 960px;
}

.conduct-list div,
.security-grid div {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.business-unit-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.business-unit-grid section {
  padding: 18px;
}

.unit-heading {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.department-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.department-list article {
  padding: 12px 0 0;
  border-top: 1px solid rgba(28, 52, 77, 0.09);
}

.department-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.department-list strong,
.department-list a {
  display: block;
}

.department-list p {
  margin: 6px 0 0;
  font-size: 0.92rem;
}

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

.flow-lanes span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
  font-weight: 780;
}

.slide-note {
  padding: 16px 18px;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.82);
}

.week-list {
  display: grid;
  gap: 12px;
  max-width: 920px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: week-step;
}

.week-list li {
  counter-increment: week-step;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: white;
}

.week-list li::before {
  content: counter(week-step);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
  font-weight: 780;
}

.next-link-grid a {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 20px;
  color: var(--ink);
}

.next-link-grid a:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-hover);
}

.slideshow-controls {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.slide-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.1);
}

.slide-progress span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
  transition: width 0.18s ease;
}

.onboarding-slideshow .slide {
  overflow: auto;
}

.onboarding-slideshow .slide h2 {
  max-width: 980px;
}

.onboarding-welcome p {
  max-width: 860px;
}

.onboarding-check-grid,
.team-snapshot-grid,
.contact-grid {
  display: grid;
  gap: 12px;
}

.onboarding-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1040px;
}

.onboarding-check-grid label,
.team-snapshot-grid article,
.contact-grid section {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.onboarding-check-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink);
  line-height: 1.4;
}

.onboarding-check-grid input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-600);
}

.onboarding-link-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.onboarding-link-list.inline-links {
  margin-top: 24px;
}

.onboarding-link-list a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(47, 165, 204, 0.22);
  border-radius: var(--radius-control);
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 780;
}

.onboarding-link-list a:hover,
.onboarding-link-list a:focus-visible {
  border-color: var(--primary-200);
  background: var(--primary-600);
  color: white;
  outline: 0;
}

.compact-principles {
  grid-template-columns: 1fr;
}

.team-snapshot-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.team-snapshot-grid article {
  display: grid;
  gap: 5px;
  min-height: 78px;
}

.team-snapshot-grid strong {
  color: var(--ink);
  line-height: 1.1;
}

.team-snapshot-grid span,
.contact-grid p {
  color: var(--muted);
  line-height: 1.35;
}

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

.contact-grid section {
  min-height: 150px;
}

.contact-grid h3 {
  margin: 0 0 8px;
  color: var(--primary-700);
}

.compact-conduct {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  max-width: none;
}

.compact-week-list {
  gap: 10px;
}

.compact-week-list li {
  padding: 12px;
}

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

.error {
  color: #7a2f20;
}

.waivey-widget {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 1400;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.waivey-toggle {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--primary-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow-hover);
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.waivey-toggle img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.waivey-toggle span {
  font-weight: 800;
}

.waivey-panel {
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(22px);
}

.waivey-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(232, 245, 250, 0.95), rgba(255, 255, 255, 0.88));
}

.waivey-header h2 {
  margin: 0;
}

.waivey-header .eyebrow {
  margin-bottom: 4px;
}

.waivey-header button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  cursor: pointer;
}

.waivey-log {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 16px;
}

.waivey-message {
  display: grid;
  gap: 6px;
}

.waivey-message.user {
  justify-items: end;
}

.waivey-bubble {
  max-width: 92%;
  white-space: pre-line;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--ink);
  line-height: 1.42;
}

.waivey-message.user .waivey-bubble {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  color: white;
  border-color: transparent;
}

.waivey-bubble a {
  color: var(--primary-700);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.waivey-message.user .waivey-bubble a {
  color: white;
}

.waivey-sources,
.waivey-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.waivey-sources {
  padding-left: 2px;
}

.waivey-sources a,
.waivey-suggestions button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--primary-200);
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 0.82rem;
}

.waivey-suggestions {
  padding: 0 16px 14px;
}

.waivey-suggestions button {
  cursor: pointer;
}

.waivey-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.waivey-form input {
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.pmo-hero,
.pmo-profile-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-end;
}

.pmo-hero p,
.pmo-profile-header p {
  max-width: 780px;
}

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

.pmo-workspace,
.pmo-gantt-shell,
.pmo-profile-header,
.pmo-info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.pmo-workspace,
.pmo-gantt-shell,
.pmo-info-card {
  padding: 22px;
}

.pmo-profile-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: clamp(24px, 4vw, 36px);
}

.pmo-profile-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.pmo-profile-actions,
.pmo-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pmo-chip-row {
  margin-top: 14px;
}

.pmo-project-people {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 12px;
}

.pmo-project-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  backdrop-filter: blur(10px);
}

.pmo-project-person img,
.pmo-project-person > span {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.pmo-project-person img {
  object-fit: cover;
}

.pmo-project-person > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--primary-900);
  font-weight: 850;
}

.pmo-project-person small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 760;
}

.pmo-chip-row > span,
.pmo-chip-row > strong {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
}

.pmo-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.pmo-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pmo-toolbar span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pmo-toolbar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.pmo-table-wrap {
  overflow-x: auto;
}

.pmo-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

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

.pmo-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248, 250, 252, 0.96);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pmo-table td small,
.pmo-stack-item small,
.pmo-gantt-meta small,
.pmo-gantt-detail {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.pmo-project-link {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 800;
}

.status-badge,
.priority-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-green {
  background: rgba(38, 132, 96, 0.12);
  color: #1d6b4d;
}

.status-yellow {
  background: rgba(183, 121, 31, 0.16);
  color: #8a5a12;
}

.status-red {
  background: rgba(200, 85, 61, 0.14);
  color: #8e3827;
}

.priority-low,
.priority-medium {
  background: var(--slate-100);
  color: var(--slate-700);
}

.priority-high {
  background: var(--primary-50);
  color: var(--primary-700);
}

.priority-critical {
  background: rgba(200, 85, 61, 0.14);
  color: #8e3827;
}

.pmo-progress {
  width: 94px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.pmo-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-700), var(--primary-400));
}

.criticality-score {
  min-width: 44px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  background: var(--slate-900);
  color: white;
}

.pmo-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.pmo-profile-grid .pmo-info-card:first-child {
  grid-column: span 2;
}

.pmo-rbd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.pmo-info-card h2,
.pmo-info-card h3 {
  margin: 0;
}

.pmo-info-card h3 {
  margin-top: 16px;
  font-size: 0.92rem;
}

.pmo-info-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.pmo-info-card p {
  color: var(--muted);
  line-height: 1.5;
}

.pmo-facts {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.pmo-facts div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.pmo-facts dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pmo-facts dd {
  margin: 0;
  font-weight: 740;
}

.pmo-stack-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.pmo-stack-item:first-of-type {
  border-top: 0;
}

.pmo-stack-item p {
  margin: 6px 0;
}

.pmo-gantt-shell {
  margin-top: 18px;
}

.pmo-gantt-axis {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 8px 260px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

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

.pmo-gantt-row {
  display: grid;
  grid-template-columns: 250px minmax(260px, 1fr) 190px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.pmo-gantt-track {
  position: relative;
  height: 32px;
  border-radius: var(--radius-control);
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    var(--slate-100);
  background-size: 8.33% 100%, auto;
}

.pmo-gantt-bar {
  position: absolute;
  top: 6px;
  min-width: 14px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-500);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(47, 165, 204, 0.18);
}

.pmo-gantt-bar.critical {
  background: var(--coral);
  box-shadow: 0 8px 22px rgba(200, 85, 61, 0.22);
}

.pmo-gantt-bar.blocked {
  outline: 3px solid rgba(200, 85, 61, 0.22);
}

.pmo-gantt-bar.milestone {
  width: 20px !important;
  height: 20px;
  border-radius: 4px;
  transform: rotate(45deg);
}

.pmo-gantt-bar.milestone span {
  font-size: 0;
}

.pmo-gantt-detail {
  display: grid;
  gap: 3px;
}

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

.pmo-mapping-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.pmo-mapping-grid h3 {
  margin: 0 0 8px;
}

.pmo-mapping-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.pmo-portfolio-hero,
.pmo-project-hero {
  position: relative;
  overflow: hidden;
  align-items: stretch;
  min-height: 260px;
  padding: clamp(28px, 5vw, 54px);
  color: white;
  background:
    linear-gradient(115deg, rgba(20, 61, 77, 0.96) 0%, rgba(29, 99, 122, 0.92) 45%, rgba(47, 165, 204, 0.82) 100%),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover no-repeat;
  border-color: rgba(255, 255, 255, 0.2);
}

.pmo-portfolio-hero::after,
.pmo-project-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -24% 42%;
  height: 68%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px 0 0 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
  transform: rotate(-8deg);
  pointer-events: none;
}

.pmo-portfolio-hero > *,
.pmo-project-hero > * {
  position: relative;
  z-index: 1;
}

.pmo-portfolio-hero h1,
.pmo-project-hero h1 {
  max-width: 900px;
  color: white;
}

.pmo-portfolio-hero p,
.pmo-project-hero p,
.pmo-portfolio-hero .eyebrow,
.pmo-project-hero .eyebrow,
.pmo-project-hero .eyebrow a {
  color: rgba(255, 255, 255, 0.82);
}

.pmo-portfolio-hero .primary-action,
.pmo-project-hero .primary-action {
  background: white;
  color: var(--primary-900);
  border-color: white;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24);
}

.pmo-portfolio-hero .secondary-action,
.pmo-project-hero .secondary-action {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border-color: rgba(255, 255, 255, 0.34);
}

.pmo-hero-signal,
.pmo-project-signal {
  width: min(320px, 100%);
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(14px);
}

.pmo-hero-signal span,
.pmo-project-signal span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pmo-hero-signal strong,
.pmo-project-signal strong {
  color: white;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 0.95;
}

.pmo-hero-signal small,
.pmo-project-signal small {
  color: rgba(255, 255, 255, 0.78);
}

.pmo-hero-signal .hero-actions,
.pmo-project-signal .pmo-profile-actions {
  margin-top: 12px;
}

.pmo-metrics,
.pmo-profile-metrics {
  gap: 14px;
}

.pmo-metric {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 20px;
  border-color: rgba(47, 165, 204, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 245, 250, 0.72));
}

.pmo-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--primary-500);
}

.pmo-metric::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -38px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(47, 165, 204, 0.12);
}

.pmo-metric small {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--primary-700);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pmo-metric span,
.pmo-metric p {
  position: relative;
  z-index: 1;
}

.pmo-metric.risk::before,
.pmo-metric.risk span {
  color: var(--amber);
}

.pmo-metric.risk::before {
  background: var(--amber);
}

.pmo-metric.critical::before {
  background: var(--coral);
}

.pmo-metric.critical span {
  color: var(--coral);
}

.pmo-metric.attention::before {
  background: var(--violet);
}

.pmo-metric.attention span {
  color: var(--violet);
}

.pmo-workspace {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.pmo-workspace-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 24px 24px 18px;
  background:
    linear-gradient(90deg, rgba(232, 245, 250, 0.92), rgba(255, 255, 255, 0.9)),
    linear-gradient(90deg, var(--primary-600), var(--primary-400));
  border-bottom: 1px solid rgba(47, 165, 204, 0.16);
}

.pmo-workspace-heading h2 {
  margin: 0;
}

.pmo-workspace-heading > span {
  max-width: 300px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.pmo-toolbar {
  margin: 0;
  padding: 18px 24px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.pmo-toolbar select {
  border-color: rgba(47, 165, 204, 0.22);
  background:
    linear-gradient(180deg, white, rgba(248, 250, 252, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.pmo-table-wrap {
  padding: 0 0 8px;
  overflow-x: auto;
  scrollbar-color: var(--primary-400) rgba(232, 245, 250, 0.78);
}

.pmo-table {
  min-width: 1610px;
  table-layout: fixed;
}

.pmo-col-project {
  width: 320px;
}

.pmo-col-lead {
  width: 190px;
}

.pmo-col-department {
  width: 190px;
}

.pmo-col-phase,
.pmo-col-status,
.pmo-col-priority {
  width: 104px;
}

.pmo-col-date {
  width: 118px;
}

.pmo-col-budget,
.pmo-col-progress,
.pmo-col-criticality {
  width: 108px;
}

.pmo-col-count {
  width: 84px;
}

.pmo-table th {
  position: static;
  z-index: auto;
  min-height: 44px;
  padding-top: 15px;
  padding-bottom: 15px;
  background: rgba(20, 61, 77, 0.96);
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pmo-table tbody tr {
  position: relative;
  background: rgba(255, 255, 255, 0.88);
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pmo-table tbody tr:hover {
  background: white;
  box-shadow: inset 0 0 0 999px rgba(232, 245, 250, 0.45);
}

.pmo-table tbody td:first-child {
  border-left: 6px solid var(--primary-500);
}

.pmo-table td {
  overflow-wrap: anywhere;
}

.pmo-table td:nth-child(11),
.pmo-table td:nth-child(12),
.pmo-table td:nth-child(13),
.pmo-table td:nth-child(14) {
  text-align: center;
}

.pmo-table .pmo-row-status-green td:first-child {
  border-left-color: var(--success);
}

.pmo-table .pmo-row-status-yellow td:first-child {
  border-left-color: var(--amber);
}

.pmo-table .pmo-row-status-red td:first-child {
  border-left-color: var(--coral);
}

.pmo-project-link {
  color: var(--primary-900);
}

.pmo-project-link:hover,
.pmo-project-link:focus-visible {
  color: var(--primary-500);
}

.pmo-timeline-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 9px;
  border: 1px solid rgba(47, 165, 204, 0.24);
  border-radius: 999px;
  background: rgba(232, 245, 250, 0.82);
  color: var(--primary-700);
  font-size: 0.78rem;
  font-weight: 800;
}

.pmo-timeline-link:hover,
.pmo-timeline-link:focus-visible {
  background: var(--primary-600);
  color: white;
  outline: 0;
}

.status-badge,
.priority-badge {
  border: 1px solid currentColor;
}

.status-green {
  background: rgba(38, 132, 96, 0.13);
  color: var(--success);
}

.status-yellow {
  background: rgba(183, 121, 31, 0.16);
  color: var(--amber);
}

.status-red {
  background: rgba(200, 85, 61, 0.14);
  color: var(--coral);
}

.priority-high {
  background: rgba(47, 165, 204, 0.12);
  color: var(--primary-700);
}

.priority-critical {
  background: rgba(200, 85, 61, 0.14);
  color: var(--coral);
}

.criticality-score {
  background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
  box-shadow: 0 12px 24px rgba(20, 61, 77, 0.2);
}

.pmo-profile-grid,
.pmo-rbd-grid {
  align-items: stretch;
}

.pmo-project-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.8fr);
  gap: 16px;
  margin-top: 18px;
}

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

.pmo-public-profile-hero .pmo-project-signal {
  min-height: 180px;
}

.pmo-cockpit-brief,
.pmo-cockpit-facts {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(47, 165, 204, 0.14);
  border-radius: var(--radius-shell);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-shell);
  backdrop-filter: blur(18px);
}

.pmo-cockpit-brief::before,
.pmo-cockpit-facts::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
}

.pmo-cockpit-brief h2,
.pmo-cockpit-facts h2,
.pmo-cockpit-brief h3,
.pmo-cockpit-facts h3 {
  margin: 0;
}

.pmo-cockpit-brief h3,
.pmo-cockpit-facts h3 {
  margin-top: 16px;
  font-size: 0.92rem;
}

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

.pmo-brief-grid section {
  padding: 14px;
  border: 1px solid rgba(47, 165, 204, 0.12);
  border-radius: var(--radius-panel);
  background: rgba(248, 250, 252, 0.76);
}

.pmo-brief-grid ul,
.pmo-cockpit-facts ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.pmo-brief-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.pmo-info-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(47, 165, 204, 0.14);
}

.pmo-info-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
}

.pmo-rbd-grid .pmo-info-card:nth-child(1)::before {
  background: linear-gradient(90deg, var(--amber), #e1a941);
}

.pmo-rbd-grid .pmo-info-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--coral), #de806c);
}

.pmo-rbd-grid .pmo-info-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--violet), #8f7fe4);
}

.pmo-gantt-shell {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.93);
}

.pmo-gantt-shell > .section-heading {
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(20, 61, 77, 0.96), rgba(38, 132, 163, 0.9)),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover no-repeat;
  color: white;
}

.pmo-gantt-shell > .section-heading .eyebrow,
.pmo-gantt-shell > .section-heading p {
  color: rgba(255, 255, 255, 0.78);
}

.pmo-gantt-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pmo-gantt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.8rem;
  font-weight: 760;
}

.pmo-gantt-legend i {
  width: 18px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary-400);
}

.pmo-gantt-legend .legend-critical {
  background: var(--coral);
}

.pmo-gantt-legend .legend-blocked {
  background: repeating-linear-gradient(45deg, var(--coral) 0 4px, #f6b4a8 4px 8px);
}

.pmo-gantt-legend .legend-done {
  background: var(--success);
}

.pmo-gantt-legend .legend-milestone {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--amber);
  transform: rotate(45deg);
}

.pmo-gantt-legend .legend-today {
  width: 2px;
  height: 18px;
  border-radius: 0;
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.18);
}

.pmo-gantt-shell .segmented-control {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
}

.pmo-gantt-control-stack {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.pmo-gantt-shell .segmented-control button {
  color: rgba(255, 255, 255, 0.82);
  min-width: 96px;
}

.pmo-gantt-shell .segmented-control button.active,
.pmo-gantt-shell .segmented-control button:hover {
  background: white;
  color: var(--primary-900);
}

.pmo-gantt-board {
  --gantt-left: 330px;
  --gantt-right: 210px;
  --gantt-gap: 12px;
  --gantt-track-width: 720px;
  overflow-x: auto;
  padding: 0 0 24px;
  background: #ffffff;
  scrollbar-color: var(--primary-400) rgba(232, 245, 250, 0.78);
}

.pmo-gantt-axis {
  position: relative;
  display: block;
  width: var(--gantt-track-width);
  height: 32px;
  margin: 20px 0 8px calc(var(--gantt-left) + var(--gantt-gap));
  padding: 0;
  border-bottom: 1px solid rgba(47, 165, 204, 0.18);
}

.pmo-gantt-axis span {
  position: absolute;
  bottom: 6px;
  transform: translateX(-50%);
  white-space: nowrap;
  color: var(--primary-700);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.pmo-gantt-today-label {
  position: absolute;
  top: -4px;
  z-index: 3;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--violet);
  color: white;
  font-size: 0.68rem;
  font-weight: 840;
  line-height: 1;
  transform: translateX(-50%);
  box-shadow: 0 10px 20px rgba(109, 91, 208, 0.28);
}

.pmo-gantt-today-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 18px;
  background: var(--violet);
  transform: translateX(-50%);
}

.pmo-gantt-list {
  position: relative;
  padding: 0;
  width: max-content;
  min-width: 100%;
}

.pmo-gantt-dependencies {
  position: absolute;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.pmo-gantt-dependency-path {
  fill: none;
  stroke: var(--violet);
  stroke-width: 2;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  stroke-dasharray: 5 5;
  opacity: 0.72;
}

.pmo-gantt-dependency-path.critical {
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-dasharray: none;
  opacity: 0.86;
}

.pmo-gantt-dependency-path.done {
  stroke: var(--success);
  stroke-width: 2.4;
  stroke-dasharray: none;
  opacity: 0.82;
}

.pmo-gantt-dependency-path.blocked {
  stroke: var(--coral);
  stroke-width: 2.7;
  stroke-dasharray: none;
  opacity: 0.92;
}

.pmo-gantt-dependency-path.not-started {
  stroke: #94a3b8;
  stroke-width: 2;
  stroke-dasharray: 4 6;
  opacity: 0.64;
}

.pmo-gantt-row {
  position: relative;
  grid-template-columns: calc(var(--gantt-left) + var(--gantt-gap)) var(--gantt-track-width) var(--gantt-right);
  gap: 0;
  align-items: center;
  width: max-content;
  min-width: 100%;
  padding: 0;
  border-color: rgba(47, 165, 204, 0.14);
  background: white;
  overflow: visible;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.pmo-gantt-row[hidden] {
  display: none !important;
}

.pmo-gantt-row.is-critical {
  border-color: rgba(200, 85, 61, 0.34);
  background: linear-gradient(90deg, rgba(200, 85, 61, 0.08), white 28%);
}

.pmo-gantt-row.is-blocked {
  box-shadow: inset 4px 0 0 var(--coral), 0 12px 28px rgba(15, 23, 42, 0.05);
}

.pmo-gantt-row.is-done {
  border-color: rgba(38, 132, 96, 0.32);
  background: linear-gradient(90deg, rgba(38, 132, 96, 0.08), white 28%);
}

.pmo-gantt-row.is-not-started {
  border-color: rgba(100, 116, 139, 0.22);
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.09), white 28%);
}

.pmo-gantt-row.is-impacted {
  border-color: rgba(200, 85, 61, 0.28);
  background: linear-gradient(90deg, rgba(200, 85, 61, 0.07), white 30%);
}

.pmo-gantt-row:focus-visible {
  outline: 3px solid rgba(47, 165, 204, 0.28);
  outline-offset: 2px;
}

.pmo-gantt-meta strong {
  color: var(--primary-900);
}

.pmo-gantt-meta {
  position: sticky;
  left: 0;
  z-index: 8;
  align-self: stretch;
  display: grid;
  align-content: center;
  width: calc(var(--gantt-left) + var(--gantt-gap));
  min-width: calc(var(--gantt-left) + var(--gantt-gap));
  padding: 16px calc(18px + var(--gantt-gap)) 16px 24px;
  border-right: 1px solid rgba(47, 165, 204, 0.16);
  background: #ffffff;
  box-shadow: 24px 0 28px #ffffff;
  overflow: hidden;
}

.pmo-gantt-meta strong,
.pmo-gantt-meta small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.pmo-gantt-row.is-critical .pmo-gantt-meta {
  background: linear-gradient(90deg, #fff1ed, #ffffff 72%);
  box-shadow: 24px 0 28px #ffffff;
}

.pmo-gantt-row.is-blocked .pmo-gantt-meta {
  background: linear-gradient(90deg, #ffede8, #ffffff 72%);
  box-shadow: 24px 0 28px #ffffff;
}

.pmo-gantt-row.is-done .pmo-gantt-meta {
  background: linear-gradient(90deg, #eefaf3, #ffffff 72%);
  box-shadow: 24px 0 28px #ffffff;
}

.pmo-gantt-row.is-not-started .pmo-gantt-meta {
  background: linear-gradient(90deg, #f1f5f9, #ffffff 72%);
  box-shadow: 24px 0 28px #ffffff;
}

.pmo-gantt-row.is-impacted .pmo-gantt-meta {
  background: linear-gradient(90deg, #fff1ed, #ffffff 72%);
  box-shadow: 24px 0 28px #ffffff;
}

.pmo-task-state {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(47, 165, 204, 0.2);
  border-radius: 999px;
  background: rgba(232, 245, 250, 0.76);
  color: var(--primary-700);
  font-size: 0.72rem;
  font-weight: 820;
}

.pmo-task-state.done {
  border-color: rgba(38, 132, 96, 0.28);
  background: rgba(38, 132, 96, 0.12);
  color: var(--success);
}

.pmo-task-state.blocked {
  border-color: rgba(200, 85, 61, 0.28);
  background: rgba(200, 85, 61, 0.12);
  color: var(--coral);
}

.pmo-gantt-row.is-impacted .pmo-task-state:not(.blocked),
.pmo-task-state.impacted {
  border-color: rgba(200, 85, 61, 0.22);
  background: rgba(200, 85, 61, 0.1);
  color: var(--coral);
}

.pmo-task-state.not-started {
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.pmo-task-state.critical {
  border-color: rgba(183, 121, 31, 0.28);
  background: rgba(183, 121, 31, 0.12);
  color: var(--amber);
}

.pmo-gantt-track {
  position: relative;
  z-index: 4;
  height: 38px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(232, 245, 250, 0.82), rgba(241, 245, 249, 0.92));
}

.pmo-gantt-detail {
  padding: 12px 16px 12px 12px;
}

.pmo-gantt-month-line {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 1px;
  background: rgba(47, 165, 204, 0.18);
  pointer-events: none;
}

.pmo-gantt-today-line {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 2px;
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.12);
  pointer-events: none;
}

@keyframes pmo-today-line-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.12);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(109, 91, 208, 0.22);
  }
}

@keyframes pmo-today-label-pulse {
  0%,
  100% {
    box-shadow: 0 10px 20px rgba(109, 91, 208, 0.28);
  }

  50% {
    box-shadow: 0 14px 28px rgba(109, 91, 208, 0.44);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pmo-gantt-today-line,
  .pmo-dhtmlx-gantt .gantt_marker.pmo-dhtmlx-today {
    animation: pmo-today-line-pulse 1.8s ease-in-out infinite;
  }

  .pmo-gantt-today-label,
  .pmo-dhtmlx-gantt .gantt_marker.pmo-dhtmlx-today .gantt_marker_content {
    animation: pmo-today-label-pulse 1.8s ease-in-out infinite;
  }
}

.pmo-gantt-bar {
  z-index: 6;
  top: 8px;
  height: 22px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
  box-shadow: 0 10px 20px rgba(47, 165, 204, 0.24);
}

.pmo-gantt-bar.critical {
  background: linear-gradient(90deg, var(--coral), #de806c);
  box-shadow: 0 10px 22px rgba(200, 85, 61, 0.28);
}

.pmo-gantt-bar.blocked {
  outline: 3px solid rgba(200, 85, 61, 0.24);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 5px, transparent 5px 10px), linear-gradient(90deg, var(--coral), #de806c);
}

.pmo-gantt-bar.done {
  background: linear-gradient(90deg, var(--success), #49a678);
  box-shadow: 0 10px 20px rgba(38, 132, 96, 0.24);
}

.pmo-gantt-bar.not-started:not(.milestone) {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1);
  box-shadow: 0 10px 20px rgba(100, 116, 139, 0.16);
}

.pmo-gantt-bar.milestone {
  background: var(--amber);
  box-shadow: 0 10px 20px rgba(183, 121, 31, 0.22);
}

.pmo-gantt-row.is-impacted .pmo-gantt-bar:not(.blocked) {
  background: linear-gradient(90deg, var(--coral), #de806c);
  box-shadow: 0 10px 22px rgba(200, 85, 61, 0.24);
}

.pmo-dhtmlx-gantt-shell {
  min-height: 0;
  padding: 12px;
  border-top: 1px solid rgba(47, 165, 204, 0.12);
  background:
    linear-gradient(180deg, rgba(232, 245, 250, 0.62), rgba(255, 255, 255, 0.96) 26%),
    #ffffff;
}

.pmo-dhtmlx-gantt {
  width: 100%;
  height: 424px;
  min-height: 250px;
  max-height: 620px;
  border: 1px solid rgba(47, 165, 204, 0.16);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.pmo-dhtmlx-gantt .gantt_container {
  border: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
}

.pmo-dhtmlx-gantt .gantt_layout_cell,
.pmo-dhtmlx-gantt .gantt_grid,
.pmo-dhtmlx-gantt .gantt_task {
  background: #ffffff;
}

.pmo-dhtmlx-gantt .gantt_hor_scroll,
.pmo-dhtmlx-gantt .gantt_hor_scroll .gantt_layout_content {
  border-bottom: 1px solid rgba(47, 165, 204, 0.12);
  background: rgba(232, 245, 250, 0.78);
}

.pmo-dhtmlx-gantt .gantt_grid_scale,
.pmo-dhtmlx-gantt .gantt_task_scale {
  border-color: rgba(47, 165, 204, 0.14);
  background:
    linear-gradient(90deg, rgba(20, 61, 77, 0.96), rgba(38, 132, 163, 0.9)),
    var(--primary-900);
  color: rgba(255, 255, 255, 0.9);
}

.pmo-dhtmlx-gantt .gantt_grid_head_cell,
.pmo-dhtmlx-gantt .gantt_scale_cell {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.73rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pmo-dhtmlx-gantt .gantt_grid_data .gantt_row,
.pmo-dhtmlx-gantt .gantt_task_row {
  border-color: rgba(47, 165, 204, 0.12);
}

.pmo-dhtmlx-gantt .gantt_task_row {
  background:
    linear-gradient(180deg, rgba(232, 245, 250, 0.72), rgba(241, 245, 249, 0.88));
}

.pmo-dhtmlx-gantt .gantt_task_row.odd {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.pmo-dhtmlx-gantt .gantt_task_cell {
  border-color: rgba(47, 165, 204, 0.15);
}

.pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-critical,
.pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-critical {
  background: linear-gradient(90deg, rgba(200, 85, 61, 0.08), rgba(255, 255, 255, 0.94) 34%);
}

.pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-done,
.pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-done {
  background: linear-gradient(90deg, rgba(38, 132, 96, 0.08), rgba(255, 255, 255, 0.94) 34%);
}

.pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-blocked,
.pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-blocked,
.pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-impacted,
.pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-impacted {
  background: linear-gradient(90deg, rgba(200, 85, 61, 0.12), rgba(255, 255, 255, 0.94) 38%);
}

.pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-not-started,
.pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-not-started {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12), rgba(255, 255, 255, 0.95) 36%);
}

.pmo-dhtmlx-grid-title {
  display: grid;
  align-content: center;
  min-height: 48px;
  padding: 4px 0;
  line-height: 1.2;
}

.pmo-dhtmlx-grid-title strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--primary-900);
  font-size: 0.9rem;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmo-dhtmlx-grid-title span {
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmo-dhtmlx-state {
  display: inline-flex;
  align-items: center;
  max-width: 108px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(47, 165, 204, 0.2);
  border-radius: 999px;
  background: rgba(232, 245, 250, 0.82);
  color: var(--primary-700);
  font-size: 0.7rem;
  font-weight: 840;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmo-dhtmlx-state.done {
  border-color: rgba(38, 132, 96, 0.28);
  background: rgba(38, 132, 96, 0.12);
  color: var(--success);
}

.pmo-dhtmlx-state.blocked {
  border-color: rgba(200, 85, 61, 0.28);
  background: rgba(200, 85, 61, 0.12);
  color: var(--coral);
}

.pmo-dhtmlx-state.not-started {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.pmo-dhtmlx-state.critical {
  border-color: rgba(183, 121, 31, 0.28);
  background: rgba(183, 121, 31, 0.12);
  color: var(--amber);
}

.pmo-dhtmlx-state.milestone {
  border-color: rgba(183, 121, 31, 0.28);
  background: rgba(183, 121, 31, 0.12);
  color: var(--amber);
}

.pmo-dhtmlx-gantt .gantt_task_line {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400)) !important;
  box-shadow: 0 10px 20px rgba(47, 165, 204, 0.24);
}

.pmo-dhtmlx-gantt .gantt_task_line .gantt_task_content {
  color: white;
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 24px;
  text-shadow: 0 1px 8px rgba(15, 23, 42, 0.18);
}

.pmo-dhtmlx-gantt .gantt_task_progress {
  border-radius: 999px 0 0 999px;
  background: rgba(255, 255, 255, 0.2) !important;
}

.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-critical {
  background: linear-gradient(90deg, var(--coral), #de806c) !important;
  box-shadow: 0 10px 22px rgba(200, 85, 61, 0.28);
}

.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-blocked {
  outline: 3px solid rgba(200, 85, 61, 0.22);
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 5px, transparent 5px 10px),
    linear-gradient(90deg, var(--coral), #de806c) !important;
  box-shadow: 0 10px 22px rgba(200, 85, 61, 0.3);
}

.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-impacted {
  background: linear-gradient(90deg, var(--coral), #de806c) !important;
  box-shadow: 0 10px 22px rgba(200, 85, 61, 0.24);
}

.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-done {
  background: linear-gradient(90deg, var(--success), #49a678) !important;
  box-shadow: 0 10px 20px rgba(38, 132, 96, 0.24);
}

.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-not-started {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1) !important;
  box-shadow: 0 10px 20px rgba(100, 116, 139, 0.16);
}

.pmo-dhtmlx-gantt .gantt_task_line.gantt_milestone,
.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-milestone {
  width: 18px !important;
  height: 18px !important;
  margin-top: 3px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 5px;
  background: var(--amber) !important;
  box-shadow: 0 8px 18px rgba(183, 121, 31, 0.24);
  transform: rotate(45deg);
}

.pmo-dhtmlx-gantt .gantt_task_line.gantt_milestone .gantt_task_content,
.pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-milestone .gantt_task_content {
  display: none;
}

.pmo-dhtmlx-gantt .gantt_task_link {
  --pmo-gantt-link-color: var(--violet);
  --dhx-gantt-link-background: var(--pmo-gantt-link-color);
  --dhx-gantt-link-background-hover: var(--pmo-gantt-link-color);
}

.pmo-dhtmlx-gantt .gantt_task_link.pmo-dhtmlx-link-critical,
.pmo-dhtmlx-gantt .gantt_task_link.pmo-dhtmlx-link-blocked {
  --pmo-gantt-link-color: var(--coral);
}

.pmo-dhtmlx-gantt .gantt_task_link.pmo-dhtmlx-link-done {
  --pmo-gantt-link-color: var(--success);
}

.pmo-dhtmlx-gantt .gantt_task_link.pmo-dhtmlx-link-not-started {
  --pmo-gantt-link-color: #94a3b8;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_line_wrapper > div {
  background-color: var(--pmo-gantt-link-color) !important;
  border-color: var(--pmo-gantt-link-color) !important;
  border-radius: 0 !important;
  opacity: 0.78;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_corner {
  border-color: var(--pmo-gantt-link-color) !important;
  border-radius: 0 !important;
  opacity: 0.78;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_arrow {
  color: var(--pmo-gantt-link-color) !important;
  border-color: var(--pmo-gantt-link-color) !important;
  opacity: 0.84;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_arrow::before {
  color: var(--pmo-gantt-link-color) !important;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_arrow_right {
  border-left-color: var(--pmo-gantt-link-color) !important;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_arrow_left {
  border-right-color: var(--pmo-gantt-link-color) !important;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_arrow_up {
  border-bottom-color: var(--pmo-gantt-link-color) !important;
}

.pmo-dhtmlx-gantt .gantt_task_link .gantt_link_arrow_down {
  border-top-color: var(--pmo-gantt-link-color) !important;
}

.pmo-dhtmlx-gantt .gantt_marker.pmo-dhtmlx-today {
  width: 2px;
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.16);
}

.pmo-dhtmlx-gantt .gantt_marker.pmo-dhtmlx-today .gantt_marker_content {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--violet);
  color: white;
  font-size: 0.68rem;
  font-weight: 840;
  transform: translateX(-45%);
  box-shadow: 0 10px 20px rgba(109, 91, 208, 0.28);
}

.gantt_tooltip {
  display: none !important;
}

.payload-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 40px));
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--panel-strong);
  box-shadow: var(--shadow-shell);
}

.payload-dialog::backdrop {
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(4px);
}

.payload-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.payload-dialog h2 {
  margin: 0;
}

.payload-dialog pre {
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius-control);
  background: var(--slate-900);
  color: white;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--slate-900);
  color: white;
  box-shadow: var(--shadow-card);
}

.toast.error {
  background: #8e3827;
}

.aws-monitor-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: end;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(29, 99, 122, 0.92) 48%, rgba(38, 132, 96, 0.78)),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover no-repeat;
  border-color: rgba(255, 255, 255, 0.18);
}

.aws-monitor-hero h1,
.aws-monitor-hero p,
.aws-monitor-hero .eyebrow {
  color: white;
}

.aws-monitor-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.aws-monitor-controls {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.aws-monitor-controls label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.aws-monitor-controls select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-control);
  padding: 9px 10px;
  background: white;
  color: var(--ink);
}

.aws-monitor-controls .secondary-action {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border-color: rgba(255, 255, 255, 0.32);
}

.aws-monitor-status,
.aws-monitor-panel,
.aws-monitor-kpis article,
.aws-monitor-tabs button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.aws-monitor-status {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 18px;
}

.aws-monitor-status small {
  color: var(--muted);
}

.aws-monitor-tabs {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.aws-monitor-tabs button {
  min-width: 220px;
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.aws-monitor-tabs button.active {
  border-color: rgba(47, 165, 204, 0.45);
  background: linear-gradient(145deg, white, var(--primary-50));
  box-shadow: var(--shadow-hover);
}

.aws-monitor-tabs span,
.aws-monitor-kpis span,
.aws-monitor-table small {
  color: var(--muted);
  font-size: 0.82rem;
}

.aws-monitor-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.aws-monitor-kpis article {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 18px;
}

.aws-monitor-kpis article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--primary-500);
}

.aws-monitor-kpis article.attention::before,
.aws-monitor-kpis article.critical::before {
  background: var(--coral);
}

.aws-monitor-kpis article.runtime::before {
  background: var(--violet);
}

.aws-monitor-kpis article.data::before {
  background: var(--success);
}

.aws-monitor-kpis small {
  display: block;
  color: var(--primary-700);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.aws-monitor-kpis strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
}

.aws-monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

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

.aws-monitor-panel {
  padding: 22px;
}

.aws-monitor-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.aws-monitor-panel-head h2 {
  margin: 0;
}

.aws-monitor-panel-head > span {
  color: var(--primary-700);
  font-size: 1.6rem;
  font-weight: 850;
}

.aws-monitor-bars {
  height: 210px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(47, 165, 204, 0.14);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, rgba(47, 165, 204, 0.08) 1px, transparent 1px),
    rgba(248, 250, 252, 0.9);
  background-size: 100% 25%;
}

.aws-monitor-bar {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.aws-monitor-bar span {
  display: block;
  min-height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, var(--primary-400), var(--primary-700));
  box-shadow: 0 8px 20px rgba(47, 165, 204, 0.2);
}

.aws-monitor-bar small {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.aws-monitor-service-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.aws-monitor-service-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 84px;
  gap: 10px;
  align-items: center;
}

.aws-monitor-service-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--slate-700);
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aws-monitor-service-row div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.aws-monitor-service-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), var(--primary-400));
}

.aws-monitor-region-grid {
  display: grid;
  gap: 12px;
}

.aws-monitor-region-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.aws-monitor-region-grid h3 {
  margin: 0 0 10px;
}

.aws-monitor-region-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.aws-monitor-region-grid span {
  color: var(--muted);
}

.aws-monitor-table-wrap {
  overflow-x: auto;
}

.aws-monitor-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
}

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

.aws-monitor-table th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.aws-monitor-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.aws-monitor-pill.green {
  background: rgba(38, 132, 96, 0.12);
  color: #1d6b4d;
}

.aws-monitor-pill.red {
  background: rgba(200, 85, 61, 0.14);
  color: #8e3827;
}

.aws-monitor-pill.blue {
  background: var(--primary-50);
  color: var(--primary-700);
}

.aws-monitor-pill.neutral {
  background: var(--slate-100);
  color: var(--slate-700);
}

.aws-monitor-alerts {
  margin-top: 18px;
}

.aws-monitor-alert-list {
  display: grid;
  gap: 10px;
}

.aws-monitor-alert-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.aws-monitor-alert-list article.critical {
  border-color: rgba(200, 85, 61, 0.28);
  background: rgba(200, 85, 61, 0.07);
}

.aws-monitor-alert-list article.limited {
  border-color: rgba(183, 121, 31, 0.26);
  background: rgba(183, 121, 31, 0.08);
}

.aws-monitor-alert-list span,
.aws-monitor-alert-list p {
  color: var(--muted);
}

.aws-monitor-empty,
.aws-monitor-error,
.aws-monitor-empty-cell {
  padding: 14px;
  color: var(--muted);
}

.aws-monitor-error {
  border: 1px solid rgba(200, 85, 61, 0.22);
  border-radius: var(--radius-control);
  background: rgba(200, 85, 61, 0.08);
  color: #8e3827;
}

.godzilla-hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 28px;
  align-items: end;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 82% 22%, rgba(124, 210, 156, 0.32), transparent 34%),
    linear-gradient(120deg, rgba(15, 23, 42, 0.97), rgba(20, 61, 77, 0.94) 52%, rgba(38, 132, 96, 0.84)),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover no-repeat;
  border-color: rgba(255, 255, 255, 0.18);
}

.godzilla-hero h1,
.godzilla-hero p,
.godzilla-hero .eyebrow {
  color: white;
}

.godzilla-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.godzilla-avatar-card {
  position: relative;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-shell);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.godzilla-avatar-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-shell) - 6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.godzilla-avatar-card img {
  width: 138px;
  height: 138px;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.24));
}

.godzilla-avatar-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.godzilla-avatar-card strong {
  display: block;
  color: white;
  font-size: 1.35rem;
}

.godzilla-avatar-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.godzilla-avatar-card[data-godzilla-state="happy"] {
  box-shadow: 0 22px 58px rgba(46, 204, 113, 0.22);
}

.godzilla-avatar-card[data-godzilla-state="neutral"],
.godzilla-avatar-card[data-godzilla-state="stale"] {
  box-shadow: 0 22px 58px rgba(47, 165, 204, 0.22);
}

.godzilla-avatar-card[data-godzilla-state="crying"] {
  box-shadow: 0 22px 58px rgba(200, 85, 61, 0.24);
}

.godzilla-status-line,
.godzilla-panel,
.godzilla-metric-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.godzilla-status-line {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 18px;
}

.godzilla-status-line small {
  color: var(--muted);
}

.godzilla-status-line .secondary-action {
  margin-left: auto;
}

.godzilla-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.godzilla-metric-grid article {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 18px;
}

.godzilla-metric-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--success);
}

.godzilla-metric-grid article:nth-child(2)::before {
  background: var(--violet);
}

.godzilla-metric-grid article:nth-child(3)::before {
  background: var(--coral);
}

.godzilla-metric-grid small {
  display: block;
  color: var(--primary-700);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
}

.godzilla-metric-grid strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
}

.godzilla-metric-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.godzilla-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
}

.godzilla-panel {
  padding: 22px;
}

.godzilla-webhook-panel p {
  color: var(--muted);
}

.godzilla-webhook-panel code {
  display: block;
  padding: 13px 14px;
  border: 1px solid rgba(47, 165, 204, 0.16);
  border-radius: var(--radius-control);
  background: var(--primary-50);
  color: var(--primary-800);
  font-weight: 760;
}

.godzilla-thresholds {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.godzilla-thresholds div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
}

.godzilla-thresholds span {
  color: var(--muted);
}

.godzilla-state-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.godzilla-state-pill.healthy {
  background: rgba(38, 132, 96, 0.12);
  color: #1d6b4d;
}

.godzilla-state-pill.watch {
  background: rgba(47, 165, 204, 0.14);
  color: var(--primary-700);
}

.godzilla-state-pill.critical {
  background: rgba(200, 85, 61, 0.14);
  color: #8e3827;
}

.dark-theme .shell-header {
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.dark-theme .brand img,
.dark-theme .login-logo,
.dark-theme .waivebook-logo {
  filter: drop-shadow(0 0 20px rgba(47, 165, 204, 0.38));
}

.dark-theme .main-nav a:hover,
.dark-theme .identity a:hover,
.dark-theme .identity-trigger:hover,
.dark-theme .identity-menu.is-open .identity-trigger {
  background: rgba(47, 165, 204, 0.16);
  color: var(--primary-700);
}

.dark-theme .app-version {
  border-color: rgba(117, 195, 225, 0.38);
  background: rgba(47, 165, 204, 0.16);
  color: #dff7ff;
}

.dark-theme [data-tooltip]::after {
  background: #e5e7eb;
  color: #0f172a;
}

.dark-theme input,
.dark-theme textarea,
.dark-theme select {
  background: var(--input-bg);
  color: var(--ink);
  border-color: var(--line);
}

.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
  color: #64748b;
}

.dark-theme .search-control,
.dark-theme .admin-form input,
.dark-theme .admin-form textarea,
.dark-theme .admin-inline-form input,
.dark-theme .onboarding-email-form input,
.dark-theme .onboarding-email-form select,
.dark-theme .learning-admin-quiz input,
.dark-theme .learning-admin-quiz select,
.dark-theme .waivey-form input,
.dark-theme .pmo-toolbar select,
.dark-theme .aws-monitor-controls select {
  background: var(--input-bg);
  color: var(--ink);
}

.dark-theme .segmented-control,
.dark-theme .empty-tool-category,
.dark-theme .slide-note,
.dark-theme .quiz-options label,
.dark-theme .learning-admin-locked,
.dark-theme .onboarding-email-note {
  background: rgba(15, 23, 42, 0.64);
}

.dark-theme .faq-item,
.dark-theme .tool-button,
.dark-theme .tool-card,
.dark-theme .project-card,
.dark-theme .project-row,
.dark-theme .salary-family-card,
.dark-theme .salary-level-row,
.dark-theme .salary-scorecard,
.dark-theme .salary-composition-row,
.dark-theme .admin-form,
.dark-theme .onboarding-profile-list button,
.dark-theme .slide-count,
.dark-theme .slide-stat-strip div,
.dark-theme .principle-grid section,
.dark-theme .business-unit-grid section,
.dark-theme .tool-system-grid section,
.dark-theme .flow-lanes section,
.dark-theme .security-grid div,
.dark-theme .next-link-grid a,
.dark-theme .conduct-list div,
.dark-theme .highlight-list span,
.dark-theme .week-list li,
.dark-theme .onboarding-check-grid label,
.dark-theme .team-snapshot-grid article,
.dark-theme .contact-grid section,
.dark-theme .pmo-mapping-grid article,
.dark-theme .aws-monitor-region-grid article,
.dark-theme .aws-monitor-alert-list article {
  background: var(--panel-strong);
}

.dark-theme .metrics-grid article,
.dark-theme .quiz-card,
.dark-theme .quiz-attempt-summary,
.dark-theme .quiz-form,
.dark-theme .learning-admin-card,
.dark-theme .graph-panel,
.dark-theme .detail-panel,
.dark-theme .admin-panel,
.dark-theme .email-preview,
.dark-theme .onboarding-email-panel,
.dark-theme .onboarding-email-directory,
.dark-theme .aws-monitor-status,
.dark-theme .aws-monitor-panel,
.dark-theme .aws-monitor-kpis article,
.dark-theme .aws-monitor-tabs button,
.dark-theme .godzilla-status-line,
.dark-theme .godzilla-panel,
.dark-theme .godzilla-metric-grid article,
.dark-theme .salary-summary-card,
.dark-theme .salary-panel,
.dark-theme .salary-result-panel,
.dark-theme .salary-stepper article,
.dark-theme .my-profile-card,
.dark-theme .my-profile-panel,
.dark-theme .my-profile-section-list article,
.dark-theme .absence-toolbar,
.dark-theme .absence-column,
.dark-theme .absence-group,
.dark-theme .absence-entry,
.dark-theme .identity-dropdown {
  background: var(--panel);
}

.dark-theme .profile-avatar {
  border-color: #111827;
}

.dark-theme .waivey-bubble a {
  color: #dff7ff;
}

.dark-theme .pill,
.dark-theme .status-pill.active,
.dark-theme .quiz-meta span,
.dark-theme .learning-status.completed,
.dark-theme .waivey-sources a,
.dark-theme .waivey-suggestions button,
.dark-theme .pmo-timeline-link,
.dark-theme .onboarding-link-list a,
.dark-theme .aws-monitor-pill.blue,
.dark-theme .godzilla-webhook-panel code {
  background: rgba(47, 165, 204, 0.16);
  color: var(--primary-700);
}

.dark-theme .godzilla-thresholds div {
  background: var(--panel-strong);
}

.dark-theme .godzilla-state-pill.healthy {
  color: #86efac;
}

.dark-theme .godzilla-state-pill.critical {
  color: #ffb4a8;
}

.dark-theme .notice,
.dark-theme .danger-action,
.dark-theme .error,
.dark-theme .learning-status.overdue,
.dark-theme .status-red,
.dark-theme .priority-critical,
.dark-theme .aws-monitor-pill.red,
.dark-theme .toast.error {
  color: #ffb4a8;
}

.dark-theme .status-green,
.dark-theme .aws-monitor-pill.green {
  color: #86efac;
}

.dark-theme .status-yellow,
.dark-theme .learning-status.open,
.dark-theme .learning-status.due {
  color: #facc15;
}

.dark-theme .waivey-toggle,
.dark-theme .waivey-panel {
  background: rgba(15, 23, 42, 0.94);
}

.dark-theme .waivey-header {
  background:
    linear-gradient(135deg, rgba(20, 61, 77, 0.76), rgba(15, 23, 42, 0.94)),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover no-repeat;
}

.dark-theme .waivey-header button {
  background: rgba(15, 23, 42, 0.82);
  color: var(--muted);
}

.dark-theme .pmo-workspace,
.dark-theme .pmo-gantt-shell,
.dark-theme .pmo-profile-header,
.dark-theme .pmo-info-card,
.dark-theme .pmo-cockpit-brief,
.dark-theme .pmo-cockpit-facts {
  background: var(--panel);
}

.dark-theme .pmo-metric {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(20, 61, 77, 0.54));
}

.dark-theme .pmo-workspace-heading {
  background:
    linear-gradient(90deg, rgba(20, 61, 77, 0.92), rgba(15, 23, 42, 0.9)),
    url("/static/assets/wave-background_floodwaive-dark.png") center / cover no-repeat;
}

.dark-theme .pmo-workspace-heading > span {
  color: rgba(229, 231, 235, 0.74);
}

.dark-theme .pmo-toolbar {
  background: rgba(15, 23, 42, 0.9);
}

.dark-theme .pmo-toolbar select {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

.dark-theme .pmo-table th {
  background: rgba(20, 61, 77, 0.98);
  color: rgba(229, 231, 235, 0.82);
}

.dark-theme .pmo-table tbody tr {
  background: rgba(15, 23, 42, 0.78);
}

.dark-theme .pmo-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.92);
  box-shadow: inset 0 0 0 999px rgba(47, 165, 204, 0.09);
}

.dark-theme .pmo-project-link {
  color: var(--ink);
}

.dark-theme #people-graph {
  --waivebook-edge: rgba(226, 232, 240, 0.72);
  --waivebook-business-unit-edge: #7dd3fc;
  --waivebook-department-edge: #f0abfc;
  --waivebook-member-edge: #86efac;
  --waivebook-flow-edge: #facc15;
  --waivebook-label: rgba(241, 245, 249, 0.94);
  --waivebook-node-stroke: rgba(15, 23, 42, 0.72);
  --waivebook-grid-line: rgba(148, 163, 184, 0.13);
  --waivebook-graph-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(20, 61, 77, 0.52));
}

.dark-theme .people-title,
.dark-theme .people-toolbar,
.dark-theme .graph-panel,
.dark-theme .detail-panel,
.dark-theme .admin-panel,
.dark-theme .people-metrics article {
  color: rgba(241, 245, 249, 0.96);
}

.dark-theme .detail-panel h2,
.dark-theme .profile-head h2,
.dark-theme .profile-section h3,
.dark-theme .profile-fact strong,
.dark-theme .absence-group-heading strong,
.dark-theme .absence-entry a,
.dark-theme .absence-entry strong,
.dark-theme .people-metrics article span {
  color: #f8fafc;
}

.dark-theme .profile-role,
.dark-theme .profile-bio,
.dark-theme .profile-section p,
.dark-theme .profile-fact span,
.dark-theme .absence-toolbar > span,
.dark-theme .absence-column-heading span,
.dark-theme .absence-group-heading span,
.dark-theme .absence-year-heading small,
.dark-theme .absence-entry div span,
.dark-theme .absence-entry p,
.dark-theme .detail-label,
.dark-theme .detail-section,
.dark-theme .detail-panel .small-note {
  color: #cbd5e1;
}

.dark-theme .profile-head .eyebrow,
.dark-theme .detail-panel .eyebrow {
  color: #93e4ff;
}

.dark-theme .detail-email {
  color: #7dd3fc;
}

.dark-theme .pmo-project-person > span,
.dark-theme .pmo-portfolio-hero .primary-action,
.dark-theme .pmo-project-hero .primary-action,
.dark-theme .pmo-gantt-shell .segmented-control button.active,
.dark-theme .pmo-gantt-shell .segmented-control button:hover {
  color: #143d4d;
}

.dark-theme .criticality-score {
  background: linear-gradient(135deg, #143d4d, #2684a3);
  color: white;
}

.dark-theme .pmo-chip-row > span,
.dark-theme .pmo-chip-row > strong,
.dark-theme .pmo-brief-grid section {
  background: rgba(15, 23, 42, 0.64);
}

.dark-theme .pmo-dhtmlx-gantt-shell {
  background:
    linear-gradient(180deg, rgba(20, 61, 77, 0.42), rgba(15, 23, 42, 0.96) 28%),
    #0f172a;
}

.dark-theme .pmo-dhtmlx-gantt,
.dark-theme .pmo-dhtmlx-gantt .gantt_container,
.dark-theme .pmo-dhtmlx-gantt .gantt_layout_cell,
.dark-theme .pmo-dhtmlx-gantt .gantt_grid,
.dark-theme .pmo-dhtmlx-gantt .gantt_task {
  background: #111827;
  color: var(--ink);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_hor_scroll,
.dark-theme .pmo-dhtmlx-gantt .gantt_hor_scroll .gantt_layout_content {
  background: rgba(20, 61, 77, 0.72);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_grid_data .gantt_row,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_row {
  border-color: rgba(148, 163, 184, 0.14);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_task_row {
  background: linear-gradient(180deg, rgba(20, 61, 77, 0.34), rgba(15, 23, 42, 0.9));
}

.dark-theme .pmo-dhtmlx-gantt .gantt_task_row.odd {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
}

.dark-theme .pmo-dhtmlx-gantt .gantt_task_cell {
  border-color: rgba(47, 165, 204, 0.14);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-critical,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-critical,
.dark-theme .pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-blocked,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-blocked,
.dark-theme .pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-impacted,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-impacted {
  background: linear-gradient(90deg, rgba(255, 111, 97, 0.18), rgba(15, 23, 42, 0.94) 38%);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-done,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-done {
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.14), rgba(15, 23, 42, 0.94) 34%);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_grid_data .gantt_row.pmo-dhtmlx-not-started,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_row.pmo-dhtmlx-not-started {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.14), rgba(15, 23, 42, 0.95) 36%);
}

.dark-theme .pmo-dhtmlx-grid-title strong {
  color: var(--primary-800);
}

.dark-theme .pmo-dhtmlx-gantt .gantt_task_line.gantt_milestone,
.dark-theme .pmo-dhtmlx-gantt .gantt_task_line.pmo-dhtmlx-milestone {
  border-color: rgba(15, 23, 42, 0.86);
}

.dark-theme .payload-dialog {
  background: var(--panel-strong);
  color: var(--ink);
}

.dark-theme .payload-dialog::backdrop {
  background: rgba(2, 6, 23, 0.56);
}

.dark-theme .aws-monitor-tabs button.active {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(20, 61, 77, 0.52));
}

.dark-theme .aws-monitor-bars {
  background:
    linear-gradient(180deg, rgba(47, 165, 204, 0.1) 1px, transparent 1px),
    rgba(15, 23, 42, 0.72);
}

.dark-theme .aws-monitor-service-row > span {
  color: var(--ink);
}

.dark-theme .aws-monitor-service-row div {
  background: rgba(148, 163, 184, 0.18);
}

@media (max-width: 840px) {
  .shell-header,
  .identity,
  .main-nav,
  .hero-dashboard,
  .dashboard-area-grid,
  .department-hero,
  .login-layout,
  .tool-area-title,
  .aws-monitor-hero,
  .aws-monitor-status,
  .godzilla-hero,
  .godzilla-status-line,
  .pmo-hero,
  .pmo-profile-header,
  .people-title,
  .section-heading,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .shell-header,
  .main-nav,
  .identity,
  .department-dashboard-controls,
  .section-heading,
  .toolbar {
    display: flex;
  }

  .identity-menu {
    align-self: stretch;
  }

  .shell-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .identity-trigger {
    width: 100%;
    justify-content: space-between;
  }

  .shell-header-center strong,
  .shell-header-center span {
    max-width: 100%;
  }

  .department-back {
    position: static;
    justify-self: stretch;
  }

  .department-learn-more {
    position: static;
    justify-self: stretch;
  }

  .department-dashboard-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .department-view-toggle {
    width: 100%;
  }

  .department-view-toggle button {
    flex: 1;
  }

  .identity-dropdown {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .department-flow-header,
  .department-flow-map {
    grid-template-columns: 1fr;
  }

  .department-flow-header {
    display: grid;
  }

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

  .department-flow-map {
    min-height: auto;
  }

  .department-flow-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .department-flow-lane {
    min-height: auto;
  }

  .department-flow-team {
    min-height: 340px;
  }

  .hero-dashboard,
  .dashboard-area-grid,
  .department-card-grid,
  .login-layout,
  .aws-monitor-hero,
  .aws-monitor-grid,
  .aws-monitor-grid-wide,
  .godzilla-hero,
  .godzilla-grid,
  .salary-hero,
  .salary-layout,
  .salary-result-grid,
  .pmo-project-cockpit,
  .pmo-profile-grid,
  .pmo-rbd-grid,
  .my-profile-layout {
    grid-template-columns: 1fr;
  }

  .my-profile-layout {
    gap: 24px;
    margin-top: 24px;
  }

  .my-profile-card,
  .my-profile-panel,
  .my-profile-absences-panel {
    padding: 24px;
  }

  .my-profile-absences-panel {
    margin-top: 24px;
  }

  .my-profile-card .profile-cover {
    height: 112px;
    margin: -24px -24px 0;
  }

  .my-profile-card .profile-head {
    gap: 18px;
    margin-top: -44px;
    margin-bottom: 14px;
  }

  .my-profile-card .profile-head > div {
    padding-top: 54px;
  }

  .my-profile-card .profile-section,
  .my-profile-panel .profile-section {
    padding-top: 26px;
    margin-top: 26px;
  }

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

  .absence-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .my-profile-record-facts .profile-fact {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
  }

  .learning-grid,
  .quiz-attempt-shell,
  .learning-admin-grid,
  .learning-admin-quiz,
  .pmo-toolbar,
  .pmo-gantt-row,
  .salary-stepper,
  .salary-score-row,
  .salary-scale-labels,
  .salary-result-summary {
    grid-template-columns: 1fr;
  }

  .salary-scale-labels span,
  .salary-scale-labels span:nth-child(2),
  .salary-scale-labels span:nth-child(3) {
    text-align: left;
  }

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

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

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

  .godzilla-avatar-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .godzilla-avatar-card img {
    width: 110px;
    height: 110px;
  }

  .aws-monitor-service-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .pmo-brief-grid,
  .people-layout,
  .admin-grid,
  .onboarding-email-layout,
  .onboarding-check-grid,
  .team-snapshot-grid,
  .contact-grid,
  .slide-two-column,
  .principle-grid,
  .compact-conduct,
  .tool-system-grid,
  .security-grid,
  .flow-lanes,
  .next-link-grid,
  .compact-next-links,
  .slide-stat-strip {
    grid-template-columns: 1fr;
  }

  .team-snapshot-grid {
    max-height: none;
  }

  #people-graph {
    height: 560px;
  }

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

  .slideshow-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .slideshow-controls .primary-action,
  .slideshow-controls .secondary-action,
  .pmo-profile-actions .primary-action,
  .pmo-profile-actions .secondary-action {
    width: 100%;
  }

  .pmo-profile-grid .pmo-info-card:first-child {
    grid-column: span 1;
  }

  .pmo-gantt-axis {
    margin-left: 0;
  }

  .pmo-dhtmlx-gantt-shell {
    padding: 10px;
  }

  .pmo-gantt-control-stack {
    justify-items: stretch;
  }

  .pmo-gantt-control-stack .segmented-control {
    overflow-x: auto;
  }

  .pmo-dhtmlx-gantt {
    height: 366px;
  }

  .slides-frame,
  .slide {
    min-height: 0;
  }

  .waivebook-title-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-head {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 13px;
    margin-top: -40px;
  }

  .profile-head > div {
    padding-top: 48px;
  }

  .profile-avatar {
    width: 92px;
    height: 92px;
    border-width: 3px;
  }

  .waivey-widget {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .waivey-panel {
    width: 100%;
  }

  .waivey-toggle {
    justify-self: end;
  }
}

/* ─── Timesheet ─────────────────────────────────────────────────────────── */
.timesheet-shell {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  position: relative;
}

.timesheet-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(135deg, rgba(47, 165, 204, 0.14), transparent 44%),
    var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  text-align: center;
  backdrop-filter: blur(18px);
}

.timesheet-loading[hidden] {
  display: none;
}

.timesheet-loading strong {
  font-size: 1rem;
  font-weight: 850;
}

.timesheet-loading small {
  color: var(--muted);
}

.timesheet-loading-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(47, 165, 204, 0.18);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: timesheet-spin 0.85s linear infinite;
}

@keyframes timesheet-spin {
  to {
    transform: rotate(360deg);
  }
}

.timesheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(135deg, rgba(47, 165, 204, 0.11), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.timesheet-month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timesheet-month-nav h2 {
  margin: 0 8px;
  min-width: 11ch;
  text-align: center;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 850;
}

.timesheet-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  flex: 1 1 auto;
  min-width: 320px;
}

.timesheet-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 68px;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.timesheet-summary strong {
  font-size: 1rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.timesheet-summary strong.is-negative {
  color: var(--coral);
}

.timesheet-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.875rem;
}

.timesheet-status[data-kind="error"] {
  border-color: rgba(200, 85, 61, 0.42);
  background: rgba(200, 85, 61, 0.1);
  color: var(--coral);
}

.timesheet-status[data-kind="ok"] {
  border-color: rgba(38, 132, 96, 0.38);
  background: rgba(38, 132, 96, 0.1);
  color: var(--success);
}

.timesheet-save-all-action:not(:disabled) {
  border-color: rgba(47, 165, 204, 0.42);
  background: rgba(47, 165, 204, 0.12);
  color: var(--primary-700);
}

.timesheet-save-all-action:not(:disabled)::after {
  content: attr(data-count);
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
}

.timesheet-print-actions {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.timesheet-download-action {
  width: 100%;
  justify-content: center;
  border-color: rgba(47, 165, 204, 0.5);
  background:
    linear-gradient(135deg, rgba(47, 165, 204, 0.96), rgba(38, 132, 163, 0.96));
  color: #fff;
  box-shadow: 0 14px 30px rgba(47, 165, 204, 0.24);
}

.timesheet-download-action.secondary-action {
  border-color: rgba(38, 132, 96, 0.44);
  background:
    linear-gradient(135deg, rgba(38, 132, 96, 0.94), rgba(47, 165, 204, 0.9));
  color: #fff;
}

.timesheet-download-action:hover,
.timesheet-download-action:focus-visible {
  border-color: rgba(47, 165, 204, 0.7);
  filter: brightness(1.04);
}

.timesheet-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.timesheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--ink);
}

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

.timesheet-table thead th {
  font-weight: 850;
  background: var(--panel-strong);
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.timesheet-table tr.is-weekend {
  background: rgba(100, 116, 139, 0.06);
}

.timesheet-table tr.is-ooo-paid {
  background:
    linear-gradient(90deg, rgba(38, 132, 96, 0.18), transparent 46%),
    rgba(38, 132, 96, 0.06);
}

.timesheet-table tr.is-ooo-holiday {
  background:
    linear-gradient(90deg, rgba(183, 121, 31, 0.2), transparent 46%),
    rgba(183, 121, 31, 0.07);
}

.timesheet-table tr.is-ooo-sick {
  background:
    linear-gradient(90deg, rgba(200, 85, 61, 0.16), transparent 46%),
    rgba(200, 85, 61, 0.06);
}

.timesheet-table tr.is-valid {
  background:
    linear-gradient(90deg, rgba(38, 132, 96, 0.2), transparent 52%),
    rgba(38, 132, 96, 0.07);
}

.timesheet-table tr.has-issues {
  background:
    linear-gradient(90deg, rgba(200, 85, 61, 0.2), transparent 52%),
    rgba(200, 85, 61, 0.08);
}

.timesheet-table tr.is-dirty td:first-child::before,
.timesheet-table tr.is-dirty .col-day::before {
  content: "•";
  color: var(--blue);
  margin-right: 0.25rem;
}

.timesheet-table input[type="time"],
.timesheet-table input[type="number"],
.timesheet-table input[type="text"],
.timesheet-table select {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  font-size: 0.875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--input-bg);
  color: var(--ink);
}

.timesheet-table input:focus,
.timesheet-table select:focus {
  outline: 2px solid var(--primary-300);
  outline-offset: 1px;
}

.timesheet-table tr.is-valid input,
.timesheet-table tr.is-valid select {
  border-color: rgba(38, 132, 96, 0.28);
  background: rgba(38, 132, 96, 0.06);
}

.timesheet-table tr.has-issues input,
.timesheet-table tr.has-issues select {
  border-color: rgba(200, 85, 61, 0.28);
  background: rgba(200, 85, 61, 0.06);
}

.timesheet-table .col-day {
  white-space: nowrap;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.timesheet-table .col-status {
  min-width: 112px;
}

.timesheet-table .col-actions {
  white-space: nowrap;
}

.timesheet-table .col-actions button {
  margin-right: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

.timesheet-table .col-validation {
  min-width: 220px;
}

.validation-badge {
  display: inline-block;
  min-width: 2.5em;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 820;
  background: var(--surface-soft);
  color: var(--muted);
}

.validation-badge.is-ok {
  background: rgba(38, 132, 96, 0.14);
  color: var(--success);
}

.validation-badge.is-error {
  background: rgba(200, 85, 61, 0.13);
  color: var(--coral);
  cursor: help;
}

.validation-row-list {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding: 0;
  color: var(--coral);
  font-size: 0.78rem;
  line-height: 1.3;
  list-style: none;
}

.validation-row-list li {
  padding-left: 12px;
  position: relative;
}

.validation-row-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.timesheet-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  white-space: nowrap;
}

.timesheet-status-pill[data-status="approved"] {
  border-color: rgba(38, 132, 96, 0.34);
  background: rgba(38, 132, 96, 0.13);
  color: var(--success);
}

.timesheet-status-pill[data-status="submitted"] {
  border-color: rgba(47, 165, 204, 0.34);
  background: rgba(47, 165, 204, 0.13);
  color: var(--primary-700);
}

.timesheet-status-pill[data-status="draft"] {
  border-color: rgba(183, 121, 31, 0.34);
  background: rgba(183, 121, 31, 0.13);
  color: var(--amber);
}

.timesheet-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .department-flow-steps {
    grid-template-columns: 1fr;
  }

  .department-flow-orbit {
    --orbit-radius: 92px;
    width: min(280px, 100%);
  }

  .department-flow-member {
    width: 50px;
    height: 50px;
  }

  .department-flow-core {
    width: 120px;
    height: 120px;
  }

  .timesheet-table {
    font-size: 0.8125rem;
  }
  .timesheet-toolbar {
    align-items: stretch;
  }
  .timesheet-month-nav {
    width: 100%;
    justify-content: space-between;
  }
  .timesheet-table .col-actions button {
    display: block;
    margin-bottom: 0.25rem;
  }
}
