:root {
  --blue-900: #062f63;
  --blue-800: #074986;
  --blue-500: #2d86d9;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.78);
  --line: rgba(255, 255, 255, 0.24);
  --layer-app-header: 20000;
  --layer-cockpit-window: 30000;
  --layer-cockpit-floating: 35000;
  --layer-cockpit-modal: 40000;
  --layer-cockpit-alert: 50000;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--blue-900);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 15%, rgba(45, 134, 217, 0.5), transparent 36rem),
    linear-gradient(160deg, var(--blue-800), var(--blue-900));
}

.admin-entry,
.team-entry,
.privacy-entry {
  position: fixed;
  z-index: 10;
  top: 18px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.admin-entry {
  left: 18px;
  padding: 0 12px;
  color: #05254e;
  background: rgba(7, 73, 134, 0.28);
}

.team-entry {
  right: 18px;
  padding: 0 16px;
}

.privacy-entry {
  right: 148px;
  padding: 0 12px;
}

.admin-entry:hover {
  background: rgba(255, 255, 255, 0.22);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.hero {
  width: min(100%, 760px);
  text-align: center;
}

.logo-stage {
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  position: relative;
  width: min(100%, 670px);
  margin: 0 auto;
  padding: 34px 28px;
  border-radius: 8px;
  background: var(--white);
  box-shadow:
    0 34px 64px rgba(0, 13, 38, 0.34),
    0 10px 24px rgba(0, 13, 38, 0.22);
  perspective: 900px;
  transform-style: preserve-3d;
  overflow: visible;
}

.logo-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f5f8fb);
  box-shadow: inset 0 0 0 1px rgba(6, 47, 99, 0.08);
  pointer-events: none;
}

.logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 97%;
  max-width: none;
  height: auto;
  margin: -1% auto;
  transform:
    translateZ(72px)
    translateY(-8px)
    rotateX(var(--rotate-x))
    rotateY(var(--rotate-y));
  transform-style: preserve-3d;
  filter:
    drop-shadow(0 24px 13.3px rgba(0, 31, 76, 0.28))
    drop-shadow(0 8px 2.9px rgba(0, 31, 76, 0.16));
  transition: transform 180ms ease, filter 180ms ease;
  animation: logo-float 6s ease-in-out infinite;
}

.logo-stage:hover .logo {
  filter:
    drop-shadow(0 30px 16.6px rgba(0, 31, 76, 0.34))
    drop-shadow(0 10px 3.7px rgba(0, 31, 76, 0.18));
}

@keyframes logo-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

.intro {
  margin: 28px auto 0;
  max-width: 540px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--white-soft);
}

.contact-link {
  min-height: 48px;
  margin-top: 36px;
  padding: 0 22px;
}

@media (max-width: 520px) {
  .page {
    padding: 28px 18px;
  }

  .logo {
    width: 99%;
    margin: -2% auto;
    transform:
      translateZ(48px)
      translateY(-5px)
      rotateX(var(--rotate-x))
      rotateY(var(--rotate-y));
  }

  .logo-stage {
    width: min(100%, 380px);
    padding: 22px 18px;
  }

  .intro {
    font-size: 18px;
  }
}

.app-page {
  color: var(--white);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: var(--layer-app-header);
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 42px);
  background: rgba(6, 47, 99, 0.74);
  backdrop-filter: blur(12px);
}

.global-ecam-strip {
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
}

.global-ecam-window {
  min-height: 108px;
  padding: 10px 14px;
}

.global-ecam-strip.is-ecam-detached {
  min-height: 108px;
}

.global-ecam-window.is-detached {
  position: fixed;
  z-index: 1300;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .52), inset 0 0 28px rgba(92, 176, 255, .16);
}

.global-ecam-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px -6px 6px;
  padding: 4px 6px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.global-ecam-window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #37ff68;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.global-ecam-window-controls button {
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(85, 227, 255, .5);
  border-radius: 4px;
  color: #d9f9ff;
  background: rgba(3, 16, 24, .9);
  font: inherit;
  cursor: pointer;
}

.global-ecam-window h3 {
  margin: 0;
  font-size: 13px;
}

.global-ecam-window .mfd-ecam-body {
  height: auto;
  min-height: 54px;
  overflow: hidden;
}

.global-ecam-window .mfd-ecam-title,
.global-ecam-window .mfd-ecam-armed,
.global-ecam-window .mfd-ecam-countdown {
  font-size: 12px;
}

.back-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.home-back-button {
  position: fixed;
  z-index: 10;
  top: 18px;
  left: 96px;
}

.brand-mini {
  order: 2;
  margin-left: auto;
}

.mini-logo-stage {
  display: block;
  width: 116px;
  padding: 8px 7px;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f5f8fb);
  box-shadow: 0 16px 28px rgba(0, 13, 38, 0.28);
}

.mini-logo-stage img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 8px 5px rgba(0, 31, 76, 0.28));
}

.app-nav {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-nav a {
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.auth-page .app-shell {
  min-height: 0;
  display: block;
  padding-top: 63px;
}

.auth-panel,
.dashboard-panel {
  width: min(100%, 560px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 48px rgba(0, 13, 38, 0.22);
}

.wide-panel {
  width: min(100%, 1060px);
}

.documents-panel {
  width: min(100vw - 32px, 1520px);
  margin-left: 50%;
  transform: translateX(-50%);
}

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

.privacy-panel h2,
.privacy-panel p {
  margin: 0;
}

.privacy-panel a {
  color: #ffffff;
  font-weight: 800;
}

.users-list-panel {
  width: min(100%, 1480px);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-heading h1,
.panel-heading p {
  margin: 0 0 8px;
}

.auth-panel h1,
.dashboard-panel h1,
.dashboard-panel h2 {
  margin: 0 0 20px;
}

.muted,
.form-help {
  color: var(--white-soft);
}

.notice {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.notice-error {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  background: #c40019;
  box-shadow: 0 10px 20px rgba(80, 0, 10, 0.28);
}

.storage-meter {
  display: grid;
  gap: 12px;
}

.storage-meter h2,
.storage-meter p {
  margin: 0 0 6px;
}

.storage-gauge {
  height: 18px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(0, 13, 38, 0.34);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.24);
}

.storage-gauge span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 6px;
  background: linear-gradient(90deg, #37ff68 0%, #ffd400 72%, #ff3a2f 100%);
  transition: width 240ms ease;
}

.sandbox-entry-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  border-color: rgba(180, 220, 255, 0.42);
  background: rgba(5, 12, 22, 0.34);
}

.sandbox-entry-panel h2,
.sandbox-entry-panel p {
  margin: 0 0 6px;
}

.sandbox-entry-button {
  min-height: 48px;
  min-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(20, 28, 42, 0.95), rgba(6, 11, 18, 0.95));
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.52),
    0 14px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.sandbox-entry-button:hover {
  filter: brightness(1.08);
}

.emergency-panel {
  margin-bottom: 26px;
  border-color: rgba(255, 210, 120, 0.48);
}

.safety-panel {
  margin-bottom: 26px;
  border: 8px solid transparent;
  background:
    linear-gradient(rgb(75, 75, 90), rgb(75, 75, 90)) padding-box,
    repeating-linear-gradient(135deg, #ffd400 0 14px, #050505 14px 28px) border-box;
  box-shadow: 0 24px 48px rgba(0, 13, 38, 0.28);
}

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.actions-cell.safety-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  white-space: normal;
}

.safety-button-column {
  width: 260px;
  margin-left: auto;
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.safety-button-column > .inline-form,
.safety-button-column > details {
  width: 100%;
}

.code-export-action {
  justify-self: stretch;
}

.safety-panel code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 8px;
  border-radius: 6px;
  color: #062f63;
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.security-grid h3,
.security-grid p {
  margin: 0 0 10px;
}

.mfd-stack {
  display: grid;
  gap: 14px;
}

.mfd-window {
  min-width: 0;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.13), transparent 55%),
    linear-gradient(180deg, #141c2a 0%, #060b12 100%);
  box-shadow:
    inset 0 0 28px rgba(92, 176, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 12px 22px rgba(0, 0, 0, 0.28);
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.04em;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.42);
  text-transform: uppercase;
}

.mfd-window h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.15;
}

.mfd-readouts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.mfd-readouts div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
}

.mfd-readouts dt,
.mfd-readouts dd {
  margin: 0;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.25;
}

.mfd-readouts dt {
  opacity: 0.74;
}

.mfd-readouts dd {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mfd-readouts dd.mfd-status-good {
  color: #37ff68;
}

.mfd-readouts dd.mfd-status-alert {
  color: #ff3030;
}

.mfd-window a,
.mfd-window code {
  color: #ffffff;
}

.mfd-window code {
  display: block;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  overflow-wrap: anywhere;
  white-space: normal;
}

.mfd-window-empty {
  height: 236px;
  min-height: 236px;
  overflow: hidden;
}

.mfd-ecam-body {
  height: calc(100% - 30px);
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.mfd-window.is-ecam-active {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 34px rgba(92, 176, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 12px 22px rgba(0, 0, 0, 0.28);
}

.mfd-window.is-ecam-warning {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 34px rgba(92, 176, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 12px 22px rgba(0, 0, 0, 0.28);
}

.mfd-window.is-ecam-warning .mfd-ecam-title {
  color: #ff3a2f;
}

.mfd-window.is-ecam-warning .mfd-ecam-armed,
.mfd-window.is-ecam-warning .mfd-ecam-countdown {
  color: #ff3a2f;
}

.mfd-ecam-title {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.mfd-ecam-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.25;
}

.mfd-ecam-list li::marker {
  color: #ffffff;
  font-weight: 900;
}

.mfd-ecam-armed {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.mfd-ecam-countdown {
  margin-top: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.safety-column-button.is-ecam-armed {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.master-alert-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.master-caution-button,
.master-warning-button {
  min-height: 72px;
  border: 2px solid #050505;
  border-radius: 8px;
}

.master-caution-button,
.master-warning-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #050505;
  background: rgb(55, 45, 45);
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.58),
    0 14px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.master-warning-button {
  background: rgb(75, 18, 18);
}

.master-caution-button:hover,
.master-warning-button:hover {
  filter: brightness(1.08);
}

.master-caution-button:active,
.master-warning-button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.64),
    0 7px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 7px rgba(0, 0, 0, 0.34);
}

.master-caution-button.is-flashing {
  animation: master-caution-flash 1s steps(2, start) infinite;
}

.master-warning-button.is-flashing {
  animation: master-warning-flash 1s steps(2, start) infinite;
}

@keyframes master-caution-flash {
  0%,
  49% {
    background: rgb(250, 156, 53);
  }

  50%,
  100% {
    background: rgb(55, 45, 45);
  }
}

@keyframes master-warning-flash {
  0%,
  49% {
    background: rgb(255, 28, 28);
  }

  50%,
  100% {
    background: rgb(75, 18, 18);
  }
}

.mfd-window.is-warning-active {
  border-color: rgba(255, 70, 70, 0.78);
}

.mfd-warning-countdown {
  margin: 10px 0;
  color: #ffffff;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.mfd-warning-abort {
  color: #ff3030;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  animation: ecam-warning-blink 1s steps(2, start) infinite;
}

@keyframes ecam-warning-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.presence-indicator {
  border-color: rgba(150, 220, 255, 0.44);
}

.ideas-panel {
  margin: 22px 0 26px;
}

.idea-counter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.ideas-panel td:nth-child(2) {
  max-width: 460px;
  white-space: normal;
}

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

.idea-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(5, 12, 18, 0.42);
  overflow: hidden;
}

.idea-card summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

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

.idea-card summary::after {
  content: "OPEN";
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.idea-card[open] summary::after {
  content: "CLOSE";
}

.idea-card-id {
  color: #37ff68;
  font-weight: 900;
}

.idea-card-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--white);
  font-weight: 800;
}

.idea-card-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.idea-card-body {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px;
}

.idea-card-body p {
  margin: 0 0 12px;
  white-space: normal;
}

.idea-card-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.idea-card-details div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
}

.idea-card-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.idea-card-details dd {
  margin: 3px 0 0;
  color: var(--white);
}

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

.idea-card-actions .inline-form {
  margin: 0;
}

.ideas-archive {
  margin-top: 16px;
}

.ideas-archive summary {
  cursor: pointer;
  font-weight: 800;
}

.idea-projects {
  margin-top: 18px;
}

.idea-projects h3 {
  margin: 0 0 12px;
}

.idea-project-list {
  margin-top: 10px;
}

.idea-project-card {
  border-color: rgba(55, 255, 104, 0.32);
}

.idea-project-card .idea-card-body {
  background: rgba(5, 15, 25, 0.16);
}

.admin-users-panel {
  margin: 22px 0 26px;
}

.emergency-panel h2,
.emergency-panel p {
  margin: 0 0 12px;
}

.required-label::after {
  content: " *";
  color: #ffccd2;
}

.photo-upload-field {
  position: relative;
}

.photo-error {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  background: #c40019;
  box-shadow: 0 10px 20px rgba(80, 0, 10, 0.28);
  font-size: 13px;
  line-height: 1.35;
}

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

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

.form-grid .form-help,
.form-grid button,
.form-actions,
.check-line,
.form-section-title {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.register-actions > * {
  flex: 1 1 220px;
}

.form-section-title {
  margin: 12px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 20px;
}

label span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--white-soft);
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 0 12px;
  color: #062f63;
  background: var(--white);
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 0 12px;
  color: #062f63;
  background: var(--white);
}

.secret-entry {
  width: 100%;
  min-height: 44px;
  display: block;
  padding: 11px 48px 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #062f63;
  background: var(--white);
  outline: none;
  cursor: text;
}

.secret-entry:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

input[type="file"],
input[type="checkbox"] {
  min-height: auto;
}

.masked-secret {
  -webkit-text-security: disc;
}

.masked-secret.secret-visible {
  -webkit-text-security: none;
}

.password-control,
.secret-control {
  position: relative;
  display: block;
}

.password-control input,
.secret-control input {
  padding-right: 48px;
}

.password-toggle,
.secret-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: var(--blue-900);
  background: rgba(6, 47, 99, 0.08);
  cursor: pointer;
}

.password-toggle.is-visible,
.secret-toggle.is-visible {
  background: rgba(6, 47, 99, 0.18);
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  min-width: 128px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 12px;
  border-width: 1px;
  border-style: solid;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--blue-900);
  background: var(--white);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.danger-button {
  border: 1px solid rgba(255, 180, 180, 0.5);
  color: #ffffff;
  background: rgba(163, 36, 36, 0.74);
}

.jettison-button {
  min-height: 48px;
  min-width: 260px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, #ffd400 0 14px, #050505 14px 28px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 2px 2px #050505,
    2px 0 2px #050505,
    0 -2px 2px #050505,
    -2px 0 2px #050505;
  cursor: pointer;
}

.small-jettison-button {
  min-height: 36px;
  min-width: 220px;
  font-size: 12px;
}

.code-export-button {
  min-height: 42px;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, #ffd400 0 14px, #050505 14px 28px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 2px 2px #050505,
    2px 0 2px #050505,
    0 -2px 2px #050505,
    -2px 0 2px #050505;
  cursor: pointer;
}

.code-export-button.is-running {
  color: #ff1f1f;
  background: #050505;
  animation: deadman-blink 1s steps(2, start) infinite;
}

.code-export-button.is-complete {
  color: #37ff68;
  background: #050505;
  animation: code-export-done 30s linear forwards;
}

@keyframes code-export-done {
  0%,
  99% {
    color: #37ff68;
    background: #050505;
  }

  100% {
    color: #050505;
    background: #333333;
  }
}

.deadman-button {
  min-height: 36px;
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 8px;
  padding: 0 12px;
  color: #050505;
  background: #333333;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.34), 0 8px 16px rgba(0, 0, 0, 0.22);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.manual-deadman-button {
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, #ffd400 0 14px, #050505 14px 28px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  text-shadow:
    0 2px 2px #050505,
    2px 0 2px #050505,
    0 -2px 2px #050505,
    -2px 0 2px #050505;
}

.safety-cockpit-button,
.app-nav a.logout-manual-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, #ffd400 0 14px, #050505 14px 28px);
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.52),
    0 14px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-weight: 900;
  text-decoration: none;
  text-shadow:
    0 2px 2px #050505,
    2px 0 2px #050505,
    0 -2px 2px #050505,
    -2px 0 2px #050505;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.safety-cockpit-button:hover,
.app-nav a.logout-manual-button:hover {
  filter: brightness(1.08);
}

.app-nav a.logout-manual-button:focus-visible {
  border-color: #ffffff;
  outline: 3px solid #ffd400;
  outline-offset: 2px;
}

.app-nav a.logout-manual-button.is-logout-armed {
  color: #ff3a2f;
  background: #050505;
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.58),
    0 7px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 7px rgba(0, 0, 0, 0.34);
  animation: logout-armed-blink 1s steps(2, start) infinite;
}

.safety-cockpit-button:active,
.app-nav a.logout-manual-button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.58),
    0 7px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 7px rgba(0, 0, 0, 0.34);
}

@keyframes logout-armed-blink {
  0%,
  49% {
    color: #ff3a2f;
  }

  50%,
  100% {
    color: #ffffff;
  }
}

.deadman-button.is-pressed {
  color: #37ff68;
  background: #050505;
  transform: translateY(2px);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.86);
}

.deadman-button.is-recent {
  animation: deadman-blink 1s steps(2, start) 20;
}

@keyframes deadman-blink {
  0%,
  100% {
    color: #ff1f1f;
    background: #050505;
  }

  50% {
    color: #050505;
    background: #050505;
  }
}

.deadman-config {
  position: relative;
}

.deadman-config summary {
  list-style: none;
  color: #ffffff;
}

.deadman-config[open] summary {
  color: #37ff68;
}

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

.deadman-config-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-900);
  box-shadow: 0 14px 28px rgba(0, 13, 38, 0.34);
}

.feedback-button {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  min-height: 42px;
  min-width: 156px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  background: #333333;
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.52),
    0 14px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.feedback-button:hover {
  filter: brightness(1.08);
}

.feedback-button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.58),
    0 7px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 7px rgba(0, 0, 0, 0.34);
}

.feedback-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: #ffffff;
  background: var(--blue-900);
  box-shadow: 0 24px 48px rgba(0, 13, 38, 0.36);
}

.feedback-dialog::backdrop {
  background: rgba(0, 13, 38, 0.62);
}

.feedback-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.feedback-form h2,
.feedback-form p {
  margin: 0;
}

.feedback-form textarea {
  width: 100%;
  resize: vertical;
}

.feedback-counter {
  justify-self: end;
  color: var(--white-soft);
  font-size: 12px;
  font-weight: 800;
}

.feedback-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.beta-feedback-button {
  right: 132px;
}

.beta-feedback-header-button {
  min-width: 72px;
  padding-inline: 12px;
}

.feedback-action-button {
  width: 100%;
  color: #ffffff;
}

.beta-feedback-form {
  gap: 10px;
}

.beta-feedback-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.beta-feedback-category {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.beta-feedback-category.is-active {
  color: #0b0b0b;
  border-color: #ffcb70;
  background: #ffcb70;
}

.beta-feedback-category:hover {
  filter: brightness(1.12);
}

body .feedback-button.feedback-button {
  position: fixed !important;
  right: 18px !important;
  bottom: 18px !important;
  left: auto !important;
  top: auto !important;
  z-index: var(--layer-cockpit-floating, 35000);
}

.status-chip {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #031625;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 900;
}

.status-chip.status-new {
  background: #f4bf55;
}

.status-chip.status-in-progress {
  background: #ff7a00;
}

.status-chip.status-addressed {
  background: #56d18a;
}

.status-chip.status-archived {
  background: #b8c0ce;
}

.admin-feedback-filters {
  align-items: end;
}

.admin-feedback-filters .compact-button {
  min-height: 44px;
}

.cookie-dialog {
  position: fixed;
  z-index: 10000;
  top: auto;
  right: 0;
  bottom: 28px;
  left: 0;
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: #ffffff;
  background: #06325f;
  box-shadow: 0 24px 48px rgba(0, 13, 38, 0.42);
  isolation: isolate;
}

.cookie-dialog::backdrop {
  background: rgba(0, 13, 38, 0.68);
  backdrop-filter: blur(3px);
}

.cookie-consent-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #06325f;
}

.cookie-consent-panel h2,
.cookie-consent-panel p {
  margin: 0;
}

.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.cookie-actions .default-cockpit-button {
  width: 100%;
  font-size: 14px;
}

.actions-cell.safety-actions .reinstall-form {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  margin: 0;
}

.safety-column-button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  font-size: 14px;
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.52),
    0 14px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(0);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.safety-column-button:hover {
  filter: brightness(1.08);
}

.safety-column-button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.58),
    0 7px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 7px rgba(0, 0, 0, 0.34);
}

.actions-cell.safety-actions .reinstall-form {
  align-items: center;
}

.file-button {
  min-height: 42px;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.small-file-button {
  min-height: 36px;
  min-width: 190px;
  font-size: 12px;
}

.file-button span {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.default-cockpit-button,
.app-nav a.default-cockpit-button,
.secondary-button.generate-code-button,
.file-button.jettison-reinstall-button,
.secondary-button.reinstall-submit-button,
.feedback-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050505;
  border-radius: 8px;
  color: #ffffff;
  background: #333333;
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.52),
    0 14px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-weight: 900;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.default-cockpit-button:hover,
.app-nav a.default-cockpit-button:hover,
.secondary-button.generate-code-button:hover,
.file-button.jettison-reinstall-button:hover,
.secondary-button.reinstall-submit-button:hover,
.feedback-button:hover {
  background: #333333;
  filter: brightness(1.08);
}

.default-cockpit-button:active,
.app-nav a.default-cockpit-button:active,
.secondary-button.generate-code-button:active,
.file-button.jettison-reinstall-button:active,
.secondary-button.reinstall-submit-button:active,
.feedback-button:active {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.58),
    0 7px 14px rgba(0, 0, 0, 0.28),
    inset 0 2px 7px rgba(0, 0, 0, 0.34);
}

.overfly-popup {
  position: fixed;
  z-index: 100;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(5, 5, 5, 0.92);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.overfly-popup.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.compact-button {
  min-height: 36px;
  min-width: 118px;
  padding: 0 12px;
  font-size: 13px;
}

.quiet-link {
  color: var(--white-soft);
  text-align: center;
  text-decoration: none;
}

.quiet-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.small-button {
  min-height: 36px;
  min-width: 96px;
  padding: 0 10px;
  font-size: 12px;
}

.compact-heading {
  align-items: center;
}

.small-muted {
  color: var(--white-soft);
  font-size: 13px;
}

.user-hover-info {
  position: relative;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.7);
  cursor: help;
}

.user-hover-info::after {
  content: attr(data-login-info);
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  max-width: 320px;
  display: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  background: var(--blue-900);
  box-shadow: 0 14px 28px rgba(0, 13, 38, 0.34);
  white-space: pre-line;
  font-size: 12px;
  line-height: 1.45;
}

.user-hover-info:hover::after {
  display: block;
}

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

.user-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.user-summary h1,
.user-summary p {
  margin: 0 0 8px;
}

.user-summary-photo {
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 3px solid var(--white);
  object-fit: cover;
  background: var(--white);
  box-shadow: 0 14px 24px rgba(0, 13, 38, 0.22);
}

.user-summary-initials {
  display: grid;
  place-items: center;
  color: var(--blue-900);
  font-weight: 700;
  font-size: 28px;
}

.user-menu a {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.directory-list {
  display: grid;
  gap: 14px;
}

.person-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.person-card h2,
.person-card p {
  margin: 0 0 6px;
}

.directory-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  width: 100%;
}

.directory-details p {
  margin: 0;
}

.directory-details strong {
  display: block;
  color: var(--white-soft);
  font-size: 12px;
  text-transform: uppercase;
}

.avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-900);
  font-weight: 700;
  background: var(--white);
  box-shadow: 0 10px 18px rgba(0, 13, 38, 0.2);
}

.avatar-photo,
.profile-photo {
  object-fit: cover;
}

.profile-photo {
  width: 120px;
  height: 120px;
  margin: 0 0 18px;
  border-radius: 8px;
  border: 3px solid var(--white);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 26px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.documents-panel table {
  min-width: 1260px;
  table-layout: fixed;
}

.documents-panel th:nth-child(1),
.documents-panel td:nth-child(1) {
  width: 34%;
}

.documents-panel th:nth-child(2),
.documents-panel td:nth-child(2) {
  width: 16%;
}

.documents-panel th:nth-child(3),
.documents-panel td:nth-child(3) {
  width: 11%;
}

.documents-panel th:nth-child(4),
.documents-panel td:nth-child(4) {
  width: 9%;
}

.documents-panel th:nth-child(5),
.documents-panel td:nth-child(5) {
  width: 14%;
}

.documents-panel th:nth-child(6),
.documents-panel td:nth-child(6) {
  width: 16%;
}

.documents-panel.has-revision th:nth-child(1),
.documents-panel.has-revision td:nth-child(1) {
  width: 30%;
}

.documents-panel.has-revision th:nth-child(2),
.documents-panel.has-revision td:nth-child(2) {
  width: 14%;
}

.documents-panel.has-revision th:nth-child(3),
.documents-panel.has-revision td:nth-child(3) {
  width: 7%;
}

.documents-panel.has-revision th:nth-child(4),
.documents-panel.has-revision td:nth-child(4) {
  width: 10%;
}

.documents-panel.has-revision th:nth-child(5),
.documents-panel.has-revision td:nth-child(5) {
  width: 8%;
}

.documents-panel.has-revision th:nth-child(6),
.documents-panel.has-revision td:nth-child(6) {
  width: 14%;
}

.documents-panel.has-revision th:nth-child(7),
.documents-panel.has-revision td:nth-child(7) {
  width: 17%;
}

.spreadsheet-wrap {
  max-height: 72vh;
}

.spreadsheet-table {
  min-width: 1500px;
}

.spreadsheet-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--blue-900);
}

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

td a {
  color: var(--white);
}

.document-title-menu {
  position: relative;
  display: block;
  max-width: 100%;
}

.document-title-button {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 0;
  padding: 0;
  color: var(--white);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.folder-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
  color: var(--white-soft);
}

.folder-breadcrumb a,
.folder-link {
  color: var(--white);
  font-weight: 700;
}

.folder-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.folder-link::before {
  content: "";
  width: 18px;
  height: 13px;
  display: inline-block;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: -2px -5px 0 -2px rgba(255, 255, 255, 0.8);
}

.folder-row td {
  background: rgba(255, 255, 255, 0.06);
}

.folder-row .actions-cell {
  flex-wrap: wrap;
}

.folder-move-form {
  gap: 7px;
}

.folder-move-form select {
  width: 150px;
  min-height: 36px;
  padding: 0 8px;
  font-size: 13px;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  border: 2px dashed rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.drop-zone.is-dragging {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.drop-zone span {
  margin: 0;
  color: var(--white);
  font-size: 16px;
}

.drop-zone strong {
  color: var(--white-soft);
  font-size: 13px;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.document-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-900);
  box-shadow: 0 14px 28px rgba(0, 13, 38, 0.34);
}

.document-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--white);
  text-decoration: none;
}

.document-menu a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.actions-cell {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.actions-cell .inline-form {
  display: inline-flex;
  margin: 0;
}

.actions-cell .compact-button,
.actions-cell .danger-button {
  flex: 0 0 auto;
}

.role-menu {
  position: relative;
}

.role-menu summary {
  list-style: none;
}

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

.role-menu-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 8px;
  min-width: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-900);
  box-shadow: 0 14px 28px rgba(0, 13, 38, 0.34);
}

.role-menu-panel select {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--blue-900);
}

.upload-dialog,
.folder-dialog {
  width: min(520px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 24px;
  color: var(--white);
  background: var(--blue-900);
}

.upload-dialog::backdrop,
.folder-dialog::backdrop {
  background: rgba(0, 13, 38, 0.68);
}

.pin-dialog {
  width: min(390px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--white);
  background: var(--blue-900);
  box-shadow: 0 26px 58px rgba(0, 13, 38, 0.42);
}

.pin-dialog::backdrop {
  background: rgba(0, 13, 38, 0.68);
}

.pin-dialog-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.pin-dialog-panel h2 {
  margin: 0;
  text-align: center;
}

.pin-preview {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--white);
  font-size: 24px;
  letter-spacing: 8px;
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pin-digit {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-900);
  background: var(--white);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.pin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pin-actions .small-button {
  min-width: 82px;
}

.manual-panel {
  width: min(100%, 980px);
}

.manual-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.manual-toolbar h1,
.manual-toolbar p {
  margin: 0 0 8px;
}

.manual-document {
  padding: 30px;
  border-radius: 8px;
  color: #10223a;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 13, 38, 0.2);
}

.manual-cover {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #10223a;
}

.manual-brand {
  padding: 12px;
  border: 1px solid rgba(6, 47, 99, 0.18);
  border-radius: 8px;
}

.manual-brand img {
  display: block;
  width: 100%;
}

.manual-classification {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 5px 9px;
  border: 2px solid #10223a;
  color: #10223a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.manual-cover h2 {
  margin: 0;
  color: #10223a;
  font-size: 28px;
  line-height: 1.15;
}

.manual-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0;
  border-top: 1px solid #b9c4d1;
  border-left: 1px solid #b9c4d1;
}

.manual-meta div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border-right: 1px solid #b9c4d1;
  border-bottom: 1px solid #b9c4d1;
}

.manual-meta dt,
.manual-meta dd {
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.3;
}

.manual-meta dt {
  color: #ffffff;
  background: #10223a;
  font-weight: 800;
}

.manual-meta dd {
  font-weight: 700;
}

.manual-section {
  padding: 16px 0;
  border-top: 1px solid #d6dde6;
}

.manual-section h2 {
  margin: 0 0 10px;
  color: #10223a;
  font-size: 20px;
}

.manual-section p {
  margin: 0 0 8px;
  color: #10223a;
  line-height: 1.55;
}

.manual-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 2px solid #10223a;
  color: #10223a;
  font-size: 12px;
  font-weight: 800;
}

.sandbox-panel {
  width: min(100%, 1060px);
}

.prototype-banner {
  width: min(1120px, calc(100% - 32px));
  margin: -18px auto 24px;
  padding: 9px 14px;
  border: 2px solid #050505;
  border-radius: 8px;
  color: #050505;
  background: rgb(252, 73, 53);
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.52),
    0 14px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.sandbox-label {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  color: #37ff68;
  background: rgba(5, 5, 5, 0.62);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sandbox-freeze {
  margin-bottom: 22px;
  border-color: rgba(55, 255, 104, 0.38);
}

.sandbox-freeze h2,
.sandbox-freeze p {
  margin: 0 0 8px;
}

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

.sandbox-card {
  min-height: 160px;
  text-transform: none;
}

.sandbox-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 16px;
}

.sandbox-card p {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
}

.sandbox-runway {
  padding: 18px;
  border: 2px dashed rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.28);
}

.sandbox-runway h2,
.sandbox-runway p {
  margin: 0 0 10px;
}

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

.sandbox-slots div,
.sandbox-slot-link {
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.sandbox-slots span,
.sandbox-slot-link span {
  color: var(--white-soft);
  font-size: 12px;
  font-weight: 700;
}

.sandbox-slot-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* PROTO 03 — EASA ATPL altimetry training bank */
.altimetry-lab {
  --alt-airbus-grey: rgb(130, 156, 182);
  --alt-airbus-grey-line: rgba(130, 156, 182, .5);
  --alt-airbus-grey-soft: rgba(130, 156, 182, .18);
  max-width: 1180px;
  margin: 0 auto;
}
.altimetry-heading { align-items: flex-start; }
.altimetry-status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.altimetry-status-grid div { padding: 14px 16px; border: 1px solid var(--alt-airbus-grey-line); background: rgba(22, 27, 34, .88); box-shadow: inset 0 0 18px rgba(130, 156, 182, .08); }
.altimetry-status-grid span, .altimetry-toolbar label span { display: block; margin-bottom: 5px; color: #7f9eab; font-size: .7rem; letter-spacing: .14em; }
.altimetry-status-grid strong { color: var(--alt-airbus-grey); font-family: var(--font-mono, monospace); font-size: .92rem; }
.altimetry-toolbar { display: flex; align-items: end; gap: 10px; margin-bottom: 16px; }
.altimetry-toolbar label { flex: 1; }
.altimetry-toolbar select { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--alt-airbus-grey-line); border-radius: 4px; color: #e1e8ef; background: #171d24; }
.altimetry-lab .altimetry-toolbar .secondary-button,
.altimetry-lab .altimetry-toolbar .default-cockpit-button { border-color: var(--alt-airbus-grey-line); background: linear-gradient(180deg, rgba(130, 156, 182, .28), rgba(55, 66, 78, .55)); }
.altimetry-question-card {
  padding: clamp(20px, 4vw, 40px);
  border-color: var(--alt-airbus-grey-line);
  background: radial-gradient(circle at 50% 0, rgba(130, 156, 182, .12), transparent 55%), linear-gradient(180deg, #202731 0%, #11161c 100%);
  box-shadow: inset 0 0 28px rgba(130, 156, 182, .1), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 22px rgba(0, 0, 0, .28);
}
.altimetry-question-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--alt-airbus-grey); font-family: var(--font-mono, monospace); font-size: .76rem; letter-spacing: .08em; }
.altimetry-question-card h2 { max-width: 900px; margin: 24px 0; color: #f1fbff; font-size: clamp(1.15rem, 2.4vw, 1.65rem); line-height: 1.45; }
.altimetry-options { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
.altimetry-option { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid rgba(125, 165, 181, .3); border-radius: 4px; color: #d9edf3; text-align: left; background: rgba(4, 14, 20, .78); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.altimetry-option span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #54717d; border-radius: 3px; color: #8ba7b2; font-family: var(--font-mono, monospace); }
.altimetry-option strong { font-weight: 500; line-height: 1.4; }
.altimetry-option:hover:not(:disabled), .altimetry-option.is-selected { border-color: var(--alt-airbus-grey); background: var(--alt-airbus-grey-soft); transform: translateX(2px); }
.altimetry-option.is-correct { border-color: #38e892; background: rgba(16, 120, 71, .2); }
.altimetry-option.is-correct span { border-color: #38e892; color: #38e892; }
.altimetry-option.is-wrong { border-color: #ff646d; background: rgba(150, 30, 43, .2); }
.altimetry-option.is-wrong span { border-color: #ff646d; color: #ff646d; }
.altimetry-actions { display: flex; gap: 10px; margin-top: 22px; }
.altimetry-solution { margin-top: 14px; padding: clamp(18px, 3vw, 30px); border-left: 3px solid var(--alt-airbus-grey); background: rgba(22, 27, 34, .94); }
.altimetry-solution h2 { margin: 14px 0 8px; color: var(--alt-airbus-grey); font-size: .82rem; letter-spacing: .12em; }
.altimetry-solution [data-alt-explanation] { color: #d5e8ee; line-height: 1.7; }
.altimetry-expected-answer { margin: 16px 0; padding: 14px 16px; border: 1px solid rgba(56, 232, 146, .48); background: rgba(16, 120, 71, .16); }
.altimetry-expected-answer h2 { margin-top: 0; color: #38e892; }
.altimetry-expected-answer p { margin: 0; color: #dffff0; font-weight: 700; line-height: 1.5; }
.altimetry-result { margin: 0; font-family: var(--font-mono, monospace); font-weight: 800; letter-spacing: .08em; }
.altimetry-result.is-correct { color: #38e892; }
.altimetry-result.is-wrong { color: #ff7a82; }
.altimetry-formula { padding: 12px; border: 1px dashed var(--alt-airbus-grey-line); color: #f5cf60; font-family: var(--font-mono, monospace); line-height: 1.5; background: rgba(0, 0, 0, .18); }
.altimetry-note, .altimetry-reference-note { color: #819aa4; font-size: .78rem; line-height: 1.5; }
.altimetry-reference-note { display: flex; gap: 14px; margin-top: 16px; padding: 14px; border-top: 1px solid var(--alt-airbus-grey-line); }
.altimetry-reference-note strong { flex: 0 0 auto; color: var(--alt-airbus-grey); }

@media (max-width: 720px) {
  .altimetry-status-grid { grid-template-columns: repeat(2, 1fr); }
  .altimetry-toolbar, .altimetry-actions, .altimetry-reference-note { align-items: stretch; flex-direction: column; }
  .altimetry-question-meta { flex-direction: column; }
}

.proto-calculator-page {
  width: min(100%, 1120px);
}

.proto-empty-zone {
  min-height: 560px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.18);
}

.proto-calculator-toggle {
  min-width: 220px;
}

.mcdu-calculator {
  width: min(100%, 390px);
  position: fixed;
  right: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  z-index: var(--layer-cockpit-floating, 35000);
  max-width: calc(100vw - 24px);
  user-select: none;
  touch-action: none;
}

.mcdu-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 2px solid rgba(0, 0, 0, 0.78);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  color: #f6f6f1;
  background:
    linear-gradient(180deg, #303030 0%, #141414 100%);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: move;
  touch-action: none;
}

.mcdu-window-close {
  min-width: 72px;
  min-height: 44px;
  padding: 0 10px;
  border: 2px solid rgba(0, 0, 0, 0.82);
  border-radius: 8px;
  color: #f6f6f1;
  background: linear-gradient(180deg, #494949 0%, #181818 100%);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  touch-action: manipulation;
}

.mcdu-window-close:hover,
.mcdu-window-close:focus-visible {
  border-color: #ffffff;
  outline: 2px solid #37ff68;
  outline-offset: 2px;
}

.mcdu-window-close:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.72),
    inset 0 2px 4px rgba(0, 0, 0, 0.38);
}

.mcdu-faceplate {
  padding: 8px;
  border: 3px solid rgba(5, 5, 5, 0.72);
  border-radius: 0 0 18px 18px;
  background:
    radial-gradient(circle at 28% 14%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(145deg, #8aa4b7 0%, #61798f 45%, #405263 100%);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -3px 8px rgba(0, 0, 0, 0.34);
}

.mcdu-science-grid,
.mcdu-keypad-grid {
  display: grid;
  gap: 4px;
}

.mcdu-science-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 7px;
}

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

.mcdu-faceplate button {
  min-height: 28px;
  border: 2px solid rgba(0, 0, 0, 0.78);
  border-radius: 12px;
  color: #f6f6f1;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.18), transparent 43%),
    linear-gradient(180deg, #303030 0%, #191919 54%, #070707 100%);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.62),
    0 5px 7px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.mcdu-keypad-grid button {
  min-height: 34px;
  border-radius: 16px;
  font-size: clamp(22px, 7vw, 26px);
  letter-spacing: 0.02em;
}

.mcdu-science-grid button {
  text-transform: none;
}

.mcdu-keypad-grid .mcdu-control {
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.18), transparent 44%),
    linear-gradient(180deg, #686868 0%, #3f3f3f 100%);
}

.mcdu-keypad-grid .mcdu-operator {
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.28), transparent 44%),
    linear-gradient(180deg, #ffb321 0%, #ff9900 46%, #ed7e00 100%);
  border-color: rgba(134, 73, 0, 0.9);
  box-shadow:
    0 3px 0 rgba(123, 66, 0, 0.78),
    0 5px 7px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.mcdu-faceplate button.is-active {
  outline: 2px solid #37ff68;
  outline-offset: 2px;
  color: #37ff68;
}

/* The calculator is one panel of the shared cockpit: its night illumination follows
   the same amber, EL dimmer and glow as the surrounding USER TEAM controls. */
.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-window-bar,
.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-window-close,
.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-faceplate button {
  color: var(--cockpit-night, rgb(255, 170, 32)) !important;
  -webkit-text-fill-color: color-mix(in srgb, var(--cockpit-night, rgb(255, 170, 32)) var(--el-output, 100%), transparent) !important;
  text-shadow:
    0 0 3px color-mix(in srgb, var(--cockpit-night-glow, rgba(255, 126, 0, .66)) var(--el-output, 100%), transparent),
    0 0 7px color-mix(in srgb, rgba(255, 126, 0, .28) var(--el-output, 100%), transparent) !important;
}

.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-faceplate button:active {
  color: #fff !important;
  -webkit-text-fill-color: color-mix(in srgb, #fff var(--el-output, 100%), transparent) !important;
  text-shadow:
    0 0 3px color-mix(in srgb, rgba(255, 255, 255, .72) var(--el-output, 100%), transparent),
    0 0 7px color-mix(in srgb, rgba(255, 255, 255, .28) var(--el-output, 100%), transparent) !important;
}

.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-window-close:active {
  color: #fff !important;
  -webkit-text-fill-color: color-mix(in srgb, #fff var(--el-output, 100%), transparent) !important;
  text-shadow:
    0 0 3px color-mix(in srgb, rgba(255, 255, 255, .72) var(--el-output, 100%), transparent),
    0 0 7px color-mix(in srgb, rgba(255, 255, 255, .28) var(--el-output, 100%), transparent) !important;
}

.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-keypad-grid button {
  color: rgb(255, 198, 92) !important;
  -webkit-text-fill-color: color-mix(in srgb, rgb(255, 198, 92) var(--el-output, 100%), transparent) !important;
  text-shadow:
    0 0 2px color-mix(in srgb, rgba(255, 166, 48, .82) var(--el-output, 100%), transparent),
    0 0 5px color-mix(in srgb, rgba(255, 126, 0, .38) var(--el-output, 100%), transparent) !important;
}

.user-team-cockpit-page.is-night-mode .mcdu-calculator .mcdu-keypad-grid button:active {
  color: #fff !important;
  -webkit-text-fill-color: color-mix(in srgb, #fff var(--el-output, 100%), transparent) !important;
}

.user-team-cockpit-page.is-night-mode .global-ecam-window.is-calculator-output :is(
  .mfd-ecam-title,
  .mfd-ecam-armed,
  .mfd-ecam-countdown
) {
  color: rgb(255, 198, 92) !important;
  -webkit-text-fill-color: color-mix(in srgb, rgb(255, 198, 92) var(--el-output, 100%), transparent) !important;
  text-shadow:
    0 0 2px color-mix(in srgb, rgba(255, 166, 48, .82) var(--el-output, 100%), transparent),
    0 0 5px color-mix(in srgb, rgba(255, 126, 0, .38) var(--el-output, 100%), transparent) !important;
}

.user-team-cockpit-page:has(.app-header-master-alerts :is(
  .master-caution-button,
  .master-warning-button
):is(.is-flashing, .is-answer-active)) .app-header {
  z-index: var(--layer-cockpit-alert, 50000);
}

.mcdu-faceplate button:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.72),
    0 4px 6px rgba(0, 0, 0, 0.24),
    inset 0 2px 6px rgba(0, 0, 0, 0.42);
}

.mcdu-wide {
  border-radius: 24px;
}

.aristo-proto-panel {
  width: min(100%, 1180px);
}

.aristo-workbench {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.22);
}

.aristo-toolbar {
  width: min(100%, 820px);
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.aristo-mode-group,
.aristo-nudge-group {
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.aristo-toolbar .default-cockpit-button {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 12px;
}

.aristo-toolbar .default-cockpit-button.is-selected {
  color: #37ff68;
  border-color: #ffffff;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.72),
    0 8px 12px rgba(0, 0, 0, 0.28),
    inset 0 0 0 2px rgba(55, 255, 104, 0.45);
}

.aristo-instrument {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border: 5px solid rgba(9, 14, 20, 0.9);
  border-radius: 4%;
  background: #e7e6df;
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.65);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.aristo-instrument.is-dragging {
  cursor: grabbing;
}

.aristo-fixed-plate {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.aristo-mobile-plate {
  width: 94%;
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
  transform-origin: 50% 50%;
  will-change: transform;
  -webkit-mask: url("assets/aristo617/mobile-mask.png") center / 100% 100% no-repeat;
  mask: url("assets/aristo617/mobile-mask.png") center / 100% 100% no-repeat;
  mask-mode: luminance;
}

.aristo-mobile-plate img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.aristo-cursor {
  width: 100%;
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.aristo-cursor-line {
  width: 2px;
  height: 100%;
  position: absolute;
  left: calc(50% - 1px);
  top: 0;
  background: rgba(170, 30, 25, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.aristo-cursor-window {
  width: 18%;
  height: 96%;
  position: absolute;
  left: 41%;
  top: 2%;
  border: 2px solid rgba(72, 78, 82, 0.48);
  border-radius: 46% 46% 12% 12%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(225, 242, 248, 0.17), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 5px 0 7px rgba(255, 255, 255, 0.1),
    inset -5px 0 7px rgba(0, 0, 0, 0.06);
}

.aristo-cursor-grip {
  position: absolute;
  left: 50%;
  top: 1.5%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border: 1px solid rgba(30, 35, 38, 0.72);
  border-radius: 3px;
  color: #f4f4ef;
  background: rgba(33, 39, 42, 0.82);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.aristo-pivot {
  width: 5.4%;
  aspect-ratio: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(38, 40, 42, 0.88);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #e4e4dd 0 12%, #858883 36%, #2f3130 70%, #111 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.aristo-instrument[data-aristo-mode-active="cursor"] .aristo-cursor-grip {
  color: #37ff68;
}

.aristo-status {
  margin: 0;
  color: #37ff68;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

/* USER TEAM · AIRBUS COCKPIT */
.user-team-page {
  --user-team-line: rgba(130, 156, 182, .72);
  --user-team-line-soft: rgba(130, 156, 182, .32);
  --user-team-screen: #080e16;
  --user-team-screen-top: #151e2b;
  --user-team-green: #37ff68;
  background:
    radial-gradient(circle at 20% 0, rgba(87, 139, 181, .14), transparent 34%),
    radial-gradient(circle at 80% 0, rgba(87, 139, 181, .1), transparent 32%),
    linear-gradient(180deg, #0b203d 0%, #06152b 48%, #041023 100%);
}

.user-team-page .app-shell {
  width: min(1220px, calc(100% - 32px));
}

.user-team-page .user-team-panel {
  position: relative;
  overflow: visible;
  padding: 34px 28px 28px;
  border: 2px solid var(--user-team-line);
  border-radius: 9px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 0, rgba(123, 185, 232, .1), transparent 48%),
    linear-gradient(180deg, rgba(21, 30, 43, .98), rgba(8, 14, 22, .98));
  box-shadow:
    inset 0 0 34px rgba(92, 176, 255, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 22px 44px rgba(0, 0, 0, .34);
}

.user-team-page .user-team-panel::before {
  content: attr(data-cockpit-label);
  position: absolute;
  top: -10px;
  left: 22px;
  padding: 3px 10px;
  border: 1px solid var(--user-team-line);
  border-radius: 4px;
  color: #dce8f0;
  background: #101925;
  font: 900 10px/1.2 "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .14em;
}

.user-team-page .user-team-panel > h1,
.user-team-page .manual-toolbar h1 {
  color: #fff;
  font: 900 clamp(1.45rem, 3vw, 2rem)/1.05 "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .04em;
  text-shadow: 0 0 9px rgba(255, 255, 255, .24);
  text-transform: uppercase;
}

.user-team-page .muted,
.user-team-page .form-help {
  color: #c6d5e1;
}

.user-team-page .user-summary {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--user-team-line-soft);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--user-team-screen-top), var(--user-team-screen));
  box-shadow: inset 0 0 24px rgba(92, 176, 255, .1);
}

.user-team-page .user-summary-photo,
.user-team-page .profile-photo,
.user-team-page .avatar {
  border: 2px solid var(--user-team-line);
  border-radius: 6px;
  color: #fff;
  background: #111a25;
  box-shadow: inset 0 0 18px rgba(92, 176, 255, .14), 0 10px 20px rgba(0, 0, 0, .3);
}

.user-team-page .user-team-status {
  display: inline-block;
  margin: 4px 0 0;
  color: var(--user-team-green);
  font: 900 12px/1.2 "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .1em;
}

.user-team-page .user-menu {
  gap: 12px;
}

.user-team-page .user-menu .default-cockpit-button {
  min-height: 78px;
  padding: 12px;
  border-color: #050505;
  background: linear-gradient(180deg, #3e454c, #23282d);
  font: 900 12px/1.35 "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .07em;
}

.user-team-page .user-menu .default-cockpit-button:hover,
.user-team-page .user-menu .default-cockpit-button:focus-visible {
  color: var(--user-team-green);
  outline: 2px solid rgba(55, 255, 104, .58);
  outline-offset: 3px;
}

.user-team-page .form-grid,
.user-team-page .search-bar,
.user-team-page .folder-breadcrumb {
  padding: 16px;
  border: 1px solid var(--user-team-line-soft);
  border-radius: 7px;
  background: rgba(5, 11, 18, .62);
}

.user-team-page label > span,
.user-team-page .form-section-title,
.user-team-page .folder-breadcrumb {
  color: #c6d5e1;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .05em;
}

.user-team-page input,
.user-team-page select,
.user-team-page .secret-entry {
  border-color: var(--user-team-line);
  border-radius: 5px;
  color: #e7f0f6;
  background: #101821;
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, .38);
}

.user-team-page input:focus,
.user-team-page select:focus,
.user-team-page .secret-entry:focus {
  border-color: #b7d8ee;
  outline: 2px solid rgba(130, 196, 238, .32);
  outline-offset: 2px;
}

.user-team-page .primary-button,
.user-team-page .secondary-button {
  border: 2px solid #050505;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #424a51, #242a2f);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .2);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 900;
  letter-spacing: .04em;
}

.user-team-page .primary-button:hover,
.user-team-page .primary-button:focus-visible {
  color: var(--user-team-green);
}

.user-team-page .person-card {
  border: 1px solid var(--user-team-line-soft);
  border-left: 4px solid var(--user-team-line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--user-team-screen-top), var(--user-team-screen));
  box-shadow: inset 0 0 20px rgba(92, 176, 255, .08);
}

.user-team-page .directory-details strong {
  color: #8fa9bc;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .06em;
}

.user-team-page .table-wrap {
  border: 1px solid var(--user-team-line-soft);
  border-radius: 7px;
  background: var(--user-team-screen);
  box-shadow: inset 0 0 26px rgba(92, 176, 255, .08);
}

.user-team-page table thead {
  color: #dce8f0;
  background: #192532;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .06em;
}

.user-team-page th,
.user-team-page td {
  border-color: var(--user-team-line-soft);
}

.user-team-page tbody tr:hover {
  background: rgba(130, 196, 238, .08);
}

.user-team-page .folder-breadcrumb a,
.user-team-page .folder-link,
.user-team-page .document-title-button {
  color: #dce8f0;
}

.user-team-page .folder-breadcrumb a:hover,
.user-team-page .folder-link:hover,
.user-team-page .document-title-button:hover {
  color: var(--user-team-green);
}

.user-team-page .upload-dialog,
.user-team-page .folder-dialog {
  border: 2px solid var(--user-team-line);
  background: linear-gradient(180deg, #151e2b, #080e16);
  box-shadow: inset 0 0 30px rgba(92, 176, 255, .12), 0 24px 48px rgba(0, 0, 0, .48);
}

.user-team-page .manual-document {
  border: 2px solid var(--user-team-line);
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .34);
}

.user-team-page .privacy-panel h2 {
  padding: 9px 12px;
  border-left: 4px solid var(--user-team-line);
  color: #dce8f0;
  background: rgba(130, 156, 182, .08);
  font: 900 15px/1.25 "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.user-team-page .privacy-panel a {
  color: #dce8f0;
}

@media (max-width: 700px) {
  .user-team-page .user-team-panel {
    padding: 30px 14px 18px;
  }

  .user-team-page .user-team-panel::before {
    left: 12px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-team-page .form-grid,
  .user-team-page .search-bar,
  .user-team-page .folder-breadcrumb {
    padding: 12px;
  }

  .user-team-page .person-card {
    align-items: flex-start;
  }

  .user-team-page .directory-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .aristo-proto-panel {
    padding: 12px;
  }

  .aristo-workbench {
    padding: 8px;
  }

  .aristo-instrument {
    max-width: 620px;
  }

  .aristo-toolbar,
  .aristo-mode-group,
  .aristo-nudge-group {
    width: 100%;
  }

  .aristo-toolbar .default-cockpit-button {
    min-width: 0;
    flex: 1 1 140px;
  }
}

@media (max-width: 700px) {
  .app-header {
    align-items: flex-start;
  }

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

  .actions-cell.safety-actions {
    min-height: auto;
  }

  .safety-button-column {
    width: 100%;
  }

  .mini-logo-stage {
    width: 92px;
  }

  .form-grid,
  .user-menu {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
  }

  .user-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-toolbar,
  .manual-cover {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .manual-meta,
  .manual-meta div {
    grid-template-columns: 1fr;
  }

  .sandbox-entry-panel,
  .panel-heading {
    flex-direction: column;
  }

  .sandbox-grid,
  .sandbox-slots {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  html,
  body {
    background: #ffffff !important;
  }

  body {
    color: #000000 !important;
  }

  .no-print,
  .app-header,
  .back-button,
  .app-nav,
  .feedback-button,
  .feedback-dialog {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .dashboard-panel,
  .manual-panel {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .user-team-panel::before {
    display: none !important;
  }

  .manual-document {
    padding: 0;
    box-shadow: none;
  }

  .manual-section {
    break-inside: avoid;
  }

  .manual-classification,
  .manual-footer {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
