:root {
  --bg: #edf2f7;
  --bg-soft: rgba(255, 255, 255, 0.74);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(8, 15, 28, 0.9);
  --line: #d8e0ea;
  --line-strong: #b8c5d6;
  --text: #172033;
  --muted: #5f6c80;
  --muted-soft: #8ea0b8;
  --shadow: 0 24px 70px -38px rgba(15, 23, 42, 0.5);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --architecture: #f59e0b;
  --structure: #0ea5e9;
  --electrical: #8b5cf6;
  --hydraulic: #10b981;
  --ac: #f43f5e;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.1), transparent 22%),
    linear-gradient(180deg, #f4f7fb 0%, var(--bg) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1720px;
  margin: 0 auto;
  padding: 18px;
}

.app-topbar,
.security-banner {
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.68);
}

.app-topbar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.05em;
}

.app-brand-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.access-switcher {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.88);
}

.access-chip {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.access-chip:hover,
.access-chip:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.access-chip.is-active {
  background: linear-gradient(145deg, rgba(8, 15, 28, 0.94), rgba(15, 23, 42, 0.9));
  color: #fff;
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.72);
}

.session-box {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.session-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.security-banner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.72)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 34%);
}

.security-banner-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.security-banner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.top-tabs-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.top-tabs-auth-button {
  min-height: 42px;
  padding-inline: 18px;
}

.top-tab-button {
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.top-tab-button:hover,
.top-tab-button:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.top-tab-button.is-active {
  background: linear-gradient(145deg, rgba(8, 15, 28, 0.94), rgba(15, 23, 42, 0.9));
  color: #fff;
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.72);
}

.tab-panel {
  display: grid;
  gap: 18px;
}

.tab-panel[hidden] {
  display: none !important;
}

.hero-panel,
.board-panel,
.modal {
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(8, 15, 28, 0.92), rgba(15, 23, 42, 0.86));
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.46;
  background-image:
    linear-gradient(
      to left,
      rgba(56, 189, 248, 0.04) 0%,
      rgba(15, 23, 42, 0.18) 22%,
      rgba(15, 23, 42, 0.56) 48%,
      rgba(15, 23, 42, 0.9) 72%,
      rgba(15, 23, 42, 0.98) 100%
    ),
    var(--hero-illustration);
  background-repeat: no-repeat, no-repeat;
  background-position: center, right center;
  background-size: cover, min(42vw, 440px) auto;
}

.board-hero {
  --hero-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 320' fill='none'%3E%3Crect x='172' y='24' width='316' height='280' rx='20' stroke='%23d9f3ff' stroke-width='2' opacity='0.18'/%3E%3Cline x1='278' y1='24' x2='278' y2='304' stroke='%23d9f3ff' stroke-width='1.5' opacity='0.18' stroke-dasharray='4 4'/%3E%3Cline x1='384' y1='24' x2='384' y2='304' stroke='%23d9f3ff' stroke-width='1.5' opacity='0.18' stroke-dasharray='4 4'/%3E%3Crect x='182' y='34' width='86' height='26' rx='8' stroke='%23d9f3ff' stroke-width='2.5' opacity='0.55'/%3E%3Crect x='288' y='34' width='86' height='26' rx='8' stroke='%2393c5fd' stroke-width='2.5'/%3E%3Crect x='394' y='34' width='86' height='26' rx='8' stroke='%23d9f3ff' stroke-width='2.5' opacity='0.55'/%3E%3Crect x='182' y='74' width='86' height='64' rx='10' stroke='%23d9f3ff' stroke-width='3'/%3E%3Cline x1='194' y1='90' x2='254' y2='90' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='194' y1='102' x2='246' y2='102' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Cline x1='194' y1='113' x2='238' y2='113' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.45'/%3E%3Ccircle cx='253' cy='127' r='5' fill='%2393c5fd' opacity='0.8'/%3E%3Crect x='182' y='152' width='86' height='64' rx='10' stroke='%23d9f3ff' stroke-width='3'/%3E%3Cline x1='194' y1='168' x2='250' y2='168' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='194' y1='180' x2='244' y2='180' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Cline x1='194' y1='191' x2='236' y2='191' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.45'/%3E%3Ccircle cx='200' cy='204' r='4' fill='%2393c5fd' opacity='0.55'/%3E%3Crect x='288' y='74' width='86' height='64' rx='10' stroke='%23d9f3ff' stroke-width='3.5'/%3E%3Cline x1='300' y1='90' x2='360' y2='90' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='300' y1='102' x2='352' y2='102' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Crect x='300' y='116' width='62' height='5' rx='2.5' fill='%23d9f3ff' opacity='0.2'/%3E%3Crect x='300' y='116' width='42' height='5' rx='2.5' fill='%2393c5fd'/%3E%3Crect x='288' y='152' width='86' height='64' rx='10' stroke='%23d9f3ff' stroke-width='3'/%3E%3Cline x1='300' y1='168' x2='358' y2='168' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='300' y1='180' x2='350' y2='180' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3Crect x='300' y='194' width='62' height='5' rx='2.5' fill='%23d9f3ff' opacity='0.2'/%3E%3Crect x='300' y='194' width='22' height='5' rx='2.5' fill='%2393c5fd' opacity='0.65'/%3E%3Crect x='394' y='74' width='86' height='64' rx='10' stroke='%23d9f3ff' stroke-width='3'/%3E%3Cline x1='406' y1='90' x2='464' y2='90' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M408 112l10 11 20-22' stroke='%2393c5fd' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='394' y='152' width='86' height='52' rx='10' stroke='%23d9f3ff' stroke-width='3' opacity='0.7'/%3E%3Cline x1='406' y1='168' x2='462' y2='168' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round' opacity='0.7'/%3E%3Cpath d='M408 186l9 10 18-20' stroke='%2393c5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='0.7'/%3E%3Crect x='288' y='228' width='86' height='26' rx='8' stroke='%23d9f3ff' stroke-width='2' stroke-dasharray='5 3' opacity='0.4'/%3E%3Cline x1='331' y1='236' x2='331' y2='244' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3Cline x1='327' y1='240' x2='335' y2='240' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3C/svg%3E");
}

.checkpoint-hero {
  --hero-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 320' fill='none'%3E%3Crect x='210' y='30' width='178' height='264' rx='22' stroke='%23d9f3ff' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='256' y='22' width='86' height='30' rx='10' stroke='%23d9f3ff' stroke-width='4'/%3E%3Crect x='228' y='58' width='62' height='16' rx='5' fill='%2393c5fd' opacity='0.22'/%3E%3Cline x1='228' y1='80' x2='370' y2='80' stroke='%2393c5fd' stroke-width='1.5' opacity='0.4'/%3E%3Ccircle cx='232' cy='110' r='9' stroke='%23d9f3ff' stroke-width='3'/%3E%3Cpath d='M225 110l6 6 10-11' stroke='%2393c5fd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='252' y1='107' x2='372' y2='107' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='252' y1='118' x2='358' y2='118' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.6'/%3E%3Ccircle cx='232' cy='152' r='9' stroke='%23d9f3ff' stroke-width='3'/%3E%3Cpath d='M225 152l6 6 10-11' stroke='%2393c5fd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='252' y1='149' x2='372' y2='149' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='252' y1='160' x2='348' y2='160' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.6'/%3E%3Ccircle cx='232' cy='194' r='9' stroke='%23d9f3ff' stroke-width='3' stroke-dasharray='5 3'/%3E%3Cline x1='252' y1='191' x2='372' y2='191' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round'/%3E%3Cline x1='252' y1='202' x2='360' y2='202' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.6'/%3E%3Ccircle cx='232' cy='236' r='9' stroke='%23d9f3ff' stroke-width='3' opacity='0.45'/%3E%3Cline x1='252' y1='233' x2='366' y2='233' stroke='%23d9f3ff' stroke-width='2.5' stroke-linecap='round' opacity='0.45'/%3E%3Cline x1='252' y1='244' x2='348' y2='244' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' opacity='0.3'/%3E%3Cpath d='M397 38l5 12 12 5-12 5-5 12-5-12-12-5 12-5z' stroke='%2393c5fd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.governance-hero {
  --hero-illustration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 320' fill='none'%3E%3Cellipse cx='300' cy='170' rx='116' ry='120' stroke='%2393c5fd' stroke-width='1.5' opacity='0.12'/%3E%3Cellipse cx='300' cy='170' rx='90' ry='96' stroke='%2393c5fd' stroke-width='1.5' opacity='0.18'/%3E%3Cpath d='M300 44l96 36v72c0 62-42 112-96 132-54-20-96-70-96-132V80z' stroke='%23d9f3ff' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M300 70l64 24v46c0 42-28 76-64 90-36-14-64-48-64-90V94z' stroke='%23d9f3ff' stroke-width='2' opacity='0.38' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M262 170l28 30 52-56' stroke='%2393c5fd' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='396' y1='120' x2='442' y2='110' stroke='%23d9f3ff' stroke-width='2' opacity='0.5'/%3E%3Ccircle cx='446' cy='108' r='6' fill='%2393c5fd' opacity='0.75'/%3E%3Cline x1='396' y1='162' x2='450' y2='162' stroke='%23d9f3ff' stroke-width='2' opacity='0.5'/%3E%3Ccircle cx='454' cy='162' r='6' fill='%2393c5fd' opacity='0.6'/%3E%3Cline x1='396' y1='204' x2='442' y2='216' stroke='%23d9f3ff' stroke-width='2' opacity='0.5'/%3E%3Ccircle cx='446' cy='218' r='6' fill='%2393c5fd' opacity='0.45'/%3E%3Cline x1='204' y1='120' x2='160' y2='110' stroke='%23d9f3ff' stroke-width='2' opacity='0.32'/%3E%3Ccircle cx='156' cy='108' r='5' fill='%2393c5fd' opacity='0.38'/%3E%3Cline x1='204' y1='170' x2='152' y2='170' stroke='%23d9f3ff' stroke-width='2' opacity='0.32'/%3E%3Ccircle cx='148' cy='170' r='5' fill='%2393c5fd' opacity='0.32'/%3E%3Cline x1='204' y1='218' x2='160' y2='228' stroke='%23d9f3ff' stroke-width='2' opacity='0.25'/%3E%3Ccircle cx='156' cy='230' r='5' fill='%2393c5fd' opacity='0.25'/%3E%3C/svg%3E");
}

.hero-copy {
  max-width: 840px;
  display: grid;
  gap: 4px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #93c5fd;
}

.eyebrow-light {
  color: var(--muted-soft);
}

.hero-panel h1,
.hero-panel h2,
.board-heading h2,
.modal h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero-panel h1,
.hero-panel h2 {
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.05;
}

.hero-text,
.modal-help,
.board-help {
  margin: 0;
  line-height: 1.6;
}

.hero-text {
  margin-top: 0;
  max-width: 720px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  align-items: center;
}

.toolbar {
  display: grid;
  gap: 12px;
}

.column-visibility-panel {
  display: grid;
  gap: 10px;
}

.toolbar-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.column-visibility-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.74);
}

.column-visibility-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 520px;
  min-width: 0;
}

.discipline-filter-box {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.discipline-filter-label {
  font-size: 13px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.74);
  white-space: nowrap;
}

.discipline-filter-box select {
  min-width: 220px;
  min-height: 38px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 15, 28, 0.34);
  color: #fff;
  outline: none;
  appearance: none;
}

.discipline-filter-box select:focus {
  border-color: rgba(125, 211, 252, 0.72);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.filter-button {
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

.filter-button:hover,
.filter-button:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.filter-button.active {
  box-shadow: 0 14px 28px -20px rgba(15, 23, 42, 0.7);
}

.visibility-button {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.visibility-button:hover,
.visibility-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

.visibility-button.is-hidden {
  opacity: 0.58;
  background: rgba(15, 23, 42, 0.16);
}

.filter-all {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.board-panel {
  min-width: 0;
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
}

.governance-hero {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(8, 15, 28, 0.96), rgba(30, 41, 59, 0.9));
}

.board-gate {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.48);
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.74)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 32%);
}

.board-gate h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.board-gate p {
  margin: 0 0 16px;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.55;
}

.tab-panel > .board-panel:first-child,
.tab-panel > .hero-panel:first-child {
  margin-top: 0;
}

.placeholder-panel {
  min-height: 340px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 28%);
}

.placeholder-copy {
  max-width: 680px;
  text-align: center;
}

.placeholder-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.05em;
}

.placeholder-help {
  max-width: 560px;
  margin: 14px auto 0;
  text-align: center;
}

.checkpoint-hero {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(8, 15, 28, 0.94), rgba(15, 23, 42, 0.86));
}

.checkpoint-shell {
  padding: 24px;
}

.checkpoint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.checkpoint-block {
  display: grid;
  gap: 18px;
  padding: 22px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.66)),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 34%);
  box-shadow: 0 18px 48px -34px rgba(15, 23, 42, 0.48);
}

.checkpoint-archived-block {
  background:
    linear-gradient(160deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.74)),
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.12), transparent 34%);
}

.checkpoint-block-header,
.checkpoint-block-header-archived,
.checkpoint-header-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.checkpoint-block-header h2 {
  font-size: 28px;
}

.checkpoint-list {
  display: grid;
  gap: 12px;
}

.checkpoint-toolbar {
  display: grid;
  gap: 12px;
}

.checkpoint-ai-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(224, 242, 254, 0.82)),
    radial-gradient(circle at right top, rgba(14, 165, 233, 0.14), transparent 36%);
}

.checkpoint-ai-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #075985;
}

.checkpoint-ai-help {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.checkpoint-configure-ai-button {
  white-space: nowrap;
}

.checkpoint-feedback {
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.5;
}

.checkpoint-feedback.is-success {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(236, 253, 245, 0.96);
  color: #065f46;
}

.checkpoint-feedback.is-error {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(254, 242, 242, 0.98);
  color: #991b1b;
}

.checkpoint-item,
.checkpoint-empty {
  border-radius: 22px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background: rgba(255, 255, 255, 0.76);
}

.checkpoint-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}

.checkpoint-item-main {
  display: grid;
  gap: 14px;
}

.checkpoint-pauta-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.checkpoint-pauta-header-main,
.checkpoint-topic-header-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.checkpoint-pauta-header-main {
  flex: 1 1 auto;
}

.checkpoint-pauta-meta {
  flex: 0 0 auto;
}

.checkpoint-pauta-title {
  margin: 8px 0 0;
  font-size: 20px;
}

.checkpoint-pauta-title-input {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
}

.checkpoint-pauta-title-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.checkpoint-pauta-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  text-align: right;
}

.checkpoint-pauta-author {
  font-size: 11px;
  color: var(--muted-soft);
}

.checkpoint-pauta-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.checkpoint-pauta-meta-copy {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
}

.checkpoint-topic-list {
  display: grid;
  gap: 12px;
}

.checkpoint-topic {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  padding-right: 58px;
  border-radius: 20px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  background: rgba(248, 250, 252, 0.92);
}

.checkpoint-topic.is-latest-validated {
  border-left: 6px solid #0f766e;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(248, 250, 252, 0.96)),
    rgba(248, 250, 252, 0.92);
  box-shadow: 0 18px 32px -24px rgba(15, 118, 110, 0.48);
}

.checkpoint-topic-body {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.checkpoint-topic-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.checkpoint-topic-content {
  min-width: 0;
}

.checkpoint-topic-date-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.checkpoint-topic-date-input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.checkpoint-topic-date-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.checkpoint-topic-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.checkpoint-topic-status {
  color: var(--muted);
  font-size: 13px;
}

.checkpoint-topic-order {
  color: #0f766e;
}

.checkpoint-pauta-actions {
  align-content: start;
}

.checkpoint-empty {
  padding: 32px 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(248, 250, 252, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.checkpoint-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  max-width: 280px;
}

.checkpoint-date-label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.checkpoint-topic-author {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.checkpoint-textarea {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  resize: vertical;
  background: rgba(248, 250, 252, 0.94);
  color: var(--text);
  line-height: 1.55;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.checkpoint-textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
  background: #fff;
}

.checkpoint-topic-textarea {
  min-height: 124px;
  height: 100%;
}

.checkpoint-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-self: end;
  margin-top: 4px;
}

.checkpoint-delete-affordance {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 999px;
  background: #fff5f5;
  color: #991b1b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.checkpoint-delete-affordance:hover,
.checkpoint-delete-affordance:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.36);
  background: #fee2e2;
}

.checkpoint-delete-affordance:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  background: rgba(255, 245, 245, 0.84);
}

.checkpoint-action-button {
  min-width: 112px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    background-color 0.18s ease;
}

.checkpoint-action-button:hover,
.checkpoint-action-button:focus-visible,
.checkpoint-toggle-button:hover,
.checkpoint-toggle-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  color: var(--text);
}

.checkpoint-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.checkpoint-action-button.is-archive {
  color: #92400e;
  background: #fff7ed;
  border-color: rgba(245, 158, 11, 0.22);
}

.checkpoint-action-button.is-restore {
  color: #075985;
  background: #f0f9ff;
  border-color: rgba(14, 165, 233, 0.22);
}

.checkpoint-action-button.is-ai {
  color: #4338ca;
  background: #eef2ff;
  border-color: rgba(99, 102, 241, 0.2);
}

.checkpoint-action-button.is-add-topic {
  color: #0f766e;
  background: #ecfeff;
  border-color: rgba(13, 148, 136, 0.2);
}

.checkpoint-action-button.is-delete-pauta {
  color: #991b1b;
  background: #fff1f2;
  border-color: rgba(244, 63, 94, 0.2);
}

.checkpoint-add-button,
.checkpoint-toggle-button {
  min-height: 46px;
}

.checkpoint-archived-content {
  display: grid;
  gap: 12px;
}

.checkpoint-archived-block.is-collapsed .checkpoint-archived-content {
  display: none;
}

.checkpoint-archived-text {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.94);
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.board-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.board-heading h2 {
  font-size: 28px;
}

.board-help {
  max-width: 420px;
  color: var(--muted);
  text-align: right;
}

.board-columns-shell {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.board-columns {
  display: flex;
  gap: 16px;
  width: max-content;
  min-width: 100%;
}

.column {
  width: 326px;
  min-width: 326px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: var(--panel);
  box-shadow: 0 18px 48px -34px rgba(15, 23, 42, 0.58);
}

.column-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.column-header h3 {
  margin: 6px 0 4px;
  font-size: 17px;
}

.column-header p,
.column-empty {
  margin: 0;
  color: var(--muted);
}

.column-counter {
  min-width: 44px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 18px;
  background: #e8eef5;
  font-weight: 800;
}

.column-body {
  min-height: 260px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 4px;
  border-radius: 22px;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.column-body.drag-over {
  background: rgba(14, 165, 233, 0.12);
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.22);
}

.column-empty {
  min-height: 212px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px 20px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.7);
}

.column-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 160px;
  line-height: 1.5;
}

.card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-left: 5px solid var(--discipline-color, #94a3b8);
  border-radius: 24px;
  background: var(--discipline-bg, rgba(255, 255, 255, 0.9));
  box-shadow: 0 16px 36px -30px rgba(15, 23, 42, 0.62);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.52);
}

.card.dragging {
  opacity: 0.45;
  transform: rotate(1deg);
}

.card.is-readonly {
  cursor: default;
}

.card.is-readonly:hover {
  transform: none;
  box-shadow: 0 16px 36px -30px rgba(15, 23, 42, 0.62);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.card-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.ghost-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background-color 0.18s ease;
}

.icon-button:hover,
.ghost-icon-button:hover,
.icon-button:focus-visible,
.ghost-icon-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
}

.delete-button {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.16);
  background: rgba(254, 242, 242, 0.82);
}

.delete-button:hover,
.delete-button:focus-visible {
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.32);
}

.ghost-icon-button {
  cursor: grab;
}

.ghost-icon-button:active {
  cursor: grabbing;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-footer {
  display: grid;
  gap: 10px;
}

.card-publication-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.card-publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-badge.is-internal {
  background: rgba(226, 232, 240, 0.88);
  color: #334155;
}

.status-badge.is-review {
  background: rgba(255, 237, 213, 0.96);
  color: #9a3412;
}

.status-badge.is-published {
  background: rgba(220, 252, 231, 0.96);
  color: #166534;
}

.status-badge.is-pending {
  background: rgba(254, 240, 138, 0.92);
  color: #854d0e;
}

.status-badge.is-validated {
  background: rgba(220, 252, 231, 0.96);
  color: #166534;
}

.status-badge.is-blocked {
  background: rgba(254, 226, 226, 0.96);
  color: #991b1b;
}

.publication-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.publication-button.is-review {
  color: #9a3412;
  background: #ffedd5;
  border-color: rgba(249, 115, 22, 0.22);
}

.publication-button.is-publish {
  color: #166534;
  background: #dcfce7;
  border-color: rgba(34, 197, 94, 0.22);
}

.publication-button.is-unpublish {
  color: #991b1b;
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.22);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill-neutral {
  background: rgba(255, 255, 255, 0.7);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.pill-blocked {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.16);
}

.pill-discipline {
  background: var(--discipline-pill-bg, rgba(255, 255, 255, 0.75));
  color: var(--discipline-pill-text, #1f2937);
  border: 1px solid rgba(255, 255, 255, 0.46);
}

.new-card-column-button,
.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 18px;
  font-weight: 800;
  border: 1px solid transparent;
}

.primary-button {
  background: #38bdf8;
  color: #07111f;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #7dd3fc;
}

.secondary-button {
  background: #fff;
  border-color: var(--line);
  color: var(--muted);
}

.header-button {
  min-width: 166px;
}

.new-card-column-button {
  background: rgba(248, 250, 252, 0.92);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.new-card-column-button:hover,
.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: #94a3b8;
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 15, 28, 0.58);
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
}

.modal-compact {
  width: min(560px, 100%);
}

.governance-shell {
  padding: 24px;
}

.governance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.governance-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 34%);
}

.governance-action-card {
  align-content: space-between;
}

.governance-action-copy,
.governance-inline-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.governance-action-footer,
.governance-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.governance-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.governance-card h3,
.governance-card h4 {
  margin: 0;
}

.governance-copy {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.governance-copy p {
  margin: 0;
}

.governance-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.governance-form {
  display: grid;
  gap: 16px;
}

.governance-modal-stack {
  display: grid;
  gap: 18px;
}

.governance-modal-section {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background: rgba(248, 250, 252, 0.72);
}

.governance-modal-section h3 {
  margin: 0;
}

.governance-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.governance-subtitle {
  margin-bottom: 10px;
  font-size: 15px;
}

.queue-list,
.classification-list,
.users-list,
.audit-log-list {
  display: grid;
  gap: 12px;
}

.queue-item,
.classification-item,
.user-row,
.audit-log-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background: rgba(255, 255, 255, 0.84);
}

.user-row-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.user-row-button:hover,
.user-row-button:focus-visible {
  border-color: rgba(56, 189, 248, 0.32);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.user-row-button.is-selected {
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

.queue-item p,
.classification-item p,
.user-row p,
.audit-log-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.queue-item strong,
.classification-item strong,
.user-row strong,
.audit-log-item strong {
  color: var(--text);
}

.user-row {
  display: grid;
  gap: 12px;
}

.user-row-header,
.audit-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-row-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.user-row-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
}

.permission-grid {
  display: grid;
  gap: 16px;
}

.permission-grid.is-readonly {
  grid-template-columns: 1fr;
}

.permission-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background: rgba(248, 250, 252, 0.86);
}

.permission-group-header {
  display: grid;
  gap: 4px;
}

.permission-group-header h4,
.permission-group-header p {
  margin: 0;
}

.permission-group-header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.permission-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.permission-toggle {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background: rgba(248, 250, 252, 0.92);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.permission-toggle input {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 22px;
  border: 1.5px solid rgba(148, 163, 184, 0.96);
  border-radius: 7px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.permission-toggle:hover {
  border-color: rgba(14, 165, 233, 0.28);
}

.permission-toggle:has(input:checked) {
  border-color: rgba(14, 165, 233, 0.28);
  background: rgba(240, 249, 255, 0.96);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.08);
}

.permission-toggle input::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.14s ease;
}

.permission-toggle input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.permission-toggle input:checked {
  border-color: #0284c7;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.permission-toggle input:checked::before {
  transform: rotate(-45deg) scale(1);
}

.user-role-select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 12px;
  background: #fff;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.mini-button.is-danger {
  color: #991b1b;
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.22);
}

.mini-button.is-success {
  color: #166534;
  background: #dcfce7;
  border-color: rgba(34, 197, 94, 0.22);
}

.privacy-login-note {
  font-size: 12px;
  color: var(--text-muted, #888);
  margin: 0;
  text-align: center;
}

.auth-form-support {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}

.text-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--accent, #3b82f6);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:hover {
  color: var(--accent-hover, #2563eb);
}

.demo-credentials {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(216, 224, 234, 0.92);
}

.demo-credentials-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.user-active-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(216, 224, 234, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    rgba(255, 255, 255, 0.92);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.user-active-toggle:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.user-active-toggle:has(input:checked) {
  border-color: rgba(14, 165, 233, 0.28);
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.96), rgba(224, 242, 254, 0.92)),
    rgba(240, 249, 255, 0.96);
}

.field .user-active-toggle input {
  appearance: none;
  width: 58px;
  min-width: 58px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  position: relative;
  display: block;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.field .user-active-toggle input:focus {
  border: none;
  box-shadow: none;
}

.field .user-active-toggle input::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
  transition: transform 0.18s ease;
}

.field .user-active-toggle input:checked {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.field .user-active-toggle input:checked::before {
  transform: translateX(24px);
}

.field .user-active-toggle input:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.user-active-copy {
  display: grid;
  gap: 3px;
}

.user-active-copy strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.user-active-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.governance-card-discreet {
  grid-column: 1 / -1;
  gap: 12px;
  padding: 18px 20px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.68)),
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.08), transparent 30%);
}

#user-admin-panel {
  grid-column: 1 / -1;
}

.governance-card-discreet .audit-log-list {
  gap: 8px;
}

.governance-card-discreet .audit-log-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.governance-card-discreet .audit-log-head,
.governance-card-discreet .audit-log-item p {
  font-size: 12px;
}

.audit-log-actor {
  font-size: 12px;
  font-weight: 800;
  color: #0369a1 !important;
}

.checkpoint-publication-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.checkpoint-publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.modal-header > div,
.modal-header-copy {
  min-width: 0;
}

.modal-header .icon-button {
  align-self: start;
  justify-self: end;
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.modal-help {
  margin-top: 10px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field > span,
.checkbox-row strong {
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  background: rgba(226, 232, 240, 0.78);
  color: var(--text);
}

.password-toggle-icon {
  width: 18px;
  height: 18px;
}

.form-error {
  margin: 18px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.form-error.is-success {
  color: #166534;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.34);
  border-radius: 999px;
}

@media (max-width: 980px) {
  .governance-split,
  .governance-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .checkpoint-grid {
    grid-template-columns: 1fr;
  }

  .board-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .board-help {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .hero-panel::after {
    opacity: 0.2;
    background-size: cover, 220px auto;
    background-position: center, right -18px center;
  }

  .app-shell {
    padding: 12px;
  }

  .top-tabs {
    padding: 8px;
  }

  .hero-panel,
  .board-panel,
  .modal {
    padding: 16px;
    border-radius: 24px;
  }

  .card-top,
  .modal-actions,
  .checkpoint-block-header,
  .checkpoint-block-header-archived,
  .checkpoint-header-actions {
    flex-direction: column;
  }

  .checkpoint-item {
    grid-template-columns: 1fr;
  }

  .checkpoint-ai-panel,
  .checkpoint-pauta-header,
  .checkpoint-topic-actions,
  .card-publication-row,
  .checkpoint-publication-row {
    flex-direction: column;
    align-items: stretch;
  }

  .checkpoint-topic-body {
    grid-template-columns: 1fr;
  }

  .checkpoint-pauta-subtitle {
    text-align: left;
  }

  .checkpoint-topic-date-field,
  .checkpoint-configure-ai-button {
    width: 100%;
  }

  .checkpoint-topic-date-input {
    width: 100%;
  }

  .checkpoint-delete-affordance {
    align-self: flex-end;
  }

  .checkpoint-item-actions,
  .checkpoint-pauta-actions {
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: column;
  }

  .access-switcher,
  .checkpoint-publication-actions,
  .card-publication-actions,
  .user-row-actions {
    width: 100%;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .permission-group-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-controls-row,
  .discipline-filter-box {
    flex-direction: column;
    align-items: stretch;
  }

  .discipline-filter-box select {
    min-width: 0;
    width: 100%;
  }

  .top-tab-button {
    width: 100%;
  }

  .top-tabs-actions {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions .primary-button,
  .modal-actions .secondary-button,
  .primary-button,
  .secondary-button,
  .header-button,
  .publication-button,
  .mini-button,
  .top-tabs-auth-button {
    width: 100%;
  }

  .checkpoint-action-button,
  .checkpoint-add-button,
  .checkpoint-toggle-button {
    width: 100%;
  }

  .checkpoint-item-actions {
    width: 100%;
  }

  .column {
    width: min(88vw, 320px);
    min-width: min(88vw, 320px);
  }
}

/* ── Brand / Logo ───────────────────────────────────── */
@media (max-width: 720px) {
  .hero-panel::after {
    opacity: 0.16;
    background-size: cover, 168px auto;
    background-position: center, calc(100% + 28px) calc(100% + 8px);
  }

  .hero-panel h1,
  .hero-panel h2 {
    font-size: clamp(22px, 7vw, 28px);
  }

  .header-actions {
    align-items: stretch;
    gap: 10px;
  }

  .toolbar-search-row {
    width: 100%;
    max-width: none;
    min-height: 42px;
    padding: 6px 12px;
  }

  .board-search-input {
    min-height: 30px;
    font-size: 13px;
  }

  .column-visibility-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    flex: none;
    gap: 8px;
  }

  .visibility-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    justify-content: center;
    padding: 10px 12px;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }

  .discipline-filter-box {
    gap: 8px;
    padding: 10px 12px;
    border-radius: 22px;
  }

  .discipline-filter-label {
    white-space: normal;
  }

  .discipline-filter-box select {
    min-height: 42px;
    padding-right: 14px;
  }

  .checkpoint-shell {
    padding: 16px;
  }

  .checkpoint-block {
    gap: 14px;
    padding: 16px;
  }

  .checkpoint-block-header,
  .checkpoint-block-header-archived,
  .checkpoint-header-actions {
    align-items: stretch;
  }

  .checkpoint-block-header h2 {
    font-size: 24px;
  }

  .checkpoint-ai-panel {
    padding: 14px;
    gap: 12px;
  }

  .checkpoint-ai-body {
    gap: 10px;
  }

  .checkpoint-pauta-meta,
  .checkpoint-pauta-meta-copy {
    width: 100%;
  }

  .checkpoint-pauta-meta {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .checkpoint-pauta-meta-copy {
    justify-items: start;
  }

  .checkpoint-pauta-title-input {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 16px;
  }
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  padding: 6px 16px 6px 6px;
  border-radius: var(--radius-md);
  margin-right: 4px;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.top-brand:hover {
  opacity: 0.82;
}

.top-brand-mark {
  flex-shrink: 0;
}

.top-brand-name {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.04em;
}

/* ── Button with icon ────────────────────────────────── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-icon svg {
  flex-shrink: 0;
}

/* ── Checkpoint action button icon alignment ─────────── */
.checkpoint-action-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── User avatar ─────────────────────────────────────── */
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.user-row-header {
  align-items: center;
  gap: 12px;
}

/* ── Column progress bar ─────────────────────────────── */
.column-progress {
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin: 6px 0 2px;
}

.column-progress-bar {
  height: 100%;
  background: #38bdf8;
  border-radius: 99px;
  transition: width 0.5s ease;
  min-width: 2px;
}

/* ── Drag-and-drop states ────────────────────────────── */
.card.dragging {
  opacity: 0.42;
  transform: rotate(1.5deg) scale(1.04);
  box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.45);
  z-index: 100;
  cursor: grabbing;
}

.column.is-drag-target {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 18px 48px -34px rgba(15, 23, 42, 0.58), 0 0 0 2px rgba(56, 189, 248, 0.18);
}

/* ── Spinner animation ───────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.75s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

/* ── Toasts ─────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: auto;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success { background: #166534; }
.toast-error   { background: #991b1b; }
.toast-warning { background: #92400e; }
.toast-info    { background: var(--panel-strong); }

/* ── Confirm modal ───────────────────────────────────── */
.confirm-modal-body {
  padding: 4px 0;
}

.confirm-modal-message {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 24px;
}

.danger-button {
  background: var(--danger);
  color: #fff;
}

.danger-button:hover,
.danger-button:focus-visible {
  background: #b91c1c;
}

/* ── OpenAI config modal ────────────────────────────── */
.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 4px;
}

/* ── Card description truncation ────────────────────── */
.card-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Blocked card ───────────────────────────────────── */
.card.is-blocked {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.9));
}

/* ── Date pills ─────────────────────────────────────── */
.pill.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.pill.is-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

/* ── Board search ───────────────────────────────────── */
.toolbar-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  flex: 1 1 200px;
  max-width: 340px;
  min-height: 46px;
}

.toolbar-search-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
}

.board-search-input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.board-search-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.board-search-input::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.6);
  cursor: pointer;
}

/* ── Date shortcuts ─────────────────────────────────── */
.date-shortcuts {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.date-shortcut-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.date-shortcut-btn:hover,
.date-shortcut-btn:focus-visible {
  border-color: #38bdf8;
  color: #0284c7;
  background: #f0f9ff;
}

/* ── AI panel collapse ──────────────────────────────── */
.checkpoint-ai-panel {
  flex-direction: column;
  align-items: stretch;
}

.checkpoint-ai-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: #075985;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.checkpoint-ai-toggle .chevron-icon {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.checkpoint-ai-toggle[aria-expanded="false"] .chevron-icon {
  transform: rotate(180deg);
}

.checkpoint-ai-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
  overflow: hidden;
  max-height: 400px;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}

.checkpoint-ai-body.is-collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── Top add button (hidden when no items) ──────────── */
.checkpoint-add-top-button {
  display: none;
}

.checkpoint-add-top-button.is-visible {
  display: inline-flex;
}

/* ── Board column indicator ─────────────────────────── */
.board-column-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  width: fit-content;
  margin-inline: auto;
}

/* ── Skeleton loading ───────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-card {
  height: 120px;
  border-radius: 24px;
  background: linear-gradient(90deg, #e8eef5 25%, #f1f5f9 50%, #e8eef5 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.skeleton-line {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8eef5 25%, #f1f5f9 50%, #e8eef5 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ── Toast icons ────────────────────────────────────── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Checkpoint hierarchy guide ─────────────────────── */
.checkpoint-hierarchy-guide {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

/* ── Mobile card move row ───────────────────────────── */
.card-move-row {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.card-move-select {
  flex: 1;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .card-move-row {
    display: flex;
  }
}

/* ── Mobile nav: horizontal scroll instead of wrap ──── */
@media (max-width: 720px) {
  .top-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 6px;
    padding: 6px;
  }

  .top-tabs::-webkit-scrollbar {
    display: none;
  }

  .top-tab-button {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 42px;
    padding: 0 16px;
  }

  .top-tabs-actions {
    margin-left: 0;
    flex-shrink: 0;
    width: auto;
    flex-direction: row;
    align-items: center;
  }

  .top-tabs-auth-button {
    white-space: nowrap;
  }
}
