:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #637083;
  --line: #dce3e8;
  --brand: #116466;
  --brand-2: #d65a31;
  --ok: #18865a;
  --warn: #b7791f;
  --bad: #b42318;
  --shadow: 0 12px 30px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  background: #020d18;
}

.login::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/ate-flight-ops-hero.png?v=20260531c") center / contain no-repeat;
}

.login::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(2, 13, 24, 0) 48%, rgba(2, 13, 24, 0.18) 73%, rgba(2, 13, 24, 0.58) 100%),
    linear-gradient(90deg, #020d18 0%, rgba(2, 13, 24, 0.48) 5%, rgba(2, 13, 24, 0) 15%, rgba(2, 13, 24, 0) 85%, rgba(2, 13, 24, 0.48) 95%, #020d18 100%),
    linear-gradient(180deg, #020d18 0%, rgba(2, 13, 24, 0.18) 9%, rgba(2, 13, 24, 0) 21%, rgba(2, 13, 24, 0) 77%, rgba(2, 13, 24, 0.52) 100%);
}

.login-panel {
  position: absolute;
  z-index: 2;
  right: clamp(72px, 8vw, 150px);
  bottom: clamp(104px, 15vh, 150px);
  width: min(360px, calc(100vw - 36px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(5, 20, 32, 0.78);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.login.login-open .login-panel {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.login-form .field span {
  color: rgba(255, 255, 255, 0.84);
}

.login-form input {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.92);
}

.login-launch {
  position: absolute;
  z-index: 2;
  right: clamp(72px, 8vw, 150px);
  bottom: clamp(34px, 7vh, 62px);
  min-width: 156px;
  padding: 16px 30px;
  border-radius: 8px;
  background: #e31e24;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.login-launch:hover {
  background: #ff2a31;
}

.login-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.login-form {
  padding-top: 28px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 82px;
  resize: both;
  white-space: pre-wrap;
}

.primary {
  background: var(--brand);
  color: white;
  padding: 11px 15px;
  border-radius: 6px;
  font-weight: 700;
}

.secondary {
  background: #e9eff1;
  color: var(--ink);
  padding: 10px 13px;
  border-radius: 6px;
  font-weight: 700;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.danger {
  background: #fee4e2;
  color: var(--bad);
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 700;
}

.demo-list {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  font-size: 13px;
}

.demo-list button {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  padding: 8px 10px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 218px 1fr;
}

.sidebar {
  background: #15242d;
  color: white;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  padding: 6px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-logo {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav button {
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border-radius: 6px;
  padding: 10px;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav .nav-logout {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 6px 6px;
  color: #fecaca;
}

.nav .nav-logout:hover {
  background: rgba(180, 35, 24, 0.22);
  color: #ffffff;
}

.userbox {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.userbox strong {
  color: #ffffff;
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 25px;
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--ok);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 14px;
}

.panel {
  overflow: hidden;
}

.flight-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 44px);
}

.flight-scroll-area {
  min-height: 0;
  overflow: auto;
}

.panel-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar.compact {
  gap: 5px;
}

.toolbar.compact .secondary {
  padding: 6px 8px;
  font-size: 12px;
}

.toolbar.micro {
  gap: 3px;
}

.toolbar.micro .secondary,
.toolbar.micro .danger,
.mini {
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.1;
}

.content {
  min-height: 0;
  padding: 14px 16px;
  overflow: auto;
}

.modal-box > .content {
  flex: 0 1 auto;
}

.modal-box > .content:last-of-type {
  flex: 1 1 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  background: #e9eff1;
}

.status.Scheduled,
.status.Available,
.status.Valid,
.status.Confirmed,
.status.Potvrdene,
.status.Requested {
  color: var(--ok);
  background: #dcfce7;
}

.status.Maintenance,
.status.Open,
.status.Draft,
.status.Opcia,
.status.In {
  color: var(--warn);
  background: #fef3c7;
}

.status.Cancelled,
.status.Zrusene,
.status.Expired,
.status.Issue {
  color: var(--bad);
  background: #fee4e2;
}

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

.card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-size: 16px;
}

.muted {
  color: var(--muted);
}

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

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(23, 32, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-box {
  width: min(760px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.modal-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.modal-box .panel-head {
  flex: 0 0 auto;
}

.modal-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #e9eff1;
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
}

.icon-close:hover {
  background: #fee4e2;
  color: var(--bad);
}

.ops-modal {
  width: min(760px, 100%);
}

.ops-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.ops-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ops-section h3 {
  margin: 0;
  padding: 7px 9px;
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.ops-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 132px minmax(190px, 1.15fr);
  gap: 7px;
  align-items: start;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.ops-row.checklist-untouched,
.checklist-status.checklist-untouched {
  background: #fee2e2;
  color: #7f1d1d;
}

.ops-row.checklist-requested,
.checklist-status.checklist-requested {
  background: #fed7aa;
  color: #7c2d12;
}

.ops-row.checklist-in-progress,
.checklist-status.checklist-in-progress {
  background: repeating-linear-gradient(
    -45deg,
    #dcfce7 0,
    #dcfce7 8px,
    #ffffff 8px,
    #ffffff 16px
  );
  color: #14532d;
}

.ops-row.checklist-confirmed,
.checklist-status.checklist-confirmed {
  background: #86efac;
  color: #14532d;
}

.ops-row.checklist-not-applicable,
.checklist-status.checklist-not-applicable {
  background: #e5e7eb;
  color: #374151;
}

.ops-row.checklist-issue,
.checklist-status.checklist-issue {
  background: #7f1d1d;
  color: #ffffff;
}

.flight-table {
  font-size: 13px;
}

.flight-table th,
.flight-table td {
  padding: 9px 7px;
}

.flight-ident {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.ack-button {
  padding: 4px 6px;
  border-radius: 5px;
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.ack-button.ack-new {
  background: #b42318;
}

.ack-button.ack-partial {
  background: #c2410c;
}

.ack-button.ack-done {
  background: #14532d;
}

.update-button {
  padding: 4px 7px;
  border-radius: 5px;
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.update-button.update-pending {
  background: #dc2626;
  animation: updatePulse 1s ease-in-out infinite;
}

.update-button.update-waiting {
  background: #c2410c;
  animation: none;
}

.update-button.update-done {
  background: #14532d;
  animation: none;
}

.update-hover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.update-hover-panel {
  position: fixed;
  z-index: 2000;
  display: block;
  pointer-events: none;
  width: min(680px, 82vw);
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  white-space: normal;
}

.update-hover-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.update-hover-panel th,
.update-hover-panel td {
  padding: 8px 9px;
  border: 1px solid #dbe3ea;
  text-align: left;
  vertical-align: top;
}

.update-hover-panel th {
  background: #edf2f5;
  color: #344256;
  font-size: 11px;
  text-transform: uppercase;
}

.update-hover-panel td strong,
.update-hover-panel td span {
  display: block;
}

.update-hover-panel .ok-text {
  color: #166534;
  font-weight: 800;
}

.compact-select {
  width: auto;
  min-width: 96px;
  padding: 10px 12px;
}

.new-button {
  padding: 4px 7px;
  border-radius: 5px;
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  animation: none;
}

.new-button.new-new {
  background: #dc2626;
  animation: updatePulse 1s ease-in-out infinite;
}

.new-button.new-partial {
  background: #c2410c;
}

.new-button.new-done {
  background: #14532d;
}

@keyframes updatePulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
  }
}

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

.update-notice {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.update-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
}

.update-table {
  margin: 0;
}

.update-table th,
.update-table td {
  font-size: 12px;
  vertical-align: top;
}

.new-flight-modal {
  width: min(1360px, calc(100vw - 10px));
  max-width: none;
}

.new-flight-modal .update-list {
  overflow-x: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.new-flight-table {
  table-layout: auto;
  width: max-content;
  min-width: 1180px;
  font-size: 12px;
}

.new-flight-table th,
.new-flight-table td {
  white-space: nowrap !important;
  vertical-align: middle;
  padding: 9px 10px;
  line-height: 1.15;
}

.new-flight-table .nowrap-cell {
  white-space: nowrap !important;
  word-break: keep-all;
}

.new-flight-table th:nth-child(1),
.new-flight-table td:nth-child(1) {
  width: 70px;
}

.new-flight-table th:nth-child(2),
.new-flight-table td:nth-child(2) {
  width: 98px;
}

.new-flight-table th:nth-child(3),
.new-flight-table td:nth-child(3) {
  width: 95px;
}

.new-flight-table th:nth-child(4),
.new-flight-table td:nth-child(4) {
  width: 125px;
}

.new-flight-table th:nth-child(5),
.new-flight-table td:nth-child(5) {
  width: 72px;
}

.new-flight-table th:nth-child(6),
.new-flight-table td:nth-child(6) {
  width: 58px;
}

.new-flight-table th:nth-child(7),
.new-flight-table td:nth-child(7) {
  width: 195px;
}

.new-flight-table th:nth-child(8),
.new-flight-table td:nth-child(8) {
  width: 220px;
}

.deleted-program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
}

.modal-x {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 900;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 36px));
}

.toast {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.toast strong {
  font-size: 14px;
}

.toast span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.flight-row.flight-confirmed {
  background: #dcfce7;
}

.flight-row.flight-option {
  background: #ffffff;
}

.flight-row.flight-cancelled {
  background: #fee2e2;
}

.flight-row.flight-pending-cancellation {
  background: #fff1f2;
  color: #7f1d1d;
}

.flight-row.flight-pending-cancellation td:not(:last-child) {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(127, 29, 29, 0.62);
}

.flight-row.flight-pending-cancellation td:last-child,
.flight-row.flight-pending-cancellation td:first-child {
  text-decoration: none;
}

.flight-row.flight-day-separator td {
  border-top: 3px solid #94a3b8;
}

.flight-row td {
  background: transparent;
}

.bulkbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  background: #f8fafb;
}

.bulkbar > * {
  flex: 0 0 auto;
}

.bulkbar strong {
  white-space: nowrap;
}

.bulkbar .secondary,
.bulkbar .danger,
.bulkbar .link-button {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 13px;
  line-height: 1;
}

.bulk-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.flight-filterbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.flight-filterbar label {
  display: grid;
  gap: 4px;
}

.flight-filterbar label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flight-filterbar input {
  width: 150px;
  padding: 7px 9px;
}

.bulkbar select {
  width: auto;
  min-width: 116px;
  height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

.user-table code {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}

.admin-users-view {
  display: grid;
  gap: 14px;
}

.session-table td {
  vertical-align: middle;
}

.online-state {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 99px;
  background: #94a3b8;
  vertical-align: middle;
}

.online-state.online {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.online-state.idle {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 44px;
  font-weight: 700;
  color: var(--muted);
}

.check-field input {
  width: auto;
}

.airport-directory .panel-head .muted {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.airport-search {
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.airport-search input {
  max-width: 520px;
}

.country-list {
  display: grid;
  gap: 8px;
}

.country-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.country-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #f8fafb;
}

.country-panel summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.airport-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.airport-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}

.airport-row:hover {
  background: #f0f7f7;
}

.airport-row:last-child {
  border-bottom: 0;
}

.airport-button {
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  font-size: 12px;
  text-decoration: underline;
}

.airport-button.airport-discontinuity {
  padding: 3px 6px;
  border-radius: 5px;
  background: #fee2e2;
  color: #b42318;
  text-decoration: underline;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.28);
}

.airport-button.airport-readonly {
  display: inline-block;
  cursor: default;
}

.update-request-flights {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.update-request-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.update-request-flight-group {
  display: grid;
  gap: 3px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.compact-check {
  min-height: 30px;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.pax-button,
.pax-badge {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pax-button.complete,
.pax-badge.complete,
.passenger-row.complete {
  background: #dcfce7;
  color: var(--ok);
}

.pax-button.missing,
.pax-badge.missing,
.passenger-row.missing {
  background: #fee4e2;
  color: var(--bad);
}

.handling-modal {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}

.handling-modal .panel-head {
  flex: 0 0 auto;
}

.handling-modal .content {
  overflow: visible;
}

.handling-modal .content.form-grid {
  flex: 1 1 auto;
  overflow: auto;
  padding-bottom: 18px;
}

.handling-modal .field textarea {
  min-height: 72px;
}

.handling-selector {
  display: grid;
  gap: 8px;
}

.hidden {
  display: none !important;
}

.external-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 7px;
  background: #eef3f6;
  color: var(--brand-2);
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
}

.external-link:hover {
  background: #dfe9ee;
}

.request-modal {
  width: min(840px, 100%);
}

.request-preview-wrap {
  background: #f8fafb;
}

.request-attachment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.request-attach-check {
  margin: 0;
  min-height: 36px;
  color: var(--ink);
}

.attachment-link {
  padding: 9px 12px;
}

.request-preview-text {
  min-height: min(560px, 62vh);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-family: "Courier New", Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre;
}

.request-preview-rich {
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.request-red {
  color: #dc2626;
  font-weight: 900;
}

.pax-modal {
  width: min(1180px, 100%);
}

.pax-import {
  display: grid;
  gap: 10px;
}

.pax-import textarea {
  min-height: 92px;
}

.pax-copy {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.pax-copy select {
  padding: 8px 10px;
}

.pax-table-wrap {
  overflow: auto;
}

.pax-table {
  min-width: 1080px;
  font-size: 12px;
}

.pax-table th,
.pax-table td {
  padding: 6px;
}

.pax-table input {
  padding: 6px 7px;
  min-width: 96px;
  border-radius: 5px;
  font-size: 12px;
}

.pax-table input[name^="docNo"] {
  min-width: 122px;
}

.docgen-panel {
  height: calc(100vh - 92px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.docgen-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.ops-row:last-child {
  border-bottom: 0;
}

.ops-row input,
.ops-row select,
.ops-row textarea {
  padding: 6px 7px;
  border-radius: 5px;
  font-size: 12px;
}

.checklist-note {
  min-height: 40px;
  resize: both;
  line-height: 1.35;
}

.pre-wrap {
  white-space: pre-wrap;
}

.checklist-inline-action {
  margin-left: 8px;
  vertical-align: middle;
}

.empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.empty.compact {
  padding: 16px;
  text-align: left;
}

.error {
  color: var(--bad);
  min-height: 20px;
  font-size: 13px;
}

.notice {
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: var(--ok);
  padding: 10px 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .app,
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 560px) {
  .main {
    padding: 20px;
  }

  .login-panel {
    right: 14px;
    bottom: 82px;
    width: calc(100vw - 28px);
  }

  .login-launch {
    right: 14px;
    bottom: 22px;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  table {
    display: block;
    overflow-x: auto;
  }

  .new-flight-table {
    display: table;
  }

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