:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030303;
  color: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #030303;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, #050505 0%, #000 46%, #050505 100%);
}

/* Default zoom for the authenticated app shell */
#appShell:not(.hidden) {
  zoom: 0.9;
}

button,
select {
  font: inherit;
}

.orb {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.45;
}

.orb-a {
  width: 34rem;
  height: 34rem;
  top: -18rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
}

.orb-b {
  width: 22rem;
  height: 22rem;
  left: -12rem;
  bottom: 10rem;
  background: radial-gradient(circle, rgba(112, 112, 112, 0.22), transparent 70%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  min-height: 76px;
  padding: 0 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.18em;
}

.brand-mark {
  width: 2.2rem;
  height: 0.56rem;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: skewX(-28deg);
}

.brand-text {
  font-size: 1.02rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 0.28rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  min-width: max-content;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.active::after {
  position: absolute;
  right: 1rem;
  bottom: 0.35rem;
  left: 1rem;
  height: 2px;
  border-radius: 99px;
  background: #fff;
  content: "";
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
}

.aircraft-picker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.55rem 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.aircraft-picker span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.aircraft-picker select {
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
}

.aircraft-picker option {
  color: #050505;
}

.profile-button,
.cta-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #050505;
  font-weight: 900;
  cursor: pointer;
}

.profile-button {
  padding: 0.78rem 1rem;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4.2rem 0;
}

.compact-shell {
  padding-top: 1.4rem;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.2rem;
  background: rgba(8, 8, 8, 0.62);
  backdrop-filter: blur(18px);
}

.toolbar-identity {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.company-logo[hidden] { display: none; }

.company-logo {
  display: grid;
  width: 6.4rem;
  height: 4.2rem;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 1rem;
  background: #fff;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.45rem;
}

.company-logo span {
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.company-logo-fallback {
  background: #fff;
}

.dashboard-toolbar .eyebrow {
  margin-bottom: 0.35rem;
}

.dashboard-toolbar strong {
  display: block;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.dashboard-toolbar small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.52);
}

.compact-metrics {
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1rem;
  font-size: clamp(4rem, 9vw, 8.4rem);
  line-height: 0.86;
  letter-spacing: -0.085em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.mission-card,
.glass-panel,
.metric-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px);
}

.mission-card {
  display: grid;
  gap: 0.55rem;
  padding: 1.4rem;
  border-radius: 1.4rem;
}

.mission-label,
.metric-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mission-card strong {
  font-size: 1.7rem;
}

.mission-card small {
  color: rgba(255, 255, 255, 0.46);
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: stretch;
  gap: 0.8rem;
  margin: 0.8rem 0;
}

.metric-grid:empty {
  display: none;
}

.metric-card {
  height: 100%;
  min-height: 7.2rem;
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.26);
}

.metric-card strong {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 2.25rem;
  letter-spacing: -0.06em;
}

.metric-card p,
.side-panel p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.52);
}

.metric-breakdown {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.75rem;
}

.metric-breakdown span,
.metric-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.28rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: inherit;
  text-align: left;
}

.metric-breakdown-row {
  cursor: pointer;
}

.metric-breakdown-row:hover,
.metric-breakdown-row.active {
  background: rgba(255, 255, 255, 0.06);
}

.metric-breakdown b {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
}

.metric-breakdown em {
  color: #fbbf24;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.fleet-filter-box {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.7rem;
}

.fleet-filter-box strong {
  margin: 0;
}

.fleet-filter-box label {
  display: grid;
  gap: 0.28rem;
}

.fleet-filter-box label span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fleet-filter-box input,
.fleet-filter-box select {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  padding: 0.55rem 0.7rem;
}

.metric-card.primary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.metric-card.warning {
  border-color: rgba(255, 196, 87, 0.7);
  background: linear-gradient(145deg, rgba(255, 196, 87, 0.24), rgba(255, 196, 87, 0.055));
  box-shadow: 0 0 0 1px rgba(255, 196, 87, 0.16), 0 1.4rem 4rem rgba(255, 196, 87, 0.08);
}

.metric-card.warning .metric-label,
.metric-card.warning p {
  color: #fbbf24;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(20rem, 0.75fr);
  gap: 1rem;
}

.glass-panel {
  border-radius: 1.6rem;
  padding: 1.45rem;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.status-pill {
  padding: 0.44rem 0.72rem;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 999px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-list {
  display: grid;
  gap: 0.7rem;
}

.status-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.64);
}

.aircraft-code {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.green {
  color: #86efac;
}

.amber {
  color: #fbbf24;
}

.side-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.cta-button {
  width: 100%;
  padding: 1rem 1.2rem;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 1rem;
  }

  .brand,
  .top-actions {
    justify-content: center;
  }

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

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

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 1rem, 1480px);
    padding-top: 1rem;
  }

  .top-actions,
  .aircraft-picker {
    width: 100%;
  }

  .aircraft-picker select,
  .profile-button {
    flex: 1;
  }

  .dashboard-toolbar,
  .toolbar-identity {
    align-items: flex-start;
  }

  .dashboard-toolbar {
    display: grid;
  }

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

  .status-row {
    grid-template-columns: 1fr;
  }
}

.hidden {
  display: none !important;
}

.login-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.warp-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  pointer-events: none;
  background: #000;
  opacity: 1;
  transition: opacity 0.6s ease-out;
}

.warp-canvas.fading {
  opacity: 0;
}

/* ==================== Top Page Progress Bar (0 → 100%) ==================== */
.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease-out;
  background: transparent;
}

.page-progress.is-active {
  opacity: 1;
}

.page-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7dd3fc, #a78bfa 45%, #f472b6);
  box-shadow:
    0 0 10px rgba(167, 139, 250, 0.65),
    0 0 4px rgba(125, 211, 252, 0.85);
  transition: width 0.25s ease-out;
  border-radius: 0 2px 2px 0;
}

.page-progress.is-indeterminate .page-progress-bar {
  width: 30%;
  animation: page-progress-indeterminate 1.2s ease-in-out infinite;
}

@keyframes page-progress-indeterminate {
  0% { transform: translateX(-100%); width: 30%; }
  50% { width: 60%; }
  100% { transform: translateX(340%); width: 30%; }
}

/* While a page is loading, fade the previous content and block clicks so
   the user sees the progress bar run without a stale flash of content. */
.page-shell {
  transition: opacity 0.25s ease-out, filter 0.25s ease-out;
}

.page-shell.is-loading {
  opacity: 0.28;
  filter: blur(1px);
  pointer-events: none;
}

.login-screen .login-card {
  position: relative;
  z-index: 2;
}

.login-screen {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.login-card {
  width: min(100%, 31rem);
  padding: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2rem;
  background: rgba(8, 8, 8, 0.76);
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(24px);
}

.login-brand {
  margin-bottom: 3rem;
}

.login-title {
  max-width: 7ch;
  margin-bottom: 1rem;
  font-size: clamp(3.8rem, 9vw, 6.6rem);
}

.login-copy {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.login-form label {
  display: grid;
  gap: 0.55rem;
}

.login-form label span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  padding: 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
}

.login-form input:focus {
  border-color: rgba(255, 255, 255, 0.42);
}

.form-message {
  min-height: 1.4rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.ghost-button {
  padding: 0.74rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.full-width-panel {
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
}

.modal-card {
  width: min(100%, 62rem);
  max-height: min(82vh, 48rem);
  overflow: auto;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.8rem;
  background: rgba(9, 9, 9, 0.92);
  box-shadow: 0 2rem 8rem rgba(0, 0, 0, 0.75);
}

.maintenance-password-dialog {
  width: min(calc(100% - 2rem), 28rem);
  margin: auto;
  color: #fff;
}

.maintenance-password-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.maintenance-password-dialog .modal-actions {
  justify-content: flex-end;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-current-selection {
  display: block;
  margin-top: 0.45rem;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 800;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-button {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.aircraft-modal-grid,
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.8rem;
}

.aircraft-choice,
.fleet-card {
  position: relative;
  display: grid;
  grid-template-rows: 8.4rem auto;
  gap: 0.85rem;
  width: 100%;
  min-height: 15rem;
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.aircraft-choice:hover,
.fleet-card:hover,
.active-choice {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.09);
}

.aircraft-choice.active-choice {
  border-color: rgba(251, 191, 36, 0.88);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.18), rgba(255, 255, 255, 0.055));
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2), 0 1.2rem 3.4rem rgba(251, 191, 36, 0.08);
}

.active-modal-action {
  border-color: rgba(251, 191, 36, 0.7);
  color: #fbbf24;
}

.current-view-badge {
  position: absolute;
  top: 0.82rem;
  right: 0.82rem;
  z-index: 2;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(251, 191, 36, 0.65);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fbbf24;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.choice-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 8.4rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.82rem;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 42%);
}

.choice-photo::after {
  content: "NO PHOTO";
  color: rgba(255, 255, 255, 0.26);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.choice-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.choice-photo:not(.no-card-photo)::after {
  display: none;
}

.fleet-overview-photo::before {
  content: "";
  width: 58%;
  height: 2.2rem;
  border-top: 2px solid rgba(255, 255, 255, 0.72);
  border-right: 2px solid rgba(255, 255, 255, 0.72);
  transform: skewX(-28deg);
}

.fleet-overview-photo::after {
  content: "FLEET";
  position: absolute;
  bottom: 0.95rem;
  left: 1rem;
  display: block;
  color: rgba(255, 255, 255, 0.32);
}

.choice-copy {
  display: grid;
  gap: 0.42rem;
  padding: 0 0.28rem 0.28rem;
}

.aircraft-choice span,
.fleet-card span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.aircraft-choice strong,
.fleet-card strong {
  font-size: 1.25rem;
}

.aircraft-choice small,
.fleet-card small,
.fleet-card em {
  color: rgba(255, 255, 255, 0.58);
  font-style: normal;
  line-height: 1.45;
}

.aircraft-detail-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 0.55fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: start;
}

.aircraft-photo-wrap {
  display: grid;
  min-height: 15rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.2rem;
  background: #050505;
}

.aircraft-photo-wrap::after {
  content: "AIRCRAFT";
  color: rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.aircraft-photo-wrap:not(.no-photo)::after {
  display: none;
}

.aircraft-photo-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.detail-matrix,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.detail-matrix div,
.mini-grid div {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.detail-matrix span,
.mini-grid span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-matrix strong,
.mini-grid strong {
  color: #fff;
  font-size: 1rem;
}

.table-section {
  margin-top: 1rem;
}

.compact-header {
  margin-bottom: 0.8rem;
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 34rem;
}

.data-table th,
.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.data-table th {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.document-list,
.defect-list {
  display: grid;
  gap: 0.6rem;
  max-height: 28rem;
  margin-top: 1rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.document-row,
.defect-row {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
}

.document-row.attention {
  border-color: rgba(255, 196, 87, 0.78);
  background: rgba(255, 196, 87, 0.14);
}

.defect-row {
  border-color: rgba(255, 196, 87, 0.38);
}

.document-row span,
.defect-row span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.86rem;
}

.detail-side-panel {
  justify-content: flex-start;
}

.detail-side-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.detail-side-section.detail-side-static {
  cursor: default;
}

button.detail-side-section:hover,
button.detail-side-section:focus-visible {
  outline: none;
}

button.detail-side-section:hover .defect-row,
button.detail-side-section:focus-visible .defect-row {
  border-color: rgba(255, 196, 87, 0.7);
  background: rgba(255, 196, 87, 0.12);
}

button.document-row {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button.document-row:hover,
button.document-row:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

button.document-row.attention:hover,
button.document-row.attention:focus-visible {
  border-color: rgba(255, 196, 87, 1);
  background: rgba(255, 196, 87, 0.22);
}

.fleet-page-panel {
  overflow: hidden;
}

.fleet-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.fleet-tab {
  padding: 0.8rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.fleet-tab + .fleet-tab {
  margin-left: 1rem;
}

.fleet-tab.active {
  border-color: #fff;
  color: #fff;
}

.fleet-inline-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.045);
}

.fleet-inline-panel.success {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.fleet-inline-panel.error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.fleet-inline-list {
  display: grid;
  gap: 0.6rem;
}

.fleet-management-grid {
  display: grid;
  gap: 1rem;
}

.team-management-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.team-sidebar,
.team-main-panel {
  padding: 1rem;
}

.team-sidebar {
  align-self: start;
  display: grid;
  gap: 0.75rem;
}

.team-sidebar h2 {
  margin-bottom: 0.3rem;
  color: #fff;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.team-side-item {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.team-side-item.active,
.team-side-item:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.team-filter-card,
.team-top-controls {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(11rem, 0.34fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.team-filter-card label,
.team-top-controls label,
.team-form label {
  display: grid;
  gap: 0.35rem;
}

.team-filter-card span,
.team-top-controls span,
.team-form span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.team-filter-card input,
.team-filter-card select,
.team-top-controls input,
.team-top-controls select,
.team-form input,
.team-form select {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  padding: 0.65rem 0.75rem;
}

.team-form select[multiple] {
  min-height: 7.2rem;
}

.team-list-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 0.3fr) minmax(0, 0.7fr);
  align-items: start;
  gap: 1rem;
}

.team-member-list {
  display: grid;
  max-height: calc(100vh - 21rem);
  gap: 0.65rem;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
}

.team-member-card {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.team-member-card:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.team-member-card.active {
  border-color: rgba(59, 130, 246, 0.95);
  background: rgba(59, 130, 246, 0.24);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.28), 0 0.8rem 2rem rgba(37, 99, 235, 0.18);
}

.team-member-card-info {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.team-member-card-info span,
.team-member-card-info small,
.team-detail-card p {
  color: rgba(255, 255, 255, 0.54);
}

.team-member-card-info strong,
.team-member-card-info span,
.team-member-card-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-detail-card {
  position: sticky;
  top: 6.8rem;
  display: grid;
  gap: 0.9rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.035);
}

.team-avatar,
.team-member-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  color: #050505;
  font-weight: 900;
}

.team-avatar {
  width: 6.8rem;
  height: 6.8rem;
  border-radius: 1.7rem;
  font-size: 2.8rem;
}

.team-member-photo {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.9rem;
  font-size: 1.25rem;
}

.team-avatar img,
.team-member-photo img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-avatar span,
.team-member-photo span {
  position: relative;
  z-index: 0;
}

.team-detail-card h2 {
  margin: 0;
  color: #fff;
}

.team-action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.team-action-grid .compact-action {
  justify-content: center;
  min-height: 3rem;
  border-radius: 0.9rem;
}

.team-action-grid .compact-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.team-detail-card.subpanel-active {
  position: static;
}

.team-subpanel {
  display: grid;
  gap: 1rem;
}

.team-file-folder-grid,
.team-comp-grid {
  display: grid;
  gap: 0.85rem;
}

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

.team-file-folder {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.025);
}

.team-file-list {
  display: grid;
  gap: 0.55rem;
}

.team-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.22);
}

.team-file-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  min-width: 0;
  flex: 1 1 260px;
}

.team-file-row span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.82rem;
}

.team-file-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.team-file-actions .compact-action {
  min-height: auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.team-file-row > .crew-document-form {
  flex: 1 1 100%;
}

.expiry-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.expiry-badge.expiry-ok {
  color: #7ee2a8;
  background: rgba(60, 200, 120, 0.14);
  border-color: rgba(60, 200, 120, 0.35);
}
.expiry-badge.expiry-warning {
  color: #ffd77a;
  background: rgba(255, 200, 90, 0.14);
  border-color: rgba(255, 200, 90, 0.35);
}
.expiry-badge.expiry-critical {
  color: #ffb478;
  background: rgba(255, 160, 80, 0.16);
  border-color: rgba(255, 160, 80, 0.4);
}
.expiry-badge.expiry-expired {
  color: #ff8a8a;
  background: rgba(255, 90, 90, 0.16);
  border-color: rgba(255, 90, 90, 0.45);
}

.add-document-action {
  width: 100%;
  min-height: 2.55rem;
  border-style: solid;
}

.crew-document-form {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.crew-document-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.crew-document-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.crew-document-form-grid label {
  display: grid;
  gap: 0.28rem;
}

.crew-document-form-grid span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crew-document-form-grid input,
.crew-document-form-grid textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.72rem;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  padding: 0.58rem 0.68rem;
}

.crew-document-form-grid textarea {
  min-height: 4rem;
  resize: vertical;
}

.medical-rule-panel {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(74, 158, 255, 0.35);
  border-radius: 0.8rem;
  background: rgba(74, 158, 255, 0.05);
}
.medical-rule-panel[hidden],
.medical-rule-panel [hidden] {
  display: none;
}
.medical-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
  min-width: 0;
}
.medical-rule-panel fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.crew-document-form-grid .medical-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.crew-document-form-grid .medical-check input {
  width: auto;
}
.medical-rule-panel output {
  font-weight: 700;
  padding: 0.5rem 0;
}
.medical-rule-panel small {
  color: rgba(255, 255, 255, 0.65);
}
.medical-history ul {
  max-height: 12rem;
  overflow: auto;
  padding-left: 1.25rem;
}
.medical-history li {
  margin: 0.65rem 0;
  overflow-wrap: anywhere;
}

.team-comp-grid .team-info-section + .team-info-section {
  border-left: 0;
}

/* ===================== Account Management ===================== */

.glass-panel.account-management-page {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.6rem;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: none;
  overflow: hidden;
}

.account-management-page .panel-header,
.account-management-page .account-panel-header {
  padding: 1.5rem 1.75rem 0.35rem;
}

.account-panel-header .eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.account-panel-header h2,
.account-panel-header small {
  display: none;
}

.account-main-tabs {
  display: flex;
  gap: 2rem;
  padding: 0 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-management-page .account-main-tab {
  appearance: none;
  position: relative;
  padding: 0.85rem 0.15rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.account-management-page .account-main-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.account-management-page .account-main-tab.active {
  color: #ffffff;
}

.account-management-page .account-main-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.account-users-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2.5rem;
  padding: 1.75rem 1.75rem 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.account-section-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.account-section-title p {
  margin: 0.3rem 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.82rem;
}

.account-summary-strip {
  display: flex;
  gap: 2.4rem;
}

.account-summary-card {
  display: grid;
  gap: 0.2rem;
  min-width: 4rem;
  text-align: center;
}

.account-summary-card strong {
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.account-summary-card span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.account-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-view-toggle {
  display: inline-flex;
  padding: 0.16rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.3rem;
  background: rgba(10, 14, 21, 0.6);
}

.account-management-page .account-view-option {
  appearance: none;
  min-width: 3.75rem;
  padding: 0.42rem 0.7rem;
  border: 0;
  border-radius: 0.22rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.account-management-page .account-view-option.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.account-management-page .account-invite-button {
  appearance: none;
  min-height: 2.55rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.account-management-page .account-invite-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.14);
}

.account-filter-row {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) 12rem 12rem;
  gap: 0.85rem;
  padding: 0 1.75rem 1.1rem;
}

.account-filter-row label {
  display: block;
  position: relative;
}

.account-filter-row label span {
  display: none;
}

.account-filter-row input,
.account-filter-row select {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.35rem;
  background: rgba(11, 15, 22, 0.9);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  outline: none;
}

.account-filter-row input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.account-filter-row select {
  appearance: none;
  padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 46%, rgba(255, 255, 255, 0.42) 46%, rgba(255, 255, 255, 0.42) 54%, transparent 54%),
                    linear-gradient(-45deg, transparent 46%, rgba(255, 255, 255, 0.42) 46%, rgba(255, 255, 255, 0.42) 54%, transparent 54%);
  background-position: calc(100% - 1.05rem) 55%, calc(100% - 0.65rem) 55%;
  background-size: 0.42rem 0.42rem;
  background-repeat: no-repeat;
}

.account-table-wrap {
  overflow: auto;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-user-table {
  width: 100%;
  min-width: 62rem;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.account-col-user { width: 24%; }
.account-col-role { width: 10%; }
.account-col-status { width: 10%; }
.account-col-access { width: 34%; }
.account-col-activity { width: 12%; }
.account-col-actions { width: 10%; }

.account-user-table thead th {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: left;
  text-transform: uppercase;
}

.account-user-table thead th:last-child {
  text-align: right;
}

.account-user-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  vertical-align: middle;
  overflow: hidden;
}

.account-user-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.account-user-identity {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.05rem 0.85rem;
  align-items: center;
  min-width: 0;
}

.account-user-identity > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.account-user-identity strong,
.account-user-identity small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-user-identity strong {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
}

.account-user-identity small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
}

.account-role-pill {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
}

.account-status-pill i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.account-status-pill.active i {
  background: #58d26b;
  box-shadow: 0 0 0.5rem rgba(88, 210, 107, 0.6);
}

.account-access-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.account-access-summary strong {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.account-aircraft-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  min-width: 0;
}

.account-aircraft-badges em {
  padding: 0.24rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
}

.account-actions-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
}

.account-management-page .account-manage-button {
  appearance: none;
  min-width: 4.4rem;
  min-height: 2rem;
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.22rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.account-management-page .account-manage-button:hover {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.05);
}

.account-management-page .account-kebab-button {
  appearance: none;
  padding: 0.2rem 0.35rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.account-management-page .account-kebab-button:hover {
  color: rgba(255, 255, 255, 0.8);
}

.account-kebab-wrap {
  position: relative;
}

.account-kebab-menu {
  position: fixed;
  z-index: 200;
  display: grid;
  min-width: 10rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(15, 17, 24, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.account-management-page .account-kebab-menu button {
  appearance: none;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.account-management-page .account-kebab-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.account-management-page .account-kebab-menu button.danger {
  color: #ff8484;
}

.account-management-page .account-kebab-menu button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.account-management-page .account-pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.account-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.75rem 1.4rem;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.78rem;
}

.account-pagination {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.account-management-page .account-pagination button {
  appearance: none;
  display: grid;
  place-items: center;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.account-management-page .account-pagination button.active {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.account-pagination span {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.8rem;
}

.account-message {
  margin: 0 1.75rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(59, 130, 246, 0.32);
  border-radius: 0.55rem;
  background: rgba(59, 130, 246, 0.12);
  color: rgba(219, 234, 254, 0.95);
  font-weight: 700;
}

.account-caption {
  padding: 0 1.75rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
}

.account-table-wrap.matrix-mode {
  overflow-x: auto;
  overflow-y: hidden;
  width: auto;
  max-width: 100%;
  padding: 0;
  position: relative;
}

.account-access-matrix-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.account-access-matrix-table th {
  text-align: center;
}

.account-access-matrix-table thead th,
.account-access-matrix-table tbody td {
  background: rgba(10, 10, 10, 0.98);
}

.account-access-matrix-table tbody tr:hover td {
  background: rgba(20, 20, 24, 0.98);
}

.account-access-matrix-table .matrix-sticky-user,
.account-access-matrix-table .matrix-sticky-role,
.account-access-matrix-table .matrix-sticky-status,
.account-access-matrix-table .matrix-sticky-actions {
  position: sticky;
  z-index: 3;
}

.account-access-matrix-table .matrix-sticky-user { left: 0; }
.account-access-matrix-table .matrix-sticky-role { left: 16rem; }
.account-access-matrix-table .matrix-sticky-status { left: 22.5rem; box-shadow: 1px 0 0 rgba(255, 255, 255, 0.08); }
.account-access-matrix-table .matrix-sticky-actions { right: 0; box-shadow: -1px 0 0 rgba(255, 255, 255, 0.08); }

.account-access-matrix-table thead .matrix-sticky-user,
.account-access-matrix-table thead .matrix-sticky-role,
.account-access-matrix-table thead .matrix-sticky-status,
.account-access-matrix-table thead .matrix-sticky-actions {
  z-index: 5;
}

.account-access-matrix-table .account-user-identity {
  grid-template-columns: 2.4rem minmax(0, 1fr);
}

.account-access-matrix-table .account-matrix-permission-cell {
  min-width: 3.6rem;
}

.account-matrix-permission-cell,
.account-matrix-more {
  text-align: center;
}

.account-matrix-permission-cell label {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.account-matrix-permission-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-matrix-permission-cell span {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.22rem;
  background: rgba(127, 29, 29, 0.32);
  color: #ff7777;
  font-size: 0.78rem;
  font-weight: 900;
}

.account-matrix-permission-cell input:checked + span {
  background: rgba(34, 197, 94, 0.22);
  color: #83e48f;
}

.account-matrix-permission-cell input:disabled + span {
  opacity: 0.7;
}

.account-matrix-legend {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1.75rem 1.25rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.account-matrix-legend b {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  margin-right: 0.35rem;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.58);
}

.account-matrix-legend .granted {
  background: rgba(34, 197, 94, 0.22);
  color: #83e48f;
}

.account-matrix-legend .denied {
  background: rgba(127, 29, 29, 0.34);
  color: #ff7777;
}

.account-detail-panel {
  display: grid;
  gap: 1.1rem;
  padding: 1.5rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-back-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  cursor: pointer;
}

.account-detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) repeat(3, auto);
  gap: 1rem;
  align-items: center;
}

.account-avatar-large {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.account-detail-header h2 {
  margin: 0;
  color: #fff;
}

.account-detail-header small {
  color: rgba(255, 255, 255, 0.5);
}

.account-detail-header p {
  display: flex;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
}

.account-detail-header em {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.account-detail-stat {
  display: grid;
  gap: 0.15rem;
  padding: 0.5rem 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.account-detail-stat strong {
  color: #fff;
  font-size: 1.25rem;
}

.account-detail-stat span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.account-detail-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-management-page .account-detail-tabs button {
  appearance: none;
  position: relative;
  padding: 0.75rem 0 0.85rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.account-management-page .account-detail-tabs button.active {
  color: #fff;
}

.account-management-page .account-detail-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.account-aircraft-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.account-aircraft-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.85rem;
  padding: 1rem;
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  background: rgba(15, 17, 24, 0.68);
}

.account-aircraft-card header,
.account-aircraft-card footer,
.account-folder-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.account-aircraft-card h3 {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
}

.account-aircraft-card small,
.account-aircraft-card header span,
.account-aircraft-card footer span,
.account-folder-list span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
}

.account-folder-list {
  display: grid;
  gap: 0.4rem;
}

.account-folder-list label {
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.account-folder-list label:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.account-folder-list input[type="checkbox"] {
  accent-color: #58d26b;
  cursor: pointer;
}

.account-folder-group {
  display: grid;
  gap: 0.5rem;
}

.account-folder-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.15rem;
}

.account-folder-group-title {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.account-folder-group-title em {
  font-style: normal;
  margin-left: 0.4rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.account-folder-group-bulk {
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
}

.account-folder-divider {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin: 0.35rem 0;
}

.account-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem 1.75rem;
}

.account-invite-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 1.75rem 2rem;
}

.account-invite-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  background: rgba(18, 20, 28, 0.72);
  overflow: hidden;
}

.account-invite-card-header {
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.account-invite-card-header .eyebrow {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.account-invite-card-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.account-invite-card-header small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.account-invite-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.85rem 0.9rem;
  padding: 1.15rem 1.25rem;
  flex: 1;
}

.account-invite-card-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.account-field {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.account-field-full {
  grid-column: 1 / -1;
}

.account-field > span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-field input,
.account-field select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.45rem;
  background: rgba(11, 15, 22, 0.9);
  color: #fff;
  font-size: 0.82rem;
  appearance: none;
}

.account-field select {
  padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 1.05rem) 55%, calc(100% - 0.65rem) 55%;
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
}

.account-field input:focus,
.account-field select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(11, 15, 22, 1);
}

.account-chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.45rem;
  background: rgba(11, 15, 22, 0.7);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.account-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.account-chip:has(input:checked) {
  border-color: rgba(88, 155, 255, 0.7);
  background: rgba(88, 155, 255, 0.18);
  color: #fff;
}

.account-toggle-row {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.account-toggle-row input {
  accent-color: #58d26b;
}

.account-primary-button {
  appearance: none;
  height: 2.4rem;
  min-height: 0;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #0f1319;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.account-primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.16);
}

.account-radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 0;
}

.account-radio {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  flex: 0 0 auto;
  height: 2rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.account-radio:has(input:checked) {
  border-color: rgba(88, 155, 255, 0.7);
  background: rgba(88, 155, 255, 0.18);
  color: #fff;
}

.account-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  min-height: 0;
  width: 0;
  height: 0;
}

.account-input-suffix {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.45rem;
  background: rgba(11, 15, 22, 0.9);
  overflow: hidden;
}

.account-input-suffix input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  outline: none;
}

.account-input-addon {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  white-space: nowrap;
}

.account-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.4rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.45rem;
  background: rgba(11, 15, 22, 0.7);
}

.account-check-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.account-check-tile:has(input:checked) {
  border-color: rgba(88, 155, 255, 0.65);
  background: rgba(88, 155, 255, 0.16);
  color: #fff;
}

.account-check-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.account-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.9rem;
  padding: 0;
}

.account-invite-inline-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.account-field > span em {
  color: rgba(255, 100, 100, 0.85);
  font-style: normal;
  margin-left: 0.25rem;
}

.account-pending-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.account-pending-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
}

.account-pending-list li strong {
  display: block;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.account-pending-list li small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.account-pending-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.account-mini-button {
  appearance: none;
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  cursor: pointer;
}

.account-mini-button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.account-empty-note {
  display: block;
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.report-page { display: grid; gap: 1.1rem; }

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.report-filter-block,
.report-totals-block,
.report-table-block {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.6rem;
  padding: 0.9rem 1.05rem 1.05rem;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 0.65rem;
}

.report-filter-block h3,
.report-totals-block h3,
.report-table-block h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.report-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.report-inline-field {
  display: grid;
  gap: 0.25rem;
  min-width: 12rem;
  flex: 1;
}

.report-inline-field span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.report-inline-field input {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  background: rgba(11, 15, 22, 0.85);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.report-inline-field input:focus {
  border-color: rgba(74, 158, 255, 0.6);
}

.compact-action.active {
  border-color: rgba(74, 158, 255, 0.7);
  background: rgba(74, 158, 255, 0.2);
  color: #fff;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.6rem;
}

.report-metric {
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.55rem;
  background: rgba(11, 15, 22, 0.55);
  display: grid;
  gap: 0.35rem;
}

.report-metric small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.report-metric strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.report-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.report-preview-header h3 {
  margin: 0;
}

.report-count {
  margin-left: 0.6rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.report-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  background: rgba(11, 15, 22, 0.55);
}

.report-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.78rem;
}

.report-table th,
.report-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.report-table thead th {
  position: sticky;
  top: 0;
  background: rgba(15, 17, 24, 0.95);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.report-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.maintenance-page { display: grid; gap: 1rem; }

.maintenance-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.maintenance-header-actions {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.maintenance-filter select {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  background: rgba(11, 15, 22, 0.85);
  color: #fff;
  font-size: 0.85rem;
  min-width: 12rem;
}

.maintenance-tabs {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.55rem;
  flex-wrap: wrap;
}

.maintenance-tab {
  padding: 0.5rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.maintenance-tab:hover { color: rgba(255, 255, 255, 0.85); }

.maintenance-tab.active {
  background: rgba(74, 158, 255, 0.15);
  border-color: rgba(74, 158, 255, 0.55);
  color: #fff;
}

.maintenance-tab.disabled,
.maintenance-tab[disabled] {
  color: rgba(255, 255, 255, 0.28);
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}
.maintenance-tab.disabled:hover,
.maintenance-tab[disabled]:hover { color: rgba(255, 255, 255, 0.28); }

.documents-all-hint {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.maintenance-tab-content { display: grid; gap: 0.75rem; }

.maintenance-defect-list { display: grid; gap: 0.55rem; }

.maintenance-defect-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.maintenance-defect-chip {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.maintenance-defect-chip.active {
  background: rgba(74, 158, 255, 0.18);
  border-color: rgba(74, 158, 255, 0.6);
  color: #fff;
}

.maintenance-defect-badge.resolved {
  background: rgba(80, 200, 130, 0.15);
  color: #7fe0a0;
  border: 1px solid rgba(80, 200, 130, 0.35);
}

.resolved-text { color: #7fe0a0; }

.maintenance-defect-card.is-resolved { opacity: 0.7; }

.maintenance-records-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .maintenance-records-grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); }
}

.maintenance-record-form { padding: 1rem 1.1rem; display: grid; gap: 0.75rem; }

.maintenance-record-form-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.maintenance-record-form-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.maintenance-record-form-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.25rem;
}

.maintenance-record-form input[type="text"],
.maintenance-record-form input[type="date"],
.maintenance-record-form select {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  background: rgba(11, 15, 22, 0.85);
  color: #fff;
  font-size: 0.85rem;
  color-scheme: dark;
  width: 100%;
}

.maintenance-record-form select:disabled,
.maintenance-record-form input:disabled { opacity: 0.6; cursor: not-allowed; }

.maintenance-record-message {
  padding: 0.55rem 0.8rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.maintenance-record-message.info { background: rgba(74, 158, 255, 0.12); color: #9ec5ff; border-color: rgba(74, 158, 255, 0.35); }
.maintenance-record-message.success { background: rgba(80, 200, 130, 0.12); color: #7fe0a0; border-color: rgba(80, 200, 130, 0.35); }
.maintenance-record-message.error { background: rgba(255, 100, 100, 0.12); color: #ff9797; border-color: rgba(255, 100, 100, 0.35); }

.maintenance-record-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.maintenance-record-list-panel { padding: 1rem 1.1rem; display: grid; gap: 0.75rem; }

.maintenance-record-list-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.maintenance-record-list {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.maintenance-record-card {
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  display: grid;
  gap: 0.55rem;
}

.maintenance-record-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.maintenance-record-card header strong { font-size: 0.95rem; }

.maintenance-record-task {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.maintenance-record-badge {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.maintenance-record-badge.ok { background: rgba(80, 200, 130, 0.12); color: #7fe0a0; border-color: rgba(80, 200, 130, 0.35); }
.maintenance-record-badge.due-soon { background: rgba(255, 176, 80, 0.15); color: #ffc27a; border-color: rgba(255, 176, 80, 0.35); }
.maintenance-record-badge.overdue { background: rgba(255, 100, 100, 0.12); color: #ff9797; border-color: rgba(255, 100, 100, 0.35); }

.maintenance-record-details {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.maintenance-record-details div { display: grid; gap: 0.15rem; }
.maintenance-record-details dt {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.maintenance-record-details dd { margin: 0; font-size: 0.82rem; color: #fff; }

.maintenance-record-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.danger-action {
  border-color: rgba(255, 100, 100, 0.35) !important;
  color: #ff9797 !important;
}
.danger-action:hover { background: rgba(255, 100, 100, 0.12) !important; }

.maintenance-serial-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.serial-card { padding: 1rem 1.1rem; display: grid; gap: 0.75rem; }

.serial-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.serial-card-header h3 { margin: 0.15rem 0 0; font-size: 0.95rem; color: rgba(255, 255, 255, 0.75); font-weight: 500; }

.serial-display {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .serial-display { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.serial-display-block {
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.45rem;
  display: grid;
  gap: 0.4rem;
}

.serial-display-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.serial-display-block li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.serial-display-block li span { color: rgba(255, 255, 255, 0.5); }
.serial-display-block li strong { color: #fff; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.serial-display-block small { color: rgba(255, 255, 255, 0.4); font-size: 0.7rem; }
.serial-empty { color: rgba(255, 255, 255, 0.45); font-size: 0.8rem; margin: 0; }

.serial-form { display: grid; gap: 0.75rem; }
.serial-form-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.serial-form input[type="text"] {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  background: rgba(11, 15, 22, 0.85);
  color: #fff;
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
  width: 100%;
}
.serial-form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.maintenance-defect-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.maintenance-defect-card.open { border-color: rgba(255, 190, 100, 0.35); }

.maintenance-defect-header {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: transparent;
  border: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.maintenance-defect-header:hover { background: rgba(255, 255, 255, 0.03); }

.maintenance-defect-summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.maintenance-defect-badge {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.maintenance-defect-badge.pending {
  background: rgba(255, 176, 80, 0.15);
  color: #ffc27a;
  border: 1px solid rgba(255, 176, 80, 0.35);
}

.maintenance-defect-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.maintenance-defect-preview {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-defect-chevron {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.maintenance-defect-body {
  padding: 0.85rem 0.9rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 0.7rem;
  background: rgba(11, 15, 22, 0.35);
}

.maintenance-defect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.55rem;
}

.maintenance-defect-grid div {
  display: grid;
  gap: 0.25rem;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.4rem;
}

.maintenance-defect-grid small,
.maintenance-defect-description small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.maintenance-defect-grid strong { color: #fff; font-size: 0.88rem; }

.pending-text { color: #ffc27a; }

.maintenance-defect-description p {
  margin: 0.3rem 0 0;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  white-space: pre-wrap;
}

.maintenance-defect-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.account-nav-permission-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  padding: 0.5rem 0 0.25rem;
}

.account-nav-permission {
  position: relative;
  padding: 0.25rem 0.15rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 140ms ease;
}

.account-nav-permission:hover {
  color: rgba(255, 255, 255, 0.85);
}

.account-nav-permission input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.account-nav-permission:has(input:checked) {
  color: #4a9eff;
}

.account-nav-permission:has(input:checked)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 999px;
  background: #4a9eff;
}

.account-invite-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.account-invite-search-row input,
.account-invite-search-row select {
  min-height: 2.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.4rem;
  background: rgba(11, 15, 22, 0.9);
  color: #fff;
  font-size: 0.8rem;
  outline: none;
  appearance: none;
}

.account-invite-search-row input:focus,
.account-invite-search-row select:focus {
  border-color: rgba(74, 158, 255, 0.55);
}

.account-invite-account-list {
  display: grid;
  gap: 0.35rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(11, 15, 22, 0.55);
}

.account-invite-account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.account-invite-account-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.account-invite-account-item.selected,
.account-invite-account-item:has(input:checked) {
  border-color: rgba(74, 158, 255, 0.65);
  background: rgba(74, 158, 255, 0.16);
  color: #fff;
}

.account-invite-account-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.account-invite-account-item strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
}

.account-invite-account-item small {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
}

.account-invite-account-role {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.account-invite-empty {
  padding: 0.85rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.78rem;
  text-align: center;
}

.fillable-forms-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0 0.85rem;
}

.fillable-forms-total {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.fillable-forms-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.fillable-folder-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.7rem;
  background: rgba(15, 17, 24, 0.75);
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.fillable-folder-card[open] {
  border-color: rgba(74, 158, 255, 0.35);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

.fillable-folder-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  list-style: none;
  color: #fff;
  font-weight: 600;
  user-select: none;
  transition: background 140ms ease;
}

.fillable-folder-card summary::-webkit-details-marker { display: none; }
.fillable-folder-card summary::marker { content: ""; }

.fillable-folder-card summary::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transform: rotate(-45deg);
  margin-right: 0.25rem;
  transition: transform 140ms ease, border-color 140ms ease;
}

.fillable-folder-card[open] summary::before {
  transform: rotate(45deg);
  border-color: rgba(74, 158, 255, 0.9);
}

.fillable-folder-card summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.fillable-folder-name {
  flex: 1;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.fillable-folder-count {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fillable-folder-card[open] .fillable-folder-count {
  background: rgba(74, 158, 255, 0.2);
  color: #fff;
}

.fillable-folder-body {
  padding: 0.4rem 1.1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 15, 22, 0.6);
  display: grid;
  gap: 0.6rem;
}

.fillable-folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fillable-folder-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.fillable-folder-tab em {
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
}

.fillable-folder-tab:hover {
  color: #fff;
}

.fillable-folder-tab.active {
  color: #fff;
  background: rgba(74, 158, 255, 0.18);
  border-color: rgba(74, 158, 255, 0.55);
}

.fillable-folder-tab.active em {
  background: rgba(74, 158, 255, 0.35);
  color: #fff;
}

.fillable-folder-panel {
  margin-top: 0.85rem;
  padding: 1rem 1.1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  background: rgba(15, 17, 24, 0.55);
}

.fillable-folder-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.fillable-folder-panel-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.fillable-folder-panel-header small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
}

.fillable-doc-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.fillable-doc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
}

.fillable-doc-info strong {
  display: block;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
}

.fillable-doc-info small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
}

.fillable-doc-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.fillable-preview-slot { margin-top: 0.85rem; }

.fillable-preview-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  background: rgba(15, 17, 24, 0.85);
  overflow: hidden;
}

.fillable-preview-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.9rem;
}

.fillable-preview-card iframe {
  width: 100%;
  min-height: 780px;
  border: 0;
  background: #1a1a1a;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
}

.account-form-grid .team-form-section,
.account-form-actions,
.account-edit-toggle {
  grid-column: 1 / -1;
}

.account-form-grid label {
  display: grid;
  gap: 0.35rem;
}

.account-form-grid span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-form-grid input,
.account-form-grid select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.3rem;
  background: rgba(11, 15, 22, 0.9);
  color: #fff;
  font-size: 0.8rem;
}

.techlog-workspace {
  display: grid;
  gap: 1rem;
}

.techlog-filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.techlog-filters input,
.techlog-filters select,
.techlog-upload-form select,
.techlog-upload-form input,
.techlog-inline-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  padding: 0.72rem 0.95rem;
}

.archived-category-grid {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  white-space: nowrap;
}

.archived-category-card {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.archived-category-card.active {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.archived-category-card span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
}

.techlog-focus-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.035);
}

.techlog-focus-bar span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  font-weight: 800;
}

.techlog-list {
  display: grid;
  gap: 0.9rem;
}

.techlog-card {
  display: grid;
  gap: 0.95rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
}

.archived-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.archived-detail-grid div {
  display: grid;
  gap: 0.25rem;
}

.archived-detail-grid span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 900;
}

.archived-detail-grid strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.archived-upload-track {
  grid-column: 1 / -1;
}

.archived-upload-track strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.archived-upload-track b {
  color: rgba(255, 255, 255, 0.4);
}

.techlog-card-header,
.techlog-attachment-row,
.techlog-archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.techlog-card-header h3,
.techlog-card-section h4 {
  margin: 0;
  color: #fff;
}

.techlog-card-header small,
.techlog-empty-note,
.techlog-attachment-row em,
.techlog-archive-row em {
  color: rgba(255, 255, 255, 0.52);
}

.techlog-card-section {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.techlog-slot {
  display: grid;
  gap: 0.5rem;
}

.techlog-attachment-row,
.techlog-archive-row {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.22);
}

.techlog-attachment-row span,
.techlog-archive-row span {
  display: grid;
  gap: 0.2rem;
}

.techlog-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.techlog-row-actions .compact-action {
  min-height: 2.15rem;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
}

.techlog-upload-form,
.techlog-inline-form {
  display: grid;
  grid-template-columns: minmax(12rem, 0.5fr) minmax(12rem, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.techlog-json-view {
  max-height: 22rem;
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.72);
}

.team-share-code {
  display: block;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  overflow-wrap: anywhere;
}

.team-full-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0.6rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
}

.team-info-section {
  display: grid;
  align-content: start;
  gap: 0.72rem;
  padding: 1rem;
}

.team-info-section + .team-info-section {
  border-left: 1px dashed rgba(255, 255, 255, 0.28);
}

.team-info-section h3 {
  margin: 0 0 0.25rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
}

.team-info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.team-info-row span {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.team-info-row strong {
  color: #fff;
  text-align: right;
  overflow-wrap: anywhere;
}

.team-form {
  margin-top: 1rem;
}

.team-add-wizard {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.team-step-header {
  display: grid;
  gap: 0.7rem;
}

.team-step-header > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 900;
}

.team-progress {
  height: 0.42rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.team-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
}

.team-form-section {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.025);
}

.team-form-section h3 {
  margin: 0;
  color: #fff;
}

.team-form-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
}

.team-add-wizard label,
.team-add-wizard .fleet-form-grid label {
  display: grid;
  gap: 0.35rem;
}

.team-add-wizard span,
.team-add-wizard label > span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.team-add-wizard input,
.team-add-wizard select,
.team-add-wizard textarea,
.team-form textarea {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.8rem;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  padding: 0.65rem 0.75rem;
}

.team-add-wizard textarea,
.team-form textarea {
  min-height: 5.2rem;
  resize: vertical;
}

.team-form-wide {
  grid-column: 1 / -1;
}

.team-details-box {
  display: grid;
  gap: 0.8rem;
}

.team-details-box summary {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  cursor: pointer;
}

.team-details-box[open] summary {
  margin-bottom: 0.8rem;
}

.team-doc-folder-grid {
  display: grid;
  gap: 0.85rem;
}

.fleet-management-card {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.035);
}

.fleet-card-media {
  position: relative;
  display: grid;
  min-height: 16rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.05rem;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    #050505;
}

.fleet-card-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fleet-card-media::after {
  content: "NO PHOTO";
  color: rgba(255, 255, 255, 0.24);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.fleet-card-media:has(> img)::after {
  content: "";
}

.fleet-card-logo {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  display: grid;
  width: 5.4rem;
  height: 3.3rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.28);
}

.fleet-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.38rem;
}

.fleet-card-body {
  display: grid;
  align-content: space-between;
  gap: 1rem;
}

.fleet-card-body h3 {
  margin: 0.15rem 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.fleet-card-body small {
  color: rgba(255, 255, 255, 0.56);
}

.fleet-card-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.fleet-card-info span {
  display: grid;
  gap: 0.25rem;
  padding: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
}

.fleet-card-info em {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fleet-card-info strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.fleet-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.compact-action {
  padding: 0.72rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.compact-action:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

.muted-action {
  color: #fff;
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.32);
}

.muted-action:disabled {
  cursor: not-allowed;
}

.danger-action {
  border-color: rgba(248, 113, 113, 0.38);
  color: #fecaca;
}

.covered-action:disabled {
  position: relative;
  opacity: 0.42;
  filter: grayscale(0.8);
  cursor: not-allowed;
  pointer-events: none;
}

.covered-action:disabled::after {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0 4px, rgba(255, 255, 255, 0.06) 4px 8px);
  content: "";
}

.fleet-form {
  display: grid;
  gap: 1.2rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.035);
}

.fleet-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.fleet-form-header h2 {
  margin-top: 0.25rem;
}

.sub-tabs {
  margin-bottom: 1.2rem;
}

.fleet-progress {
  overflow: hidden;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.fleet-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.fleet-form-section {
  margin-bottom: 0.8rem;
}

.fleet-form-section h3 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1.25rem;
}

.fleet-form-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
}

.fleet-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.fleet-form label {
  display: grid;
  gap: 0.45rem;
}

.fleet-form label span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fleet-form input,
.fleet-form select {
  width: 100%;
  padding: 0.86rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}

.fleet-form input[type="file"] {
  min-height: 2.95rem;
}

.full-form-row {
  grid-column: 1 / -1;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fleet-doc-grid {
  display: grid;
  gap: 0.75rem;
}

.document-folder-grid {
  display: grid;
  gap: 1rem;
}

.document-folder-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.document-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.document-folder-header h3 {
  margin: 0;
  color: #fff;
}

.document-folder-header span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 900;
}

.fleet-doc-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
}

.fleet-doc-row strong {
  color: #fff;
  align-self: center;
}

.fleet-summary {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.fleet-summary strong {
  color: #fff;
}

.fleet-summary span {
  color: rgba(255, 255, 255, 0.78);
}

.fleet-photo-edit-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) 10rem;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.fleet-edit-logo {
  width: 10rem;
  height: 6rem;
  background: #fff;
}

.fleet-empty {
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 860px) {
  .aircraft-detail-grid,
  .detail-matrix,
  .mini-grid,
  .fleet-management-card,
  .fleet-card-info,
  .fleet-form-grid,
  .fleet-doc-row,
  .fleet-photo-edit-grid,
  .team-management-shell,
  .team-top-controls,
  .team-list-grid,
  .team-full-info-grid,
  .team-action-grid,
  .team-comp-grid,
  .team-file-actions,
  .crew-document-form-grid,
  .account-users-hero,
  .account-hero-actions,
  .account-filter-row,
  .account-user-main,
  .account-access-line,
  .account-form-grid,
  .account-form-actions,
  .account-add-grid,
  .account-permission-grid,
  .account-checkbox-grid,
  .techlog-filters,
  .techlog-focus-bar,
  .archived-detail-grid,
  .techlog-card-header,
  .techlog-attachment-row,
  .techlog-archive-row,
  .techlog-upload-form,
  .techlog-inline-form,
  .team-form-wide {
    grid-template-columns: 1fr;
  }

  .team-form-wide {
    grid-column: auto;
  }

  .team-info-section + .team-info-section {
    border-left: 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.28);
  }

  .modal-header {
    display: grid;
  }
}

.aircraft-doc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 0.5rem;
}

.aircraft-doc-row.attention {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
}

.aircraft-doc-row-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.aircraft-doc-row-info strong {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aircraft-doc-row-info span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.aircraft-doc-row-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-self: end;
}

.doc-mini-btn {
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  line-height: 1.1;
  min-width: 0;
}

.aircraft-doc-row-form {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.doc-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.doc-preview-modal {
  width: min(1100px, 96vw);
  height: min(90vh, 900px);
  background: #0f1116;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.doc-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.doc-preview-title {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-preview-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #1a1c22;
  overflow: auto;
}

.doc-preview-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.metric-clickable {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.dashboard-action-modal .doc-preview-body {
  display: block;
  padding: 1rem 1.25rem;
  background: #0f1116;
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-doc-list,
.dashboard-defect-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dashboard-doc-groups {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.dashboard-doc-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-doc-section-header:first-child {
  margin-top: 0;
}

.dashboard-doc-section-header h2 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-doc-section-header span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.dashboard-doc-group-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-doc-group-title span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.documents-select-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 2rem;
}

.documents-select-prompt-inner {
  max-width: 460px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.documents-select-prompt-inner .eyebrow {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.documents-select-prompt-inner h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
}

.documents-select-prompt-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.55;
}

.documents-select-prompt-inner .compact-action {
  margin-top: 0.8rem;
}

.dashboard-doc-row,
.dashboard-defect-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-doc-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-doc-row.editing {
  border-color: rgba(74, 158, 255, 0.4);
  background: rgba(74, 158, 255, 0.06);
}

.dashboard-doc-edit-form {
  margin-top: 0.35rem;
}

.account-access-summary-count,
.account-aircraft-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.account-access-summary-count {
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0.2rem 0.35rem;
}

.account-aircraft-chip:hover:not(:disabled),
.account-access-summary-count:hover:not(:disabled) {
  background: rgba(74, 158, 255, 0.14);
  border-color: rgba(74, 158, 255, 0.5);
}

.account-aircraft-chip:disabled,
.account-access-summary-count:disabled {
  cursor: default;
  opacity: 0.75;
}

.account-aircraft-chip-empty {
  border-style: dashed;
  opacity: 0.75;
}

.account-sidebar-perm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  margin-left: 0.25rem;
  transition: background 120ms ease, border-color 120ms ease;
}

.account-sidebar-perm-button:hover {
  background: rgba(74, 158, 255, 0.14);
  border-color: rgba(74, 158, 255, 0.5);
}

.admin-quick-modal {
  width: min(460px, 92vw);
  height: auto;
  max-height: min(80vh, 640px);
}

.admin-quick-modal-body {
  display: block;
  flex: 0 1 auto;
  padding: 0.85rem 1rem;
  overflow-y: auto;
  background: #0f1116;
}

.admin-quick-modal-caption {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 0.75rem;
}

.admin-quick-modal-chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: none;
  padding: 0.5rem;
}

.admin-quick-modal-chip-picker .account-chip {
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
}

.admin-quick-modal-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.6rem;
}

.admin-edit-user-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 0.75rem;
}

.admin-edit-user-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}

.admin-edit-user-field-full {
  grid-column: 1 / -1;
}

.admin-edit-user-field input,
.admin-edit-user-field select {
  background: rgba(11, 15, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
}

.admin-edit-user-field input:focus,
.admin-edit-user-field select:focus {
  outline: none;
  border-color: rgba(88, 155, 255, 0.6);
  background: rgba(11, 15, 22, 1);
}

.admin-quick-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.6rem 1rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.crew-folder-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  padding-top: 1.4rem;
}

.crew-folder-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.crew-folder-checkbox span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

[data-doc-type-custom][hidden],
[data-validity-custom][hidden] {
  display: none !important;
}

.dashboard-defect-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.dashboard-doc-row.warning {
  border-color: rgba(248, 178, 96, 0.55);
  background: rgba(248, 178, 96, 0.12);
}

.dashboard-doc-row.expired {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.14);
}

.dashboard-doc-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}

.dashboard-doc-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-doc-tab.active {
  background: rgba(74, 158, 255, 0.15);
  border-color: rgba(74, 158, 255, 0.55);
  color: #fff;
}

.dashboard-doc-tab span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
}

.dashboard-doc-tab.active span {
  color: #fff;
  background: rgba(74, 158, 255, 0.35);
}

.dashboard-doc-info,
.dashboard-defect-row {
  min-width: 0;
}

.dashboard-doc-info strong,
.dashboard-defect-row strong {
  display: block;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.dashboard-doc-info span,
.dashboard-defect-row span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.dashboard-doc-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dashboard-modal-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.doc-preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
}

.doc-preview-status {
  color: rgba(255, 255, 255, 0.65);
  padding: 1.25rem;
  text-align: center;
  margin: auto;
}
.doc-preview-status.error { color: rgba(248, 113, 113, 0.9); }

body.doc-preview-open { overflow: hidden; }

.crew-file-subgroups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.crew-file-subgroup {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.025);
}

.crew-file-subgroup > .crew-document-form,
.crew-file-subgroup > .add-document-action {
  margin-top: 0.75rem;
}

.crew-file-subgroup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.crew-file-subgroup-header h4 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.crew-file-subgroup-header span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.crew-file-empty {
  margin: 0;
  padding: 0.35rem 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
  font-style: italic;
}

.document-folder-card--button {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.document-folder-card--button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* ==================== Loading Indicator ==================== */
.data-loading {
  display: inline-flex;
  align-items: baseline;
  color: inherit;
  font-size: inherit;
  letter-spacing: 0.02em;
}

.data-loading::after {
  content: "";
  display: inline-block;
  width: 1.4em;
  text-align: left;
  animation: loadingDots 1.4s steps(4, end) infinite;
}

@keyframes loadingDots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: ""; }
}

.data-loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

/* ==================== Report Tables (fuel/crew/record/template) ==================== */
.report-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.6rem;
  background: rgba(11, 15, 22, 0.5);
  margin-top: 0.75rem;
}

/* ==================== FRAT Report ==================== */
.frat-report-table {
  min-width: 1800px;
}
.frat-report-table td,
.frat-report-table th {
  padding: 0.6rem 0.85rem;
  vertical-align: middle;
}
.frat-report-table td.frat-ref {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
}
.frat-report-table td.frat-cell-multiline {
  white-space: normal;
  max-width: 260px;
  min-width: 180px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.75);
}
.frat-risk-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}
.frat-risk-badge.risk-good {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
}
.frat-risk-badge.risk-mitigation {
  background: rgba(202, 138, 4, 0.18);
  color: #fde68a;
  border-color: rgba(202, 138, 4, 0.4);
}
.frat-risk-badge.risk-approval {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
}
.frat-risk-badge.risk-nogo {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.5);
}
.frat-edit {
  width: 100%;
  min-width: 130px;
  padding: 0.4rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 28, 0.9);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.frat-edit:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.frat-edit:focus {
  outline: none;
  border-color: rgba(120, 170, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(120, 170, 255, 0.18);
}
.frat-edit-select {
  min-width: 92px;
  cursor: pointer;
}

.record-control-summary {
  margin-bottom: 0.75rem;
}

.record-control-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.record-control-badge-regression {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.record-control-badge-mismatch {
  background: rgba(202, 138, 4, 0.2);
  color: #fde68a;
  border: 1px solid rgba(202, 138, 4, 0.4);
}

.record-control-row-regression td {
  color: #fecaca;
}

.record-control-row-mismatch td {
  color: #fef3c7;
}

.record-control-aircraft-list {
  list-style: none;
  padding: 0.35rem 0 0;
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.78rem;
}

.record-control-aircraft-list li {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.record-control-format-badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  font-size: 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  font-family: inherit;
}
button.record-control-format-badge { cursor: pointer; }
button.record-control-format-badge:hover { filter: brightness(1.15); }
.record-control-format-badge.overridden { box-shadow: 0 0 0 1px currentColor inset; }

.record-control-format-hhmm {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
}

.record-control-format-decimal {
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
}

.record-control-aircraft-status.ok { color: #6ee7b7; }
.record-control-aircraft-status.bad { color: #fca5a5; }
.record-control-aircraft-status.muted { color: rgba(255, 255, 255, 0.4); }

.admin-message-error {
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.08);
}

.template-control-section {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  background: rgba(11, 15, 22, 0.35);
}

.template-control-section + .template-control-section {
  margin-top: 1rem;
}

.template-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.template-control-header h3 {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

.template-upload-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.template-upload-form input[name="template_type"] {
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  min-width: 180px;
}

.template-control-table td.template-actions-cell,
.template-control-table th.template-actions-col {
  white-space: nowrap;
}

.template-actions-cell {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.account-aircraft-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 1rem 0.5rem;
}

.template-global-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.template-global-card {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
}
.template-global-card h4 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.template-global-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.template-global-card-header h4 { margin: 0; }
.template-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.22);
}
.template-row + .template-row { margin-top: 0.4rem; }
.template-row-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}
.template-row-info strong {
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-row-info span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}
.template-row-actions {
  display: inline-flex;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.template-aircraft-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}
.template-aircraft-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.4rem 0.9rem;
}
.template-aircraft-card > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  list-style: none;
}
.template-aircraft-card > summary::-webkit-details-marker { display: none; }
.template-aircraft-name {
  font-weight: 600;
  color: #fff;
}
.template-aircraft-meta {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}
.template-aircraft-body {
  padding: 0.6rem 0 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.template-aircraft-block h5 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}
.template-folder-group + .template-folder-group { margin-top: 0.8rem; }
.template-folder-name {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.template-folder-name span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
}

.template-global-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  cursor: pointer;
}
.template-global-block {
  margin: 0.6rem 0 1rem;
}

/* Company Documents — scope + visibility */
.company-docs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.company-docs-toolbar h3 {
  margin: 0.15rem 0 0;
}
.folder-hidden-hint {
  display: block;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}
.company-folder-scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0;
  font-size: 0.76rem;
}
.company-folder-scope-label,
.company-folder-scope-users {
  color: rgba(255, 255, 255, 0.6);
}
.company-folder-aircraft {
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 999px;
  background: rgba(74, 158, 255, 0.1);
  color: #dbeafe;
  overflow-wrap: anywhere;
}
.scope-user-picker select {
  color-scheme: dark;
}
.scope-selected-users {
  max-height: 10rem;
  overflow-y: auto;
}
.scope-selected-users .user-pill {
  max-width: 100%;
}
.scope-selected-users .user-pill > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.scope-selected-users .user-pill-remove {
  flex-shrink: 0;
}
.document-folder-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.document-folder-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.visibility-domain {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}
.visibility-scoped {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}
.visibility-no-scope {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
}
.visibility-required {
  background: rgba(234, 179, 8, 0.16);
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.4);
}
.doc-required { color: #fde68a; font-weight: 700; }
.doc-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255,255,255,0.5);
  cursor: help;
}
.document-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.document-row-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}
.document-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.company-create-panel {
  margin: 0 0 1rem;
  padding: 1.1rem 1.25rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.company-create-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.company-create-header .eyebrow { margin: 0; }
.company-create-header h3 { margin: 0.2rem 0 0; font-size: 1.05rem; }
.company-create-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
}
.company-create-field input {
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font: inherit;
}
.company-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.company-create-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.75rem;
}
@media (max-width: 720px) { .company-create-grid { grid-template-columns: 1fr; } }
.company-create-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
  padding: 0.65rem 0.8rem 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.company-create-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.company-create-section-header h4 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.company-create-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(74, 158, 255, 0.14);
  border: 1px solid rgba(74, 158, 255, 0.35);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
}
.scope-chip-list-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.company-create-user-search {
  padding: 0.4rem 0.6rem;
  border-radius: 0.45rem 0.45rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  width: 100%;
  box-sizing: border-box;
}
.user-picker {
  display: flex;
  flex-direction: column;
}
.user-picker-dropdown {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 0 0.45rem 0.45rem;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}
.user-picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.user-picker-option:last-child { border-bottom: 0; }
.user-picker-option:hover { background: rgba(74, 158, 255, 0.1); color: #fff; }
.user-picker-option.on {
  background: rgba(74, 158, 255, 0.14);
  color: #fff;
}
.user-picker-check { color: #93c5fd; font-weight: 800; }
.user-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.35rem 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(74, 158, 255, 0.14);
  border: 1px solid rgba(74, 158, 255, 0.35);
  color: #dbeafe;
  font-size: 0.78rem;
}
.user-pill-remove {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.25rem;
  border-radius: 999px;
}
.user-pill-remove:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.company-create-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.company-create-footer .scope-preview {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}
.company-create-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal-close-button {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
  border-radius: 0.4rem;
}
.modal-close-button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.cta-button.compact {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 999px;
  min-width: auto;
  width: auto;
}

/* Dim every destructive/delete action when the current user has no edit
   permission. Backend still enforces this; this is a UX hint so users do not
   click buttons that will just return 403. */
body.no-edit-user .danger-action,
body.no-edit-user [data-company-delete-folder],
body.no-edit-user [data-company-delete-doc],
body.no-edit-user [data-admin-delete-user],
body.no-edit-user [data-delete-crew],
body.no-edit-user [data-delete-techlog-attachment],
body.no-edit-user [data-delete-archived-techlog],
body.no-edit-user [data-delete-aircraft-document],
body.no-edit-user [data-delete-document-template] {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(70%);
}

.report-distance-cell { text-align: right; font-variant-numeric: tabular-nums; }
.report-distance-disclaimer {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-style: italic;
  margin-top: 0.75rem;
}

.admin-edit-user-resend-row {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.admin-edit-user-resend-row small { opacity: 0.7; }
.admin-edit-user-resend-row code {
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.read-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.read-status-grid .eyebrow {
  margin: 0 0 0.35rem 0;
}
.read-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.read-status-list li {
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.read-status-list li:last-child { border-bottom: none; }
.read-status-list small { opacity: 0.6; font-variant-numeric: tabular-nums; }

.scope-fieldset {
  margin: 0;
  padding: 0.6rem 0.75rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
}
.scope-fieldset[disabled] {
  opacity: 0.45;
  pointer-events: none;
}
.scope-fieldset legend {
  padding: 0 0.35rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.scope-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  user-select: none;
}
.scope-chip input {
  display: none;
}
.scope-chip.on {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.55);
  color: #dbeafe;
}
.scope-empty {
  margin: 0.2rem 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}
.scope-preview {
  margin: 0.1rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}
.scope-modal-backdrop {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  box-sizing: border-box;
  background: transparent;
  color: inherit;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.scope-modal-backdrop[open] {
  display: flex;
}
.scope-modal-backdrop::backdrop {
  background: rgba(0, 0, 0, 0.72);
}
.scope-modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.1rem 1.25rem 1.25rem;
  border-radius: 1rem;
  background: rgba(15, 15, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.scope-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.scope-modal-header .eyebrow { margin: 0; }
.scope-modal-header h2 { margin: 0.2rem 0 0; font-size: 1.15rem; }
.scope-modal-check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  cursor: pointer;
}
.scope-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.template-edit-form {
  margin: 0.25rem 0 0.75rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.template-edit-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}
.template-edit-actions {
  display: flex;
  gap: 0.4rem;
}

.maintenance-empty-prompt {
  padding: 2.25rem 1.5rem;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.015);
  margin-top: 1rem;
}
.maintenance-empty-prompt h3 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.1rem;
}
.maintenance-empty-prompt p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

/* Force English "DD MMM YYYY" display for every date field.
   The native input stays for form submission + picker access. */
.date-field {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  width: 100%;
  gap: 0.35rem;
}
.date-field-text {
  flex: 1 1 auto;
  min-width: 0;
}
.date-field > input.date-field-native {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
}
.date-field-toggle {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 0.4rem;
  padding: 0 0.55rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.date-field-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Checkbox grid — force each item onto its own cell with checkbox pinned left
   so long labels wrap under the label text, not next to the following item. */
.account-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem 1rem;
  align-items: start;
}
/* Notification-type picker: force exactly two columns (left/right). */
.account-checkbox-grid[data-notif-type-group] {
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 2rem;
}
.account-checkbox-grid > label,
.account-checkbox-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  line-height: 1.3;
  min-width: 0;
}
.account-checkbox-grid > label > input[type="checkbox"],
.account-checkbox-item > input[type="checkbox"] {
  margin: 0.2rem 0 0 0;
  justify-self: start;
}
.account-checkbox-grid > label > span,
.account-checkbox-item > span {
  min-width: 0;
  word-break: break-word;
}
