:root {
  --bg-0: #08182c;
  --bg-1: #0a2d5e;
  --bg-2: #123b70;
  --panel: #15243a;
  --panel-strong: #1f2835;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --ink: #f7fbff;
  --ink-soft: #b6c6d7;
  --primary: #0a2d5e;
  --primary-strong: #061f43;
  --accent: #ff6a00;
  --danger: #f05f78;
  --danger-strong: #c93f5b;
  --warning-bg: rgba(255, 106, 0, 0.14);
  --warning-ink: #ffbf8a;
  --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.36);
  --shadow-sm: 0 14px 30px rgba(0, 0, 0, 0.22);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: "Manrope", "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: #edf4fb;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p {
  margin-top: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  backdrop-filter: blur(10px);
  background: linear-gradient(90deg, rgba(4, 27, 49, 0.92), rgba(13, 57, 95, 0.88));
  border-bottom: 1px solid rgba(158, 203, 241, 0.25);
}

.topbar h1 {
  color: #ebf5ff;
  letter-spacing: 0.2px;
  font-size: 22px;
}

.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.hint {
  color: #bbdbf8;
  font-size: 13px;
}

.text-link {
  color: #d6ecff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(140, 190, 236, 0.6);
  border-radius: 999px;
  padding: 6px 12px;
}

.text-link:hover {
  background: rgba(42, 126, 196, 0.25);
}

.layout {
  display: grid;
  grid-template-columns: 290px 1fr 380px;
  gap: 14px;
  padding: 16px;
}

.left-panel,
.center-panel,
.right-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 223, 245, 0.6);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.left-panel:hover,
.center-panel:hover,
.right-panel:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}

.left-panel h2,
.center-panel h2,
.right-panel h2,
.center-panel h3 {
  color: #123d63;
}

.actor-pool {
  min-height: 140px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(8, 24, 44, 0.4);
}

.actor-card {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #15243a, #1f2835);
  color: #eef7ff;
  cursor: grab;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

.actor-card small {
  display: block;
  color: #b6c6d7;
  margin-top: 2px;
}

.table-wrap {
  padding: 6px 0;
}

.table-center {
  text-align: center;
  margin: 8px auto 12px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4daef2, #1267ac 70%);
  color: #eef7ff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #9fd2fa;
  box-shadow: 0 14px 30px rgba(17, 92, 155, 0.35);
}

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

.seat {
  min-height: 78px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 11px;
  padding: 6px;
  background: rgba(8, 24, 44, 0.4);
}

.seat > span {
  display: block;
  font-size: 12px;
  color: #b6c6d7;
  margin-bottom: 4px;
}

.meeting-audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.meeting-audience-grid > div:first-child {
  display: flex;
  flex-direction: column;
}

.actor-pool {
  flex: 1;
  overflow-y: auto;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.row.split {
  justify-content: space-between;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.detail-header-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.detail-header-actions form {
  margin: 0;
}

label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 600;
  color: var(--ink-soft);
}

textarea,
input,
select {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 11px;
  color: var(--ink);
  background: rgba(8, 24, 44, 0.72);
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(255, 106, 0, 0.18);
  border-color: #ff6a00;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #ff7a1f, #ff6a00);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 12px 24px rgba(255, 106, 0, 0.16);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(17, 121, 211, 0.3);
  filter: brightness(1.1);
}

button:active {
  transform: translateY(0);
}

.btn-danger {
  background: linear-gradient(180deg, var(--danger), var(--danger-strong));
}

.warning,
.error {
  padding: 9px 10px;
  border-radius: 10px;
  margin-top: 8px;
  background: var(--warning-bg);
  border: 1px solid #f3bf99;
  color: var(--warning-ink);
}

.edits-list .edit-item {
  border: 1px solid #bdd9f3;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #ffffff, #edf6ff);
  color: #153b60;
  cursor: grab;
}

.panel-content h3 {
  margin-bottom: 8px;
}

.panel-content h4 {
  color: #194d7b;
  margin: 12px 0 6px;
}

.panel-content ul,
.panel-content ol {
  margin-top: 0;
  padding-left: 20px;
}

.login-body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(680px 420px at 16% 52%, rgba(255, 106, 0, 0.12), transparent 64%),
    radial-gradient(760px 420px at 84% 4%, rgba(255, 106, 0, 0.08), transparent 62%),
    linear-gradient(145deg, #08182c 0%, #0b2038 48%, #06152a 100%);
}

.login-body::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    radial-gradient(520px 320px at 32% 50%, rgba(255, 106, 0, 0.08), transparent 70%),
    radial-gradient(760px 460px at 70% 30%, rgba(255, 255, 255, 0.035), transparent 72%);
  background-size: 56px 56px, 56px 56px, auto, auto;
  z-index: 0;
}

.login-brand-network {
  position: absolute;
  right: max(18px, 4vw);
  bottom: max(18px, 4vh);
  width: min(360px, 34vw);
  height: auto;
  max-height: 52vh;
  opacity: 0.26;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.34));
  pointer-events: none;
  z-index: 0;
}

.login-brand-mark {
  opacity: 0.78;
}

.login-card {
  position: relative;
  width: min(460px, 96vw);
  background:
    linear-gradient(180deg, rgba(31, 40, 53, 0.94), rgba(18, 31, 48, 0.97)),
    rgba(18, 31, 48, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid rgba(255, 106, 0, 0.72);
  border-radius: 18px;
  padding: 30px 26px 28px;
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 106, 0, 0.05);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.login-logo {
  display: block;
  width: min(340px, 100%);
  height: auto;
  margin: 0 auto 24px;
}

.login-card h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 30px;
}

.login-card p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.login-form {
  display: grid;
  gap: 11px;
}

.login-form label {
  margin: 0;
}

.login-form button {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
}

@media (max-width: 920px) {
  .login-brand-network {
    right: -36px;
    bottom: -28px;
    width: min(300px, 58vw);
    opacity: 0.12;
  }
}

.admin-layout {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.admin-card {
  background: linear-gradient(180deg, rgba(247, 252, 255, 0.98), rgba(236, 246, 255, 0.98));
  border: 1px solid #c5ddf4;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.admin-card h2 {
  color: #153f65;
  margin-bottom: 10px;
}

.grid-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  align-items: start;
}

.grid-form > button {
  align-self: end;
}

.grid-form.compact {
  grid-template-columns: minmax(190px, 1.6fr) minmax(140px, 1fr) minmax(130px, 1fr) auto;
}

.actor-grid {
  grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(110px, 1fr)) auto;
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.event-form {
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1fr) minmax(260px, 1fr);
  align-items: start;
}

.people-filter-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: start;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fcfeff;
}

.admin-table th,
.admin-table td {
  border: 1px solid #cde1f5;
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #e5f2ff;
  color: #1b4870;
}

.json-cell {
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  color: #234f79;
}

small {
  color: var(--ink-soft);
}

.shell-body {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 78% -20%, rgba(255, 106, 0, 0.13), transparent 58%),
    radial-gradient(760px 420px at -12% 12%, rgba(41, 92, 160, 0.28), transparent 62%),
    linear-gradient(145deg, #08182c 0%, #0a2d5e 44%, #06152a 100%);
}

.shell-body.no-shell {
  display: block;
  height: auto;
  overflow: auto;
  background:
    radial-gradient(760px 420px at 84% 4%, rgba(255, 106, 0, 0.13), transparent 62%),
    linear-gradient(145deg, #08182c 0%, #0b2038 48%, #06152a 100%);
}

.sidebar {
  position: relative;
  width: 250px;
  flex-shrink: 0;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(10, 45, 94, 0.96), rgba(8, 24, 44, 0.98)),
    #0a2d5e;
  overflow-y: auto;
  z-index: 20;
}

.sidebar-brand {
  display: block;
  margin: 4px 0 20px;
  padding: 8px 0;
  text-decoration: none;
}

.sidebar-brand img {
  display: block;
  width: 224px;
  max-width: 100%;
  height: auto;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  border-radius: 10px;
}

.nav-group-summary {
  list-style: none;
  color: rgba(247, 251, 255, 0.72);
  text-decoration: none;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

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

.nav-group-summary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-group-summary.active {
  background: rgba(255, 106, 0, 0.16);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #ff6a00;
}

.nav-submenu {
  display: grid;
  gap: 4px;
  padding: 4px 0 4px 10px;
}

.nav-sublink {
  color: rgba(247, 251, 255, 0.62);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.nav-sublink:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nav-link {
  color: rgba(247, 251, 255, 0.72);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(4px);
}

.nav-link.active {
  background: rgba(255, 106, 0, 0.17);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #ff6a00, 0 12px 24px rgba(0, 0, 0, 0.2);
}

.shell-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  width: 0;
  height: 100%;
}

.shell-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 24, 44, 0.76);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.shell-header-title {
  color: #e8f5ff;
  font-weight: 700;
}

.shell-content {
  flex: 1;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

.icon-btn {
  background: linear-gradient(180deg, #ff7a1f, #ff6a00);
  min-width: 74px;
}

.btn-secondary {
  background: linear-gradient(180deg, #28313d, #1f2328);
}

.shell-body.sidebar-collapsed .sidebar-brand {
  font-size: 14px;
}

.shell-body.sidebar-collapsed .sidebar {
  width: 84px;
}

.shell-body.sidebar-collapsed .shell-main {
  /* flexbox handles this automatically */
}

.shell-body.sidebar-collapsed .nav-link {
  font-size: 0;
  position: relative;
  height: 40px;
}

.shell-body.sidebar-collapsed .nav-link::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ed0fb;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.card {
  background: linear-gradient(180deg, rgba(31, 40, 53, 0.96), rgba(18, 31, 48, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  min-width: 0;
}

.card-lite {
  margin-top: 10px;
}

.help-text {
  color: #4a6c8d;
  font-size: 13px;
  margin: 6px 0 10px;
}

.field-label-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.field-hint {
  align-items: center;
  background: rgba(24, 119, 209, 0.12);
  border: 1px solid rgba(24, 119, 209, 0.22);
  border-radius: 999px;
  color: #1877d1;
  cursor: help;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  position: relative;
  width: 22px;
}

.field-hint-popover {
  background: #f8fbff;
  border: 1px solid rgba(24, 119, 209, 0.18);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(12, 31, 53, 0.12);
  color: #24405d;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  visibility: hidden;
  width: min(420px, 72vw);
  z-index: 40;
}

.field-hint:hover .field-hint-popover,
.field-hint:focus .field-hint-popover,
.field-hint:focus-visible .field-hint-popover {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

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

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 16px;
}

.stats-grid .stat-card {
  padding: 16px 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stats-grid .stat-value {
  margin: 10px 0 6px;
  line-height: 1;
}

.dashboard-hero {
  padding: 18px;
}

.dashboard-hero h2 {
  margin: 8px 0 4px;
}

.dashboard-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

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

.orgmap-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(25, 181, 255, 0.16), transparent 26%),
    radial-gradient(circle at bottom left, rgba(17, 121, 211, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(247, 252, 255, 0.98), rgba(236, 246, 255, 0.98));
}

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

.orgmap-node-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d2e5f7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 248, 255, 0.98));
  box-shadow: 0 14px 28px rgba(25, 80, 132, 0.08);
}

.orgmap-node-card h4 {
  color: #173f65;
  margin-top: 10px;
}

.orgmap-node-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.orgmap-quick-add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.orgmap-tab-strip {
  margin-top: 0;
}

.orgmap-tab-panel {
  display: none;
}

.orgmap-tab-panel.active {
  display: block;
}

.orgchart-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.zoom-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(15, 30, 50, 0.6);
  color: #f6fbff;
}

.zoom-control input[type="range"] {
  width: 120px;
}

.zoom-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f6fbff;
  border: none;
}
.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.orgchart-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.orgchart-stage {
  position: relative;
  min-height: 680px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, #15243a, #1f2835),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  overflow: auto;
}

.orgchart-stage.clean {
  min-height: 540px;
  padding: 14px;
}

.orgchart-canvas {
  position: relative;
  min-width: 980px;
  min-height: 620px;
}

.orgchart-stage.functional {
  background:
    radial-gradient(circle at top right, rgba(25, 181, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #15243a, #1f2835),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px;
}

.orgchart-lines,
.orgchart-viewport {
  position: absolute;
  inset: 0;
}

.orgchart-lines {
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: top left;
  z-index: 1;
}

.orgchart-stage.clean .orgchart-lines {
  inset: 14px;
}

.orgchart-viewport {
  min-width: 980px;
  min-height: 620px;
}

.orgchart-viewport.clean {
  inset: 14px;
  min-width: calc(980px - 28px);
  min-height: calc(620px - 28px);
  transform-origin: top left;
  z-index: 2;
}

.orgchart-inspector {
  display: grid;
  gap: 12px;
}

.orgchart-selection-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(8, 24, 44, 0.4);
}

.orgchart-selection-card strong,
.orgchart-selection-card small {
  display: block;
}

.orgchart-selection-card small {
  margin-top: 6px;
}

.graph-node-card {
  position: absolute;
  width: 220px;
  min-height: 92px;
  border: none;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.graph-node-card.clean {
  width: 184px;
}

.graph-node-inner {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #15243a, #1f2835);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
  color: #f6fbff;
}

.graph-node-inner.executive {
  border-color: var(--primary);
  background:
    radial-gradient(circle at top right, rgba(25, 181, 255, 0.16), transparent 32%),
    linear-gradient(180deg, #15243a, #1f2835);
}

.graph-node-card.selected .graph-node-inner {
  border-color: #0d74cb;
  box-shadow: 0 18px 34px rgba(13, 116, 203, 0.22);
  transform: translateY(-2px);
}

.graph-node-card.targeted .graph-node-inner {
  border-color: #19b5ff;
  box-shadow: 0 18px 34px rgba(25, 181, 255, 0.18);
}

.graph-node-inner strong,
.graph-node-inner small {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.graph-node-inner small {
  margin-top: 6px;
  color: #b6c6d7;
  line-height: 1.45;
  font-size: 12px;
}

.graph-node-card.clean .graph-node-inner {
  min-height: 92px;
  padding: 12px;
}

.graph-node-card.formal.clean .graph-node-inner {
  background: linear-gradient(180deg, #15243a, #1f2835);
}

.graph-node-card.functional.clean .graph-node-inner {
  background:
    radial-gradient(circle at top right, rgba(25, 181, 255, 0.1), transparent 34%),
    linear-gradient(180deg, #15243a, #1f2835);
}

.functional-lane {
  position: absolute;
  left: 10px;
  right: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.functional-lane span {
  position: absolute;
  top: -14px;
  left: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4faff;
  border: 1px solid #d2e5f7;
  color: #195184;
  font-size: 12px;
  font-weight: 700;
}

.functional-area-label {
  position: absolute;
  top: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  border: 1px solid #d2e5f7;
  color: #173f65;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.relationship-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.relationship-chip {
  min-height: 44px;
  white-space: normal;
  text-align: center;
}

.guide-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 255, 0.98));
  border: 1px solid #cde1f5;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.guide-card h3 {
  margin: 0 0 8px;
}

.guide-card p,
.guide-card li {
  color: #264b70;
  line-height: 1.55;
}

.guide-card ol,
.guide-card ul {
  margin: 0;
  padding-left: 20px;
}

.metric-help {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d8e6f5;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(236, 245, 255, 0.98));
}

.metric-help strong {
  display: block;
  margin-bottom: 4px;
  color: #173b63;
  font-size: 0.92rem;
}

.metric-help p {
  margin: 0;
  color: #36597d;
  font-size: 0.91rem;
  line-height: 1.5;
}

.metric-help.warning {
  border-color: #f1d08d;
  background: linear-gradient(180deg, rgba(255, 250, 238, 0.98), rgba(255, 245, 219, 0.98));
}

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

.stat-card {
  background: linear-gradient(180deg, #fff, #edf6ff);
  border: 1px solid #cde1f5;
  border-radius: 12px;
  padding: 12px;
}

.stat-value {
  font-size: 36px;
  color: #0f5ea7;
  font-weight: 800;
  margin: 8px 0;
}

.crud-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 8px 10px;
  border: 1px solid #cfe2f5;
  border-radius: 12px;
  background: #f7fbff;
}

.crud-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.crud-actions {
  display: flex;
  gap: 8px;
}

.toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #175687;
  font-weight: 700;
  background: #eaf4ff;
  border: 1px solid #cde1f5;
}

.toolbar-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.toolbar-link-primary {
  background: linear-gradient(180deg, #0f78d0, #0b65b5);
  color: #eef8ff;
  border-color: #0e71c5;
}

.selected-row {
  background: #edf6ff;
}

.selected-row td {
  font-weight: 600;
}

.admin-table a {
  color: #0b67bc;
  text-decoration: none;
  font-weight: 700;
}

.person-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.person-link-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #bfd8f1;
  background: #eef6ff;
}

.tab-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tab-link {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #165a8d;
  background: #eaf4ff;
  border: 1px solid #cde1f5;
  font-weight: 700;
}

button.tab-link {
  cursor: pointer;
}

.tab-link.active {
  color: #eef8ff;
  background: linear-gradient(180deg, #1179d3, #0a63b8);
  border-color: #0f71c6;
}

.section-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.section-intro h3 {
  margin: 0;
  color: #173f65;
}

.row-form-anchor {
  display: none;
}

.master-delete-form {
  margin: 0;
}

.readonly-input {
  background: #eef4fa;
  color: #5c7d9c;
}

.icon-action {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.icon-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-edit {
  background: linear-gradient(180deg, #0f78d0, #0b65b5);
  color: #eef8ff;
  border: 1px solid #0e71c5;
}

.icon-delete {
  background: #fff2f4;
  color: var(--danger);
  border: 1px solid #e7bac5;
}

.icon-delete:hover {
  background: #ffe8ed;
}

.masters-table input,
.masters-table select {
  width: 100%;
  margin: 0;
}

.masters-table .editable-control[readonly],
.masters-table .editable-control:disabled {
  background: #f7fbff;
  color: #274d73;
  cursor: default;
}

.masters-table .code-input {
  min-width: 96px;
}

.masters-table .offset-input {
  min-width: 130px;
}

.masters-table .order-input {
  min-width: 72px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  width: fit-content;
  margin-left: auto;
}

.editing-badge {
  display: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e6f3ff;
  color: #0f5ea7;
  font-size: 12px;
  font-weight: 700;
}

.master-record-row.is-editing {
  background: #edf6ff;
}

.master-record-row.is-editing td {
  border-top-color: #9dcaef;
  border-bottom-color: #9dcaef;
}

.row-save-btn,
.row-cancel-btn {
  display: none;
  min-width: 92px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
}

.row-save-btn {
  background: linear-gradient(180deg, #0f78d0, #0b65b5);
  color: #eef8ff;
  border: 1px solid #0e71c5;
}

.row-cancel-btn {
  background: #eef5fb;
  color: #35587c;
  border: 1px solid #c8dced;
}

.master-record-row.is-editing .row-save-btn,
.master-record-row.is-editing .row-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.master-record-row.is-editing .editing-badge {
  display: inline-flex;
  align-items: center;
}

.master-record-row.is-editing .row-start-edit,
.master-record-row.is-editing .row-delete-btn {
  display: none;
}

.masters-table td {
  padding: 6px;
}

.masters-table th:last-child,
.masters-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.modal-backdrop[hidden] {
  display: none;
}

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

.modal-card {
  width: min(460px, 100%);
  border-radius: 16px;
  border: 1px solid #c8dced;
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  box-shadow: 0 20px 50px rgba(8, 35, 61, 0.18);
  padding: 18px;
}

.modal-card h3 {
  margin: 0 0 8px;
  color: #173f65;
}

.modal-card p {
  margin: 0;
  color: #4a6c8d;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.field-card {
  padding: 12px;
  border: 1px solid #cfe2f5;
  border-radius: 12px;
  background: #f7fbff;
}

.field-card label {
  margin: 0 0 4px;
}

.field-card small {
  display: block;
  margin-bottom: 10px;
}

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

.person-data-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}

.avatar-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe2f5;
  border-radius: 14px;
  background: #f7fbff;
}

.avatar-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid #bdd7f0;
  background: #ffffff;
}

.avatar-card-copy {
  display: grid;
  gap: 6px;
}

.avatar-form {
  display: grid;
  gap: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eaf4ff;
  border: 1px solid #cde1f5;
  color: #165a8d;
  font-weight: 700;
  cursor: pointer;
}

.file-picker:hover {
  background: #deeeff;
}

.avatar-file-name {
  font-size: 12px;
  color: #5c7d9c;
}

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

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

.field-group h4 {
  color: #173f65;
}

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

.intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.intel-card {
  min-height: 154px;
}

.intel-summary p {
  margin: 0;
  color: #204a72;
  font-size: 15px;
  line-height: 1.6;
}

.comms-hero {
  align-items: start;
}

.comms-hero-actions {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.intel-panel h3,
.intel-panel h4 {
  color: #173f65;
}

.intel-panel h4 {
  margin-top: 12px;
  margin-bottom: 6px;
}

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

.stack-item {
  border: 1px solid #d1e3f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f2f8ff);
  padding: 12px;
}

.stack-item p {
  margin: 6px 0 0;
  color: #315677;
}

.stack-item small {
  display: block;
  margin-top: 4px;
}

.stack-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f4ff;
  color: #0e5fa8;
  border: 1px solid #c9e0f4;
  font-size: 12px;
  font-weight: 700;
}

.pill-badge.warning {
  background: #fff5e8;
  color: #a26209;
  border-color: #f1d6b2;
}

.pill-badge.danger {
  background: #fff1f4;
  color: #b03652;
  border-color: #edc3ce;
}

.form-actions-inline {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  align-self: end;
}

.notice-card {
  padding-top: 14px;
  padding-bottom: 14px;
}

.notice-banner {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  border: 1px solid transparent;
}

.notice-banner.success {
  background: #ebf8ef;
  color: #1d6a3b;
  border-color: #bfe3c9;
}

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

.stat-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.mini-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mini-score-grid div {
  padding: 10px;
  border-radius: 10px;
  background: #f3f8ff;
  border: 1px solid #d1e3f4;
}

.mini-score-grid small {
  display: block;
  margin-bottom: 4px;
}

.meeting-hero {
  margin-bottom: 12px;
}

.meeting-single-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.saved-brief-picker {
  display: grid;
  gap: 6px;
  min-width: 280px;
}

.brief-primary-action {
  margin-top: 34px;
}

.saved-brief-picker label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.saved-brief-picker select:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.meeting-audience-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  min-width: 0;
}

.meeting-audience-grid > div {
  min-width: 0;
}
.meeting-audience-grid > div:first-child {
  min-height: 0;
}

.meeting-audience-grid .actor-pool {
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
}

.meeting-audience-grid .actor-pool::-webkit-scrollbar {
  width: 10px;
}

.meeting-audience-grid .actor-pool::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid rgba(18, 31, 48, 0.92);
}

.meeting-audience-grid .actor-pool::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.seat-count-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.seat-count-toolbar small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
}

.seat-count-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.seat-count-controls .pill-badge {
  min-width: 42px;
}

.round-table-wrap {
  position: relative;
  min-height: 600px;
  max-width: 100%;
  margin: 12px auto 0;
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(120, 198, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #15243a, #1f2835);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.round-table-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  margin-left: -110px;
  margin-top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1c324f, #081525 80%);
  border: 5px solid #233b5c;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 18px;
  color: #eef7ff;
}

.moderator-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.86;
}

.chair-card {
  width: 100%;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(6px);
}

.moderator-card strong,
.moderator-card small {
  color: #f6fbff;
}

.table-center-copy {
  font-size: 12px;
  line-height: 1.4;
  color: #dceeff;
  max-width: 150px;
}

.round-table-seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.table-seat {
  position: absolute;
  width: 160px;
  min-height: 84px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  padding: 8px;
  background: rgba(8, 24, 44, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.table-seat > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #b6c6d7;
  text-align: center;
  margin-top: 18px;
}

.table-seat .actor-card {
  margin-bottom: 0;
}

.compact-table {
  margin-top: 12px;
}

.meeting-action-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.meeting-brief-card {
  background: linear-gradient(180deg, #f9fcff, #edf6ff);
}

#recommendation-panel {
  min-width: 0;
}

#recommendation-panel > p {
  margin: 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(31, 40, 53, 0.72), rgba(18, 31, 48, 0.82));
  color: var(--ink-soft);
}

.app-alert-card {
  width: min(420px, 100%);
}

#analysis-brief-backdrop .analysis-brief-modal {
  width: min(1120px, calc(100vw - 64px)) !important;
  max-width: 1120px !important;
  max-height: calc(100vh - 32px) !important;
  padding: 26px 28px;
  background:
    radial-gradient(circle at top right, rgba(25, 181, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff, #eef7ff);
  display: grid;
  grid-template-rows: auto auto;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

.analysis-brief-header {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.analysis-brief-header h3 {
  font-size: 32px;
  line-height: 1.2;
}

.analysis-brief-intro,
#analysis-brief-intro {
  color: #456989;
  font-size: 16px;
  line-height: 1.55;
}

#analysis-brief-backdrop .analysis-brief-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px 14px;
  align-content: start;
}

#analysis-brief-backdrop .analysis-brief-body .analysis-brief-highlight {
  grid-column: 1 / -1;
}

.analysis-brief-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #d4e6f7;
  background: linear-gradient(180deg, #ffffff, #f5faff);
}

.analysis-brief-card h4 {
  margin: 0 0 8px;
  color: #173f65;
}

.analysis-brief-card p {
  margin: 0;
  color: #335778;
  line-height: 1.65;
  font-size: 16px;
}

.analysis-brief-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #284d70;
  font-size: 16px;
  line-height: 1.6;
}

.analysis-brief-card li + li {
  margin-top: 6px;
}

.analysis-brief-highlight {
  border-color: #b9daf4;
  background: linear-gradient(180deg, #f9fcff, #ecf6ff);
}

#analysis-brief-backdrop .analysis-brief-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
  padding-top: 4px;
  border-top: 1px solid #d7e8f8;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(238, 247, 255, 0), #eef7ff 28%);
  z-index: 2;
}

#analysis-brief-print {
  background: linear-gradient(180deg, #1d3550, #112438);
  border: 1px solid #c9dced;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 36, 56, 0.18);
}

#analysis-brief-close {
  color: #ffffff;
}

body.printing-analysis-brief #analysis-brief-backdrop[hidden] {
  display: flex !important;
}

.busy-modal {
  width: min(520px, 100%);
  padding: 28px;
  text-align: center;
}

.busy-modal h3 {
  margin-bottom: 10px;
}

.busy-modal p {
  line-height: 1.6;
}

.busy-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: #ff6a00;
  animation: conclave-spin 0.9s linear infinite;
}

@keyframes conclave-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.anonymous-panel {
  display: grid;
  gap: 14px;
}

.panel-hero {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 106, 0, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(18, 31, 48, 0.96), rgba(14, 25, 39, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.panel-hero p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.panel-hero h3 {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.35;
}

.panel-section {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 40, 53, 0.96), rgba(18, 31, 48, 0.96));
}

.panel-section h4 {
  margin: 0 0 8px;
  color: var(--ink);
}

.panel-section p,
.panel-section li,
.panel-section ol,
.panel-section ul {
  color: var(--ink-soft);
}

.panel-section ul,
.panel-section ol {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.65;
}

.trace-section {
  background:
    radial-gradient(circle at top right, rgba(255, 106, 0, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(20, 34, 52, 0.98), rgba(14, 25, 39, 0.98));
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.trace-stat {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.trace-stat strong {
  color: var(--ink);
}

.trace-stat small {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
}

.trace-copy {
  color: var(--ink-soft);
  line-height: 1.55;
}

.trace-summary-card {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.trace-summary-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.meeting-hero .detail-header,
.meeting-single-column > .card,
#outcome-section.card,
.busy-modal,
.app-alert-card {
  border-color: rgba(255, 255, 255, 0.1);
}

.meeting-hero .detail-header-copy p,
.meeting-single-column .help-text,
.meeting-step-notes .help-text,
#analysis-status,
.saved-brief-picker small,
.table-seat > span,
.saved-brief-picker option,
.meeting-action-row span {
  color: var(--ink-soft);
}

.meeting-hero h2,
.meeting-single-column h3,
.meeting-single-column h4,
.saved-brief-picker label,
.seat-count-toolbar strong,
.field-label-row label,
#outcome-section label,
.meeting-action-row strong {
  color: var(--ink);
}

.meeting-single-column > .card,
.meeting-hero.card,
#outcome-section.card {
  position: relative;
  overflow: hidden;
}

.meeting-hero.card::before,
.meeting-single-column > .card::before,
#outcome-section.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.4), rgba(255, 255, 255, 0.03) 40%, transparent 100%);
  pointer-events: none;
}

.saved-brief-picker,
.meeting-step-notes,
.outcome-form,
#outcome-advice-panel {
  min-width: 0;
}

.saved-brief-picker select,
#speaker-person-id,
#meeting-goal-input,
#text-input,
#outcome-resistance,
#outcome-movements,
#outcome-adjustment {
  background: rgba(8, 24, 44, 0.72);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

.meeting-action-row {
  display: flex;
}

.meeting-action-row label[for="pptx-file"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--ink);
  cursor: pointer;
}

#pptx-file {
  color: var(--ink-soft);
}

#document-id-label {
  color: var(--ink);
}

.meeting-step-notes {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.meeting-step-notes p + p {
  margin-top: 8px;
}

#analysis-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 106, 0, 0.14);
  background: rgba(255, 106, 0, 0.08);
}

.seat-count-controls .btn-secondary {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

.seat-count-controls .pill-badge {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.outcome-form {
  display: grid;
  gap: 12px;
}

.outcome-form textarea {
  min-height: 88px;
}

#outcome-advice-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#outcome-advice-panel hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 0 18px;
}

.timeline-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.timeline-step {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d1e3f4;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  opacity: 0.72;
}

.timeline-step.active {
  opacity: 1;
  border-color: #98c7ed;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9fc8ec;
}

.timeline-step.active .timeline-dot {
  background: #0e71c5;
}

.timeline-step small {
  font-size: 12px;
}

.intel-tab-panel {
  display: none;
}

.intel-tab-panel.active {
  display: block;
}

@media (max-width: 1400px) {
  .intel-grid,
  .timeline-strip,
  .meeting-audience-grid {
    grid-template-columns: 1fr;
  }

  .round-table-wrap {
    min-height: 640px;
    padding: 18px;
  }

  .table-seat {
    width: 144px;
    padding: 6px;
    min-height: 78px;
  }

  .table-seat > span {
    margin-top: 14px;
    font-size: 11px;
  }
}

.group-grid.one-col {
  grid-template-columns: 1fr;
}

.group-grid.two-cols {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.group-grid.three-cols {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.person-data-submit {
  min-height: 48px;
  width: fit-content;
  min-width: 260px;
}

.event-submit {
  grid-column: 1 / 2;
  align-self: end;
  min-height: 48px;
}

.people-filter-submit {
  grid-column: 1 / 2;
  min-height: 48px;
  align-self: end;
}

.range-meta,
.range-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.range-meta {
  margin-bottom: 8px;
  color: #537391;
  font-size: 12px;
}

.range-meta strong {
  min-width: 28px;
  text-align: center;
  color: #0d5ea7;
  font-size: 18px;
}

.range-input {
  padding: 0;
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  height: 24px;
}

.range-input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8d9f6, #1986e3);
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0f71c6;
  margin-top: -6px;
  box-shadow: 0 2px 8px rgba(15, 113, 198, 0.25);
}

.range-input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8d9f6, #1986e3);
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #0f71c6;
  box-shadow: 0 2px 8px rgba(15, 113, 198, 0.25);
}

.range-scale {
  margin-top: 6px;
  color: #6283a2;
  font-size: 11px;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.table-sort-link.active {
  color: #0f71c6;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .shell-body {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(158, 203, 241, 0.22);
  }

  .shell-main {
    height: auto;
    overflow: visible;
    width: auto;
  }

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

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

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

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

  .orgchart-shell {
    grid-template-columns: 1fr;
  }

  .orgchart-stage.clean {
    min-height: 460px;
  }

  .orgchart-canvas {
    min-width: 900px;
  }

  .grid-form.compact,
  .actor-grid,
  .profile-grid,
  .event-form,
  .people-filter-grid {
    grid-template-columns: 1fr;
  }

  .person-data-layout,
  .group-grid.two-cols,
  .group-grid.three-cols {
    grid-template-columns: 1fr;
  }

  .row {
    flex-wrap: wrap;
  }

  .detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-header-actions {
    flex-wrap: wrap;
  }

  .hint {
    display: none;
  }
}

@media (max-width: 700px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .shell-content {
    padding: 14px;
  }

  .orgmap-quick-add {
    flex-direction: column;
    align-items: stretch;
  }

  .orgchart-stage.clean {
    min-height: 400px;
    padding: 10px;
  }

  .orgchart-viewport.clean {
    inset: 10px;
  }

  .orgchart-stage.clean .orgchart-lines {
    inset: 10px;
  }

  .graph-node-card.clean {
    width: 172px;
  }

  .zoom-control {
    width: 100%;
    justify-content: space-between;
  }

  .relationship-chip-grid {
    grid-template-columns: 1fr;
  }

  .analysis-brief-header h3 {
    font-size: 26px;
  }

  #analysis-brief-backdrop .analysis-brief-modal {
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    padding: 22px;
  }

  #analysis-brief-backdrop .analysis-brief-body {
    grid-template-columns: 1fr;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .topbar,
  .sidebar,
  .shell-header,
  .shell-content,
  #app-alert-backdrop,
  #busy-backdrop {
    display: none !important;
  }

  #analysis-brief-backdrop {
    position: static !important;
    inset: auto !important;
    display: block !important;
    visibility: visible !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  body.printing-analysis-brief #analysis-brief-backdrop[hidden] {
    display: block !important;
    visibility: visible !important;
  }

  #analysis-brief-backdrop .analysis-brief-modal {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  #analysis-brief-backdrop .analysis-brief-modal,
  #analysis-brief-backdrop .analysis-brief-header,
  #analysis-brief-backdrop .analysis-brief-body,
  #analysis-brief-backdrop .analysis-brief-card,
  #analysis-brief-backdrop .analysis-brief-card *,
  #analysis-brief-title,
  #analysis-brief-intro,
  #analysis-brief-backdrop .pill-badge {
    color: #111827 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
  }

  #analysis-brief-backdrop .analysis-brief-modal,
  #analysis-brief-backdrop .analysis-brief-card,
  #analysis-brief-backdrop .analysis-brief-highlight {
    background: #ffffff !important;
    background-image: none !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
  }

  #analysis-brief-backdrop .analysis-brief-header h3,
  #analysis-brief-backdrop .analysis-brief-card h4,
  #analysis-brief-backdrop .analysis-brief-card strong,
  #analysis-brief-backdrop .analysis-brief-card li,
  #analysis-brief-backdrop .analysis-brief-card p,
  #analysis-brief-intro {
    color: #111827 !important;
  }

  #analysis-brief-backdrop .pill-badge {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #173f65 !important;
  }

  #analysis-brief-backdrop .analysis-brief-actions {
    display: none !important;
  }

  .analysis-brief-card,
  .panel-section,
  .trace-summary-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #analysis-brief-backdrop .analysis-brief-body {
    grid-template-columns: 1fr !important;
  }
}

/* Outcome Section & Results */
#outcome-section {
  border: 1px solid #9abfe3;
  background: linear-gradient(180deg, #f0f7ff, #ffffff);
  border-left: 6px solid var(--primary);
  margin-top: 24px;
}

.outcome-form textarea {
  background: #fdfdff;
  border-color: #d2e5f7;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.outcome-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17, 121, 211, 0.1);
}

.switch-container {
  display: flex;
  align-items: center;
}

.switch-input {
  display: none;
}

.switch-label {
  width: 44px;
  height: 24px;
  background-color: #cbd5e0;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.switch-label::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background-color: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

.switch-input:checked + .switch-label {
  background-color: var(--primary);
}

.switch-input:checked + .switch-label::before {
  transform: translateX(20px);
}

.outcome-advice-panel {
  margin-top: 24px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.advice-block {
  padding: 16px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid #e2eef9;
}

.advice-block h5 {
  margin: 0 0 10px 0;
  color: var(--primary-strong);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.advice-block ul {
  padding-left: 18px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.advice-block li {
  margin-bottom: 6px;
}

.coaching-highlight {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(90deg, #fff9f0, #fffcf5);
  border-radius: 10px;
  border-left: 4px solid #f6ad55;
  color: #744210;
  font-size: 14px;
  line-height: 1.5;
}

.coaching-highlight strong {
  color: #975a16;
}

/* Conclave Lab dark brand layer */
body:not(.no-shell) {
  background:
    radial-gradient(900px 460px at 78% -20%, rgba(255, 106, 0, 0.12), transparent 58%),
    radial-gradient(760px 420px at -12% 12%, rgba(10, 45, 94, 0.34), transparent 62%),
    linear-gradient(145deg, #08182c 0%, #0a2d5e 44%, #06152a 100%);
}

body.no-shell {
  background:
    radial-gradient(760px 420px at 84% 4%, rgba(255, 106, 0, 0.13), transparent 62%),
    linear-gradient(145deg, #08182c 0%, #0b2038 48%, #06152a 100%);
}

.shell-content {
  background: transparent;
}

.card,
.admin-card,
.guide-card,
.stat-card,
.stack-item,
.field-card,
.role-card,
.ai-review-block,
.project-input-card,
.project-thinking-card,
.people-count-box,
.orgchart-selection-card,
.orgmap-node-card,
.left-panel,
.center-panel,
.right-panel,
.login-card,
.outcome-advice-panel,
.advice-block {
  background: linear-gradient(180deg, rgba(31, 40, 53, 0.96), rgba(18, 31, 48, 0.96));
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.dashboard-hero,
.orgmap-hero,
.career-controls,
.results-card {
  background: linear-gradient(180deg, rgba(31, 40, 53, 0.94), rgba(18, 31, 48, 0.96));
}

.dashboard-hero,
.orgmap-hero,
.career-controls {
  border-top-color: #ff6a00;
}

h1,
h2,
h3,
h4,
h5,
.detail-header h2,
.section-intro h3,
.guide-card h3,
.admin-card h2,
.stat-card small,
.stack-item strong,
.field-card label,
.role-card strong,
.graph-node-inner strong,
.advice-block h5 {
  color: var(--ink);
}

p,
li,
.help-text,
.card-lite,
.guide-card p,
.guide-card li,
.stack-item p,
.role-card small,
.graph-node-inner small,
.orgchart-selection-card small,
.stat-card p,
.advice-block li {
  color: var(--ink-soft);
}

textarea,
input,
select,
.custom-select {
  background: rgba(8, 24, 44, 0.74);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

textarea::placeholder,
input::placeholder {
  color: rgba(182, 198, 215, 0.58);
}

button,
.person-data-submit,
.btn-glow,
.tab-link.active,
button.tab-link.active {
  background: linear-gradient(135deg, #ff7a1f, #ff6a00);
  border-color: #ff6a00;
  color: #ffffff;
}

.btn-secondary,
.toolbar-link,
.tab-link,
button.tab-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--ink);
}

.pill-badge,
.coverage-pill.internal {
  background: rgba(255, 106, 0, 0.14);
  color: #ffbf8a;
}

.coverage-pill.external,
.coverage-pill.missing,
.pill-badge.warning {
  background: rgba(255, 106, 0, 0.18);
  color: #ffd3b4;
}

.admin-table,
.compact-table {
  background: rgba(8, 24, 44, 0.42);
  color: var(--ink);
}

.admin-table th,
.compact-table th {
  background: rgba(255, 106, 0, 0.13);
  color: var(--ink);
}

.admin-table td,
.compact-table td {
  border-color: rgba(255, 255, 255, 0.09);
  color: var(--ink-soft);
}

.orgchart-stage,
.orgchart-stage.clean,
.orgchart-stage.functional {
  border-color: rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(13, 32, 54, 0.96), rgba(8, 24, 44, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}

.graph-node-inner,
.graph-node-card.formal.clean .graph-node-inner,
.graph-node-card.functional.clean .graph-node-inner {
  background: linear-gradient(180deg, rgba(31, 40, 53, 0.98), rgba(18, 31, 48, 0.98));
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--ink);
}

.graph-node-inner.executive,
.graph-node-card.selected .graph-node-inner {
  border-color: #ff6a00;
  box-shadow: 0 18px 34px rgba(255, 106, 0, 0.18);
}

.notice-banner,
.provider-warning,
.coaching-highlight {
  background: rgba(255, 106, 0, 0.13);
  border-color: rgba(255, 106, 0, 0.34);
  color: #ffd3b4;
}

.coaching-highlight strong {
  color: #ffbf8a;
}

