body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f2f4f7;
  color: #111827;
}

.hidden { display: none !important; }



/* Premium login page */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.14), transparent 24%),
    linear-gradient(135deg, #eef2ff 0%, #eff6ff 42%, #f8fafc 100%);
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.login-side {
  color: #0f172a;
  padding: 34px 18px 34px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-side h1 {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #081f4d;
}

.login-subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #475569;
  max-width: 560px;
}

.login-brand-badge,
.login-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.login-brand-badge {
  margin-bottom: 16px;
  padding: 8px 14px;
  background: rgba(11, 92, 173, 0.08);
  color: #0b5cad;
  border: 1px solid rgba(11, 92, 173, 0.15);
  font-size: 12px;
}

.login-mini-badge {
  padding: 6px 11px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  margin-bottom: 14px;
}

.login-highlights {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.login-highlight {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.login-highlight strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 3px;
}

.login-highlight small {
  display: block;
  color: #64748b;
  line-height: 1.5;
  font-size: 12px;
}

.login-highlight-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0b5cad, #0a4a89);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(11, 92, 173, 0.28);
}

.premium-login-card {
  width: 100%;
  max-width: 470px;
  justify-self: end;
  border-radius: 26px;
  padding: 26px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 26px 60px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
}

.login-card-head {
  margin-bottom: 14px;
}

.login-card-title-wrap h2 {
  margin: 0 0 8px;
  font-size: 33px;
  line-height: 1.1;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.login-card-title-wrap p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #64748b;
}

.login-form {
  margin-top: 18px;
}

.login-card label {
  margin-top: 14px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.login-card input {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 14px;
  font-family: Arial, sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-card input:focus {
  outline: none;
  border-color: #60a5fa;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.login-primary-btn {
  margin-top: 18px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1567ba, #0b5cad);
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 30px rgba(11, 92, 173, 0.25);
}

.login-primary-btn:hover {
  filter: none;
  background: linear-gradient(180deg, #0f5cab, #094986);
}

.login-footer-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.login-card .status {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .login-side {
    padding: 8px 4px 0;
  }

  .premium-login-card {
    justify-self: center;
    max-width: 540px;
  }
}

@media (max-width: 640px) {
  .login-view {
    padding: 16px;
  }

  .login-side h1 {
    font-size: 34px;
  }

  .premium-login-card {
    padding: 20px;
    border-radius: 22px;
  }

  .login-card-title-wrap h2 {
    font-size: 28px;
  }

  .login-highlight {
    grid-template-columns: 34px 1fr;
    padding: 13px;
  }

  .login-highlight-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 14px;
  }
}

label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin: 8px 0 4px;
}

input, textarea, select, button {
  box-sizing: border-box;
  width: 100%;
  font-size: 12px;
  padding: 7px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-family: Consolas, "Courier New", monospace;
  background: #fff;
}

textarea { resize: vertical; }

button {
  background: #0b5cad;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 800;
}

button:hover { filter: brightness(.92); }

.secondary { background: #64748b; width: auto; }

.danger { background: #b00020; }

.status {
  margin-top: 10px;
  color: #b00020;
  font-size: 12px;
}

.topbar {
  height: 44px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid #d7dee9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.pill {
  background: #e2e8f0;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.link-pill.linked {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.link-pill.not-linked {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.nav-pill.running {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.nav-pill.stopped {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.nav-pill.done {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.pnr-pill {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(350px, 35fr) minmax(280px, 20fr);
  gap: 8px;
  height: calc(100vh - 60px);
  padding: 8px;
}

.section {
  background: #fff;
  border: 1px solid #d7dee9;
  border-radius: 12px;
  overflow: hidden;
  padding: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.section-header {
  font-size: 13px;
  font-weight: 900;
  color: #0b5cad;
  margin: -8px -8px 8px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-bottom: 1px solid #e5e7eb;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-btn {
  width: auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.terminal-column,
.fare-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#output {
  flex: 1;
  resize: none;
  background: #000000;
  color: #00ff00;
  border-color: #003d00;
  border-radius: 8px 8px 0 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.35;
  min-height: 0;
}

.terminal-input-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  background: #000000;
  color: #00ff00;
  border: 1px solid #003d00;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  align-items: center;
}

.terminal-input-row span {
  text-align: center;
  font-weight: 900;
}

#generalCommand {
  background: #000000;
  color: #00ff00;
  border: 0;
  outline: 0;
  font-size: 14px;
}

#generalCommand::placeholder {
  color: #70c970;
}

.terminal-hint {
  margin-top: 5px;
  font-size: 11px;
  color: #64748b;
}

.fare-toolbar {
  display: grid;
  grid-template-columns: 1fr 130px 140px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.fare-filter {
  height: 30px;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

#fareSummaryMeta {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fare-cards {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}

.fare-cards.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-align: center;
}

.fare-card,
.tn-card {
  border: 1px solid #d7dee9;
  border-radius: 12px;
  margin-bottom: 8px;
  padding: 9px 10px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .04);
}

.fare-card-head,
.tn-card-head {
  display: grid;
  grid-template-columns: 1fr 30px auto;
  gap: 6px;
  align-items: start;
}

.fare-route,
.tn-route {
  font-weight: 900;
  font-size: 13px;
}

.fare-price {
  color: #2563eb;
  font-weight: 900;
  font-size: 14px;
  text-align: right;
}

.fare-subprice {
  color: #64748b;
  font-size: 10px;
  text-align: right;
  line-height: 1.25;
}

.fare-cashback {
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.fare-copy-btn {
  height: 29px;
  padding: 0;
  background: #f8fbff;
  color: #2563eb;
  border: 2px solid #9dbbf7;
}

.fare-line,
.tn-line {
  display: grid;
  grid-template-columns: 76px 52px max-content 1fr;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed #d5dfec;
  font-size: 11px;
}

.fare-line:last-child,
.tn-line:last-child {
  border-bottom: 0;
}

.fare-sector,
.tn-sector {
  font-weight: 900;
}

.fare-footer {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #d7dee9;
  display: grid;
  grid-template-columns: 1fr 1fr 82px;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}

.fare-detail-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #475569;
  margin: 6px 0;
}

.badge {
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 3px 7px;
  font-weight: 800;
}

.tn-card {
  border-left: 4px solid #0b5cad;
}

.tn-meta {
  color: #475569;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 5px;
}

.tn-duration {
  color: #2563eb;
  font-weight: 900;
  text-align: right;
}

.tn-via {
  color: #0f766e;
  font-weight: 800;
  font-size: 11px;
  text-align: right;
}

.side-column {
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.side-column .section {
  margin-bottom: 8px;
}

.availability-section {
  max-height: calc(100vh - 84px);
  overflow-y: auto;
}

.compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  align-items: end;
}

.command-hint {
  margin-top: 4px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 11px;
  color: #475569;
  font-family: Consolas, monospace;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-top: 9px;
}

.checkline input {
  width: auto;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

#log {
  height: 120px;
  resize: none;
  background: #111827;
  color: #e5e7eb;
}

.pnr-box {
  margin-top: 8px;
  background: #e9fff0;
  color: #07551f;
  border: 1px solid #71c48c;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
}

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

  body {
    overflow: auto;
  }

  #output {
    min-height: 420px;
  }

  .side-column,
  .availability-section {
    overflow: visible;
    max-height: none;
  }
}


.tn-no-copy {
  grid-template-columns: 1fr auto;
}



.side-column #paxNames {
  min-height: 140px;
}



/* v20 selected login content cleanup */
.premium-login-card .login-card-title-wrap h2 {
  margin-top: 4px;
}

.premium-login-card {
  padding-bottom: 30px;
}


/* v22 PNR passenger batch status */
.pax-summary,
.created-pax-summary {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid #d7dee9;
  background: #f8fafc;
  padding: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: #334155;
  max-height: 150px;
  overflow-y: auto;
}
.pax-summary-title,
.created-pax-title {
  font-weight: 900;
  color: #0b5cad;
  margin-bottom: 5px;
}
.pax-line,
.created-pax-line {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.pax-line:last-child,
.created-pax-line:last-child { border-bottom: 0; }
.pax-sn { font-weight: 900; color: #64748b; }
.created-pax-summary {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.created-pax-title { color: #047857; }
.batch-note {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 800;
}
