:root {
  --canvas: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --danger: #dc2626;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.mono-num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* 3-Zone Single-Row Top Bar */
.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  max-width: 1580px;
  margin: 0 auto;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wordmark {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.topbar-link:hover {
  color: var(--ink);
}

.topbar-link.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-muted);
}

.btn-danger-outline {
  background: var(--surface);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger-outline:hover:not(:disabled) {
  background: #fef2f2;
}

.btn-sm {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
}

.btn-still-toggle.is-active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

/* Compact Workspace Layout */
.portal-container {
  max-width: 1580px;
  margin: 0 auto;
  padding: 8px 14px 16px;
}

.meta-line {
  font-size: 12px;
  color: var(--ink-subtle);
}

.portal-split {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

@media (min-width: 1024px) {
  body.travel-desk-page {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.travel-desk-page .app-topbar {
    position: relative;
    flex-shrink: 0;
  }
  body.travel-desk-page .portal-container {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 14px 10px;
  }
  body.travel-desk-page .status-banner {
    flex-shrink: 0;
  }
  body.travel-desk-page .portal-split {
    flex: 1 1 0%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }
  .portal-split .form-column,
  .portal-split .preview-column {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .portal-split .form-column > .panel-head,
  .portal-split .preview-column > .preview-toolbar,
  .portal-split .preview-column > .preview-unlock-bar,
  .portal-split .preview-column > .preview-format-bar {
    flex-shrink: 0;
  }
  .portal-split .form-shell {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .portal-split .form-top-cta-bar {
    flex-shrink: 0;
  }
  .portal-split .form-scroll-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding-bottom: 24px;
  }
  .portal-split .form-scroll-body > * {
    flex-shrink: 0;
  }
  .portal-split .preview-column > .preview-stage-wrap {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
  }
  .portal-split .preview-column .preview-stage {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.form-scroll-body.is-scroll-locked,
.preview-stage.is-scroll-locked {
  overflow-y: hidden !important;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  min-width: 0;
}

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

.panel-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
}

.panel-subtitle {
  font-size: 11.5px;
  color: var(--ink-subtle);
  margin-top: 1px;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-body {
  padding: 14px 16px;
}

/* Form Elements */
.mode-switch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.form-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 5px;
  margin: 12px 0 8px;
  border-bottom: 1px solid var(--line);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
  min-width: 0;
}

.field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.req-mark {
  color: var(--danger);
  margin-left: 2px;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="email"],
.field input[type="password"],
.field select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
}

.field input.is-invalid {
  border-color: var(--danger);
  background: #fef2f2;
}

.dynamic-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.dyn-row-card {
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.dyn-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.dyn-row-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.trav-grid {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 114px;
  gap: 6px;
}

.leg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.live-web-card {
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 6px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.checkbox-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

/* Compact / Minimized Left Form Section + Elevated 3D Collapsible Cards */
.form-column {
  font-size: 11.5px;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.form-column .panel-head {
  padding: 8px 11px;
  gap: 6px;
  background: #ffffff;
  border-bottom: 1px solid #dbe4f0;
}

.form-column .panel-title {
  font-size: 12.5px;
}

.form-column .panel-subtitle {
  font-size: 10px;
}

.form-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.form-pinned-top {
  padding: 9px 10px 8px;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.form-cta-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.form-cta-row .btn-generate-3d {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 8px 10px;
}

.form-cta-row .btn-fill-sample-compact {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.live-price-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  padding: 7px 10px;
  box-shadow: 0 2px 0 #dbeafe;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lpc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lpc-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a8a;
}

.lpc-total-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
}

.lpc-items-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10.5px;
  color: #475569;
  line-height: 1.35;
}

.lpc-item-pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lpc-item-pair strong {
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.form-column .panel-body {
  padding: 10px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Separate 3D Mode Card (Documents + Flight Routing) */
.form-card-3d {
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 10px 10px;
  box-shadow: 0 3px 0 #cbd5e1, 0 6px 14px rgba(15, 23, 42, 0.06);
}

.mode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
}

.mode-card-kicker {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.mode-card-meta {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Individual Collapsible 3D Section Cards */
.acc-section-3d {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 3px 0 #cbd5e1, 0 5px 12px rgba(15, 23, 42, 0.055);
  overflow: visible;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.acc-section-3d[hidden] {
  display: none !important;
}

.acc-section-3d:hover {
  border-color: #94a3b8;
}

.acc-section-3d.is-open {
  border-color: #93c5fd;
  box-shadow: 0 3px 0 #bfdbfe, 0 8px 18px rgba(29, 78, 216, 0.1);
}

.acc-trigger-3d {
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition: background-color 0.15s ease;
}

.acc-trigger-3d:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.acc-section-3d.is-open .acc-trigger-3d {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border-bottom: 1px solid #dbeafe;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.acc-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.12);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.acc-section-3d.is-open .acc-num-badge {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.28);
}

.acc-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.acc-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.acc-summary {
  font-size: 10px;
  color: var(--ink-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-chevron {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.15s ease, color 0.15s ease;
}

.acc-section-3d.is-open .acc-chevron {
  transform: rotate(180deg);
  background: #dbeafe;
  border-color: #bfdbfe;
  color: var(--accent);
}

.acc-body-3d {
  padding: 9px 10px 10px;
  background: #ffffff;
  border-bottom-left-radius: 9px;
  border-bottom-right-radius: 9px;
}

.acc-body-3d[hidden] {
  display: none !important;
}

.acc-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #e2e8f0;
}

.acc-subbar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-subtle);
}

.form-column .mode-switch-grid {
  gap: 6px;
  margin-bottom: 0;
}

.form-column .form-section-label {
  font-size: 10.5px;
  padding-bottom: 3px;
  margin: 8px 0 5px;
}

.form-column .field-grid,
.form-column .leg-grid {
  gap: 6px;
}

.form-column .field {
  gap: 2px;
  margin-bottom: 5px;
}

.form-column .field label {
  font-size: 10.5px;
}

.form-column .field input[type="text"],
.form-column .field input[type="date"],
.form-column .field input[type="email"],
.form-column .field input[type="password"],
.form-column .field select {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 11.5px;
  border-color: #cbd5e1;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-column .field input:focus,
.form-column .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
}

.form-column .dynamic-stack {
  gap: 6px;
  margin-bottom: 6px;
}

.form-column .dyn-row-card {
  padding: 6px 7px;
  border-radius: 7px;
  border-color: #dbe4f0;
  background: #f8fafc;
}

.form-column .dyn-row-head {
  margin-bottom: 4px;
}

.form-column .dyn-row-title {
  font-size: 10.5px;
}

.form-column .trav-grid {
  grid-template-columns: 58px minmax(0, 1fr) 86px;
  gap: 4px;
}

.form-column .segmented-tabs {
  padding: 2px;
  gap: 2px;
  background: #e2e8f0;
  border-radius: 7px;
}

.form-column .seg-tab {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 10.5px;
}

.form-column .seg-tab.is-active {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
  color: var(--accent);
}

.form-column .btn-sm {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 10.5px;
}

.form-column .live-web-card {
  padding: 7px 9px;
  margin-top: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 2px 0 #e2e8f0;
}

.form-column .checkbox-row {
  font-size: 10.5px;
  gap: 6px;
}

.form-column .checkbox-row input {
  width: 13px;
  height: 13px;
}

.form-column #generate-submit-btn,
.btn-generate-3d {
  min-height: 35px;
  padding: 6px 12px;
  font-size: 11.5px;
  margin-top: 2px !important;
  border-radius: 8px;
  box-shadow: 0 3px 0 #1e3a8a, 0 6px 14px rgba(29, 78, 216, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn-generate-3d:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #1e3a8a, 0 8px 18px rgba(29, 78, 216, 0.26);
}

.btn-generate-3d:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #1e3a8a;
}

/* Segmented Tabs */
.segmented-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--surface-muted);
  border-radius: 7px;
  max-width: 100%;
}

.segmented-full {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.seg-tab {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.seg-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.status-banner {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.status-banner.is-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.status-banner.is-err {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* Preview Toolbars & Floating 3-Lines Options Panel */
.preview-toolbar {
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-toolbar .seg-tab {
  min-height: 26px;
  padding: 3px 11px;
  font-size: 11.5px;
}

.preview-stage-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.preview-fab-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 32;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.preview-fab-btn:hover {
  background: var(--surface-muted);
  border-color: var(--ink-subtle);
}

.preview-fab-btn.is-open {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.preview-floating-panel {
  position: absolute;
  top: 50px;
  right: 12px;
  z-index: 31;
  width: 304px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 62px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-floating-panel[hidden] {
  display: none !important;
}

.fp-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-subtle);
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.fp-section-title:first-child {
  border-top: 0;
  padding-top: 0;
}

.fp-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.fp-actions-grid .btn-sm {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 11px;
  width: 100%;
}

.fp-filters-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fp-filter-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.fp-zoom-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fp-zoom-btn {
  min-height: 26px;
  width: 28px;
  padding: 2px 0;
  font-size: 13px;
}

.fp-zoom-val {
  min-width: 44px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.fp-zoom-fit {
  flex: 1;
  min-height: 26px;
  padding: 2px 8px;
  font-size: 11px;
}

.preview-format-bar {
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 8px;
  align-items: center;
}

.fmt-inline-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.fmt-inline-tag {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 34px;
}

.fmt-select {
  flex: 1;
  min-width: 0;
  min-height: 27px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 11px;
  color: var(--ink);
}

.fmt-cycle-btn,
.fmt-shuffle-btn {
  min-height: 27px;
  padding: 2px 7px;
  font-size: 10.5px;
}

.preview-stage {
  background: #e2e8f0;
  padding: 10px 12px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow-x: hidden;
}

.empty-preview {
  max-width: 440px;
  margin: auto;
  text-align: center;
  padding: 36px 16px;
  color: var(--ink-muted);
}

/* =========================================================
   Responsive A4 Scaling Wrapper & Sheet Styles
   ========================================================= */
.a4-scale-frame {
  position: relative;
  width: 794px;
  flex-shrink: 0;
  margin: 0 auto;
}

.a4-scale-frame.is-tab-hidden {
  display: none;
}

.a4-sheet {
  width: 794px;
  min-height: 1123px;
  background: #ffffff;
  color: #0f172a;
  font-family: var(--doc-font-family, 'DM Sans', sans-serif);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.a4-sheet.is-tab-hidden {
  display: none;
}

.a4-sheet .ticket-brand-title,
.a4-sheet .doc-section-heading,
.a4-sheet .flt-iata {
  font-family: var(--doc-font-family, 'Plus Jakarta Sans', sans-serif);
}

.ticket-top-stripe {
  height: 6px;
  width: 100%;
}

.ticket-head-row {
  padding: 20px 38px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ticket-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-brand-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.ticket-subline {
  font-size: 11.5px;
  color: #475569;
  margin-top: 2px;
}

.ticket-pnr-box {
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  padding: 8px 14px;
  text-align: right;
  border-radius: 6px;
}

.ticket-pnr-box.is-dark {
  background: #1e293b;
  border-color: #334155;
  color: #ffffff;
}

.ticket-pnr-box span {
  display: block;
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

.ticket-pnr-box.is-dark span {
  color: #94a3b8;
}

.ticket-pnr-box strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #0f172a;
}

.ticket-pnr-box.is-dark strong {
  color: #ffffff;
}

.ticket-body {
  padding: 20px 38px;
  flex: 1;
}

.doc-section-heading {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 6px;
  margin: 16px 0 10px;
  border-bottom: 1px solid #cbd5e1;
}

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

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin-bottom: 12px;
}

.ticket-table th,
.ticket-table td {
  border: 1px solid #cbd5e1;
  padding: 7px 9px;
  text-align: left;
  vertical-align: middle;
}

.ticket-table thead th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
}

.flt-legs-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.flt-leg-box,
.flt-ota-card,
.flt-board-row {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
}

.flt-leg-top,
.flt-ota-head {
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.flt-leg-grid {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  gap: 12px;
  align-items: center;
}

.flt-leg-cell.is-right {
  text-align: right;
}

.cell-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.cell-big {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 2px 0;
}

.cell-sub {
  font-size: 11px;
  color: #334155;
}

.flt-leg-center {
  text-align: center;
  font-size: 11px;
}

.flt-dash-line {
  border-top: 1.5px dashed #94a3b8;
  margin: 6px 0;
}

.flt-carrier-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flt-leg-carrier-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.brand-logo-box {
  width: 42px;
  height: 42px;
  padding: 4px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.brand-logo-box.is-sm {
  padding: 2px;
  border-radius: 5px;
}

.brand-logo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.flt-carrier-name {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.flt-carrier-meta {
  font-size: 11px;
  color: #475569;
}

.flt-status-txt {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
}

.flt-timeline-row {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 190px 1fr;
  gap: 12px;
  align-items: center;
}

.flt-point.is-right {
  text-align: right;
}

.flt-iata {
  font-size: 20px;
  font-weight: 700;
  color: var(--doc-accent, #1d4ed8);
}

.flt-time {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.flt-day-off {
  font-size: 11px;
  color: #dc2626;
}

.flt-date,
.flt-airport {
  font-size: 11px;
  color: #475569;
}

.flt-mid-line {
  text-align: center;
}

.flt-dur {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
}

.flt-track {
  display: flex;
  align-items: center;
  margin: 5px 0;
}

.flt-track span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--doc-accent, #1d4ed8);
}

.flt-track i {
  flex: 1;
  height: 1.5px;
  background: #cbd5e1;
}

.flt-nonstop {
  font-size: 10.5px;
  color: #475569;
}

.flt-board-row {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flt-board-col-airline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.flt-board-col-route {
  flex: 1;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flt-iata-sm {
  font-weight: 700;
  color: #0f172a;
}

.flt-board-arrow {
  font-size: 11px;
  color: #475569;
}

/* Hotel Check-In Cards */
.hotel-checkin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.hotel-date-card {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hotel-date-card strong {
  font-size: 13px;
  color: #0f172a;
}

.ticket-bottom-split {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: start;
}

.fare-box {
  border: 1px solid #cbd5e1;
  padding: 12px 14px;
  border-radius: 6px;
}

.fare-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  color: #334155;
}

.fare-line.is-total {
  border-top: 1px solid #cbd5e1;
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
}

.fare-contact {
  font-size: 11px;
  color: #475569;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.barcode-box {
  border: 1px solid #cbd5e1;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  background: #f8fafc;
}

.barcode-caption {
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.barcode-note {
  font-size: 10px;
  color: #475569;
  margin-top: 6px;
  line-height: 1.4;
}

.ticket-footer {
  margin: 0 38px;
  padding: 12px 0 18px;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #64748b;
}

/* Editable Preview Affordances */
.is-editable-active [data-editable="1"] {
  outline: 1px dashed transparent;
  border-radius: 3px;
}

.is-editable-active [data-editable="1"]:hover {
  outline-color: #94a3b8;
  cursor: text;
}

.is-editable-active [data-editable="1"]:focus {
  outline: 1.5px solid #1d4ed8;
}

.is-exporting-pdf [data-editable="1"] {
  outline: none !important;
}

/* =========================================================
   Admin Console, Auth Gate, KPI Strip, Modals & Data Tables
   ========================================================= */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 20px;
}

.auth-hint {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 13px;
}

.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.admin-header-bar h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.admin-header-bar p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
}

.admin-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-search-inp {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12.5px;
  min-width: 230px;
  background: var(--surface);
}

.admin-filter-sel {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12.5px;
  background: var(--surface);
}

.admin-general-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.general-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.general-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.general-meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 9px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* =========================================================
   Brand Logo, Left-Sidebar Admin & User Portal Layout
   ========================================================= */
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-brand-logo {
  height: 28px;
  max-width: 110px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

/* Executive SaaS Admin Console Theme & Sidebar */
.admin-console-page {
  background: #f1f5f9;
}

.admin-console-page .app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.sidebar-app-shell {
  max-width: 1580px;
  margin: 0 auto;
  padding: 16px 18px 32px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 62px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.admin-console-page .admin-sidebar {
  background: #0f172a;
  border-color: #1e293b;
  color: #e2e8f0;
  padding: 14px 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.sidebar-user-box {
  padding: 10px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.sidebar-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.sidebar-user-email {
  font-size: 11.5px;
  color: var(--ink-muted);
  word-break: break-all;
}

.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
  padding: 12px 10px 4px;
}

.admin-console-page .sidebar-group-label {
  color: #64748b;
}

.sidebar-group-label:first-child {
  padding-top: 2px;
}

.sidebar-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.sidebar-tab-btn:hover {
  background: var(--canvas);
  color: var(--ink);
}

.sidebar-tab-btn.is-active {
  background: #eff6ff;
  color: var(--accent);
  border-color: #bfdbfe;
  font-weight: 600;
}

.admin-console-page .sidebar-tab-btn {
  color: #94a3b8;
}

.admin-console-page .sidebar-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.admin-console-page .sidebar-tab-btn.is-active {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.28) 0%, rgba(79, 70, 229, 0.14) 100%);
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.35);
}

.sidebar-tab-btn .st-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-tab-btn.is-active .st-ico {
  opacity: 1;
}

.admin-console-page .sidebar-tab-btn.is-active .st-ico {
  color: #a5b4fc;
}

.sidebar-tab-btn .st-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tab-btn .st-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--canvas);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.sidebar-tab-btn.is-active .st-count {
  background: #dbeafe;
  color: var(--accent);
  border-color: #93c5fd;
}

.admin-console-page .sidebar-tab-btn .st-count {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-console-page .sidebar-tab-btn.is-active .st-count {
  background: #4f46e5;
  color: #ffffff;
  border-color: #6366f1;
}

.admin-main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-console-page .panel {
  border-radius: 12px;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.admin-console-page .panel-head {
  padding: 13px 18px;
}

.admin-console-page .panel-body {
  padding: 16px 18px;
}

.section-top-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ink-subtle);
}

.date-range-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dr-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.admin-date-inp {
  min-height: 31px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  background: var(--surface);
  color: var(--ink);
}

.filter-head-wrap {
  padding: 11px 16px;
}

.kpi-strip-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-console-page .kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-console-page .kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.admin-console-page .kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-subtle);
}

.admin-console-page .kpi-value {
  font-size: 23px;
  margin-top: 6px;
  color: #0f172a;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--ink-subtle);
  margin-top: 4px;
}

/* Modern Toggle Switch (.ui-switch) */
.ui-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.ui-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.ui-switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background-color 0.18s ease;
}

.ui-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 0.18s ease;
}

.ui-switch input:checked + .ui-switch-track {
  background: #4f46e5;
}

.ui-switch input:checked + .ui-switch-track::after {
  transform: translateX(16px);
}

.ui-switch input:focus-visible + .ui-switch-track {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Pricing Matrix Table & Currency Input Wrap */
.pricing-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pricing-matrix-table th {
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-subtle);
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.pricing-matrix-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.pricing-matrix-table tbody tr:last-child td {
  border-bottom: 0;
}

.pm-pkg-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.currency-input-wrap {
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 180px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.currency-input-wrap:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.curr-prefix {
  padding: 0 10px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-muted);
}

.currency-input-wrap input[type="number"] {
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
}

.curr-suffix {
  padding: 0 10px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-muted);
}

.pricing-discount-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.pricing-discount-info {
  flex: 1;
  min-width: 240px;
}

.pricing-discount-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-live-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 18px 16px;
  background: #ffffff;
  border-top: 1px dashed #e2e8f0;
}

.pr-preview-chip {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pr-preview-chip strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.pr-preview-chip span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

@media (max-width: 820px) {
  .pricing-live-preview {
    grid-template-columns: 1fr;
  }
}

/* Gateway Configuration Cards Grid (Cashfree, PayPal, Dummy) */
.gw-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 1200px) {
  .gw-cards-grid {
    grid-template-columns: 1fr;
  }
}

.gw-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gw-badge.is-cashfree {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.gw-badge.is-paypal {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.gw-badge.is-razorpay {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.gw-badge.is-dummy {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

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

/* Status Tags (Crisp Rectangular Badges) */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-tag.is-paid {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-tag.is-unpaid {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-tag.is-failed {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.user-impersonate-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(29, 78, 216, 0.35);
}

.user-impersonate-link:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
  flex-wrap: wrap;
}

.pag-info {
  font-size: 12px;
  color: var(--ink-muted);
}

.pag-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pag-page-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 4px;
}

/* Brand Logo Upload Preview Box */
.brand-preview-box {
  min-height: 74px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 10px;
}

.brand-preview-box img {
  max-height: 54px;
  max-width: 240px;
  object-fit: contain;
}

/* Dedicated Fixed Preview Unlock Strip Directly Above Preview Pages */
.preview-unlock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  z-index: 25;
}

.preview-unlock-bar.is-unlocked {
  background: #f0fdf4;
  border-bottom-color: #bbf7d0;
  color: #166534;
}

.unlock-bar-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.unlock-bar-ico {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.preview-unlock-bar .btn-sm {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 11.5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

@media (max-width: 1023px) {
  .preview-unlock-bar {
    position: sticky;
    top: 46px;
  }
}

/* =========================================================
   Configurable Preview Watermark Overlay Engine
   ========================================================= */
.a4-sheet {
  position: relative;
  overflow: hidden;
}

.doc-watermark-layer {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wm-color, #0f172a);
}

.wm-tiled-grid {
  position: absolute;
  inset: -35%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: space-around;
  justify-items: center;
  gap: 44px 28px;
  transform: rotate(var(--wm-angle, -30deg));
  opacity: var(--wm-opacity, 0.16);
}

.wm-tiled-grid.is-subtle {
  opacity: calc(var(--wm-opacity, 0.16) * 0.55);
}

.wm-tile-item {
  font-size: var(--wm-size, 22px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wm-center-stamp {
  position: relative;
  z-index: 2;
  font-size: calc(var(--wm-size, 22px) * 1.55);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px 26px;
  border: 4px solid currentColor;
  border-radius: 10px;
  transform: rotate(var(--wm-angle, -30deg));
  opacity: calc(var(--wm-opacity, 0.16) * 1.25);
  max-width: 86%;
}

.wm-center-stamp.is-bold {
  opacity: calc(var(--wm-opacity, 0.16) * 1.35);
}

.wm-horiz-stack {
  position: absolute;
  inset: 28px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: var(--wm-opacity, 0.16);
}

.wm-horiz-row {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  font-size: var(--wm-size, 22px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wm-corner {
  position: absolute;
  font-size: calc(var(--wm-size, 22px) * 0.85);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: var(--wm-opacity, 0.16);
  transform: rotate(var(--wm-angle, -30deg));
}

.wm-tl { top: 60px; left: 32px; }
.wm-tr { top: 60px; right: 32px; }
.wm-bl { bottom: 60px; left: 32px; }
.wm-br { bottom: 60px; right: 32px; }

.wm-live-demo-sheet {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 20px;
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.04);
}

.wm-demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #0f172a;
  margin-bottom: 16px;
  font-size: 13px;
}

.wm-demo-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* Payment Checkout Modal (Clean, Structured & Responsive) */
.pay-modal-card {
  max-width: 520px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.pay-modal-head {
  padding: 14px 18px;
  background: #ffffff;
}

.pay-modal-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.pay-modal-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pay-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.pay-sum-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-sum-lbl {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-subtle);
}

.pay-sum-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-breakdown-bar {
  padding: 8px 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.pay-billing-box {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.pay-billing-head {
  padding: 7px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

.pay-billing-rows {
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pay-bill-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #334155;
}

.pay-bill-row .pbr-sub {
  font-size: 11px;
  color: #64748b;
  margin-left: 4px;
}

.pay-bill-row .pbr-amt {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

.pay-bill-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.pay-bill-total .pbr-amt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: #1d4ed8;
}

.pay-form-section,
.pay-methods-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-sec-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-subtle);
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.pay-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pay-form-grid .field {
  margin-bottom: 0;
}

.pay-helper-note {
  font-size: 11px;
  color: var(--ink-subtle);
  margin-top: 4px;
  line-height: 1.4;
}

.pay-gateways-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-gw-btn[hidden] {
  display: none !important;
}

.pay-gw-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.pay-gw-btn:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.pay-gw-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pgw-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.pgw-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.pgw-sub {
  font-size: 11.5px;
  color: var(--ink-subtle);
}

.pgw-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pay-gw-btn .pgw-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.pgw-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  background: #1d4ed8;
}

.pay-gw-btn.is-cashfree .pgw-action {
  background: #1d4ed8;
}

.pay-gw-btn.is-paypal .pgw-action {
  background: #0369a1;
}

.pay-gw-btn.is-razorpay .pgw-action {
  background: #2563eb;
}

.pay-gw-btn.is-dummy .pgw-action {
  background: #0f766e;
}

.pay-no-gw-box {
  padding: 11px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  font-weight: 500;
}

/* =========================================================
   Responsive Breakpoints (Laptop, Tablet, Mobile)
   ========================================================= */
@media (max-width: 1023px) {
  .sidebar-app-shell {
    grid-template-columns: 1fr;
    padding: 10px 10px 24px;
    gap: 12px;
  }
  .admin-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px;
    gap: 6px;
  }
  .sidebar-group-label,
  .sidebar-user-box {
    display: none;
  }
  .sidebar-tab-btn {
    width: auto;
    flex-shrink: 0;
    padding: 7px 11px;
  }
  .kpi-strip-6,
  .pricing-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .portal-split .form-column,
  .portal-split .preview-column {
    position: static;
    height: auto;
    overflow: visible;
  }
  .portal-split .form-scroll-body,
  .portal-split .preview-column .preview-stage {
    overflow-y: visible;
  }
  .preview-format-bar {
    grid-template-columns: 1fr 1fr;
  }
  .fmt-font-cell {
    grid-column: span 2;
  }
  .preview-stage {
    min-height: 380px;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-general-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .topbar-nav {
    gap: 14px;
    order: 3;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }
  .portal-container {
    padding: 8px 8px 20px;
  }
  .form-column .panel-body {
    padding: 8px;
    gap: 8px;
  }
  .form-column .acc-trigger-3d {
    padding: 10px;
    min-height: 46px;
  }
  .form-column .field input[type="text"],
  .form-column .field input[type="date"],
  .form-column .field input[type="email"],
  .form-column .field input[type="password"],
  .form-column .field select {
    min-height: 36px;
    font-size: 13px;
    padding: 5px 9px;
  }
  .form-column .seg-tab {
    min-height: 32px;
    font-size: 11.5px;
    padding: 4px 6px;
  }
  .form-column .btn-sm {
    min-height: 30px;
    font-size: 11.5px;
    padding: 4px 9px;
  }
  .form-column #generate-submit-btn,
  .btn-generate-3d {
    min-height: 40px;
    font-size: 12.5px;
  }
  .field-grid,
  .trav-grid,
  .leg-grid,
  .preview-format-bar,
  .form-column .trav-grid {
    grid-template-columns: 1fr;
  }
  .fmt-font-cell {
    grid-column: span 1;
  }
  .preview-toolbar {
    padding: 6px 8px;
  }
  .preview-toolbar .segmented-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .preview-fab-btn {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
  }
  .preview-floating-panel {
    top: 48px;
    right: 8px;
    width: calc(100% - 16px);
    max-width: 330px;
  }
  .preview-format-bar {
    padding: 8px 10px;
  }
  .preview-stage {
    padding: 8px;
    gap: 10px;
  }
  .admin-search-inp,
  .admin-filter-sel {
    width: 100%;
    min-width: 0;
  }
  .kpi-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .topbar-actions .btn-sm {
    width: 100%;
  }
  .fp-actions-grid {
    grid-template-columns: 1fr;
  }
  .preview-toolbar .seg-tab {
    font-size: 10.5px;
    padding: 4px 4px;
  }
}

/* =========================================================
   Country Code + 10-Digit Phone Input & Email Module Styles
   ========================================================= */
.phone-input-group {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.phone-cc-select {
  width: 96px !important;
  min-width: 86px;
  max-width: 104px;
  flex: 0 0 96px;
  padding-left: 6px !important;
  padding-right: 4px !important;
  font-size: 12px !important;
}

.phone-input-group input[type="tel"],
.phone-input-group input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

.field input[type="tel"] {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
}

.field input[type="tel"]:focus,
.tpl-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.field input.is-invalid,
.field select.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14) !important;
}

.tpl-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
}

.tpl-attach-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
}

.tpl-var-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.tpl-chip {
  padding: 3px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  cursor: pointer;
}

.tpl-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.emlog-meta-bar {
  padding: 9px 12px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #334155;
}

.emlog-preview-frame {
  width: 100%;
  height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f1f5f9;
}

@media (max-width: 640px) {
  .pay-summary-strip,
  .pay-form-grid {
    grid-template-columns: 1fr;
  }
  .phone-input-group {
    flex-direction: row;
    gap: 6px;
  }
  .phone-cc-select {
    width: 90px !important;
    min-width: 82px;
    flex: 0 0 90px;
  }
  .pricing-matrix-table th,
  .pricing-matrix-table td {
    padding: 10px 12px;
  }
}

/* =========================================================
   Floating Actions Grid Helper & Travel Desk Theme Polish
   ========================================================= */
.fp-span-2 {
  grid-column: 1 / -1;
}

body.travel-desk-page {
  background: #edf2f7;
}

body.travel-desk-page .app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

body.travel-desk-page .brand-wordmark {
  color: #0f172a;
  letter-spacing: -0.02em;
}

body.travel-desk-page .form-column,
body.travel-desk-page .preview-column {
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.travel-desk-page .preview-toolbar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #dbe4f0;
}

body.travel-desk-page .preview-stage {
  background-color: #e2e8f0;
  background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.075) 1px, transparent 0);
  background-size: 20px 20px;
}

.empty-preview {
  max-width: 460px;
  margin: auto;
  text-align: center;
  padding: 36px 28px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.empty-preview h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
}

.empty-preview p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.empty-preview-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   3D Pop-Card Landing Page (100% Theme Matched + Admin Configurable)
   ========================================================= */
body.landing-page {
  --bg: #f4f7ff;
  --card: #ffffff;
  --tx: #10183a;
  --mu: #5a6488;
  --ac: #3b6cff;
  --ac2: #ff7a45;
  --ac-grad-end: #7a4dff;
  --bd: #dfe5fb;
  --sh: 0 20px 50px rgba(40, 70, 160, 0.18);
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--tx);
  overflow-x: hidden;
  line-height: 1.55;
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body.landing-page {
    --bg: var(--lnd-bg-dark, #0a1030);
    --card: var(--lnd-card-dark, #141c46);
    --tx: var(--lnd-tx-dark, #f1f4ff);
    --mu: var(--lnd-mu-dark, #a6b0dd);
    --bd: var(--lnd-bd-dark, #27316b);
    --sh: 0 20px 50px rgba(0, 0, 0, 0.5);
  }
}

html[data-theme="dark"] body.landing-page {
  --bg: var(--lnd-bg-dark, #0a1030);
  --card: var(--lnd-card-dark, #141c46);
  --tx: var(--lnd-tx-dark, #f1f4ff);
  --mu: var(--lnd-mu-dark, #a6b0dd);
  --bd: var(--lnd-bd-dark, #27316b);
  --sh: 0 20px 50px rgba(0, 0, 0, 0.5);
}

body.landing-page h1,
body.landing-page h2,
body.landing-page h3,
body.landing-page h4 {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--tx);
}

.landing-topbar {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bd);
}

.landing-topbar .topbar-inner {
  max-width: 1100px;
  padding: 10px 20px;
}

.landing-topbar .brand-wordmark {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tx);
}

.landing-topbar .topbar-link {
  color: var(--mu);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
}

.landing-topbar .topbar-link:hover {
  color: var(--tx);
}

.lnd-nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1.5px solid var(--bd);
  background: var(--card);
  color: var(--tx);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.lnd-nav-login:hover {
  transform: translateY(-1px);
  border-color: var(--ac);
}

.lnd-nav-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--ac), var(--ac-grad-end));
  color: #ffffff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(59, 108, 255, 0.32);
  transition: transform 0.2s ease;
}

.lnd-nav-portal:hover {
  transform: translateY(-2px);
}

.lnd-sec {
  max-width: 1100px;
  margin: auto;
  padding: 70px 20px;
  perspective: 1200px;
}

.grad {
  background: linear-gradient(90deg, var(--ac), var(--ac2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.landing-page h1 {
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.02em;
}

body.landing-page h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  margin: 0;
  letter-spacing: -0.015em;
}

.lnd-sub {
  color: var(--mu);
  text-align: center;
  max-width: 620px;
  margin: 10px auto 0;
}

.lnd-hero {
  min-height: calc(100svh - 60px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: center;
}

.lnd-hero p {
  color: var(--mu);
  margin: 16px 0 26px;
  font-size: 1.05rem;
}

.lnd-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--card);
  border: 1px solid var(--bd);
  font-size: 0.8rem;
  margin-bottom: 16px;
  color: var(--tx);
  font-weight: 600;
}

.lnd-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ac), var(--ac-grad-end));
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(59, 108, 255, 0.4);
  transition: transform 0.25s;
}

.lnd-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.lnd-btn.o {
  background: transparent;
  color: var(--tx);
  border: 1.5px solid var(--bd);
  box-shadow: none;
  margin-left: 8px;
}

.lnd-stage {
  perspective: 1000px;
  display: grid;
  place-items: center;
  min-height: 380px;
  position: relative;
}

.lnd-pass {
  width: min(340px, 86%);
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--sh);
  border: 1px solid var(--bd);
  transform: rotateY(calc(-22deg + var(--s, 0) * 30deg)) rotateX(calc(12deg - var(--s, 0) * 14deg));
  transform-style: preserve-3d;
  animation: lnd-fl 5s ease-in-out infinite;
}

@keyframes lnd-fl {
  50% {
    translate: 0 -14px;
  }
}

.lnd-pass .r {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lnd-pass b {
  font-size: 2rem;
  font-weight: 800;
  color: var(--tx);
}

.lnd-pass small {
  color: var(--mu);
  display: block;
}

.lnd-pass .pl {
  font-size: 2rem;
  transform: translateZ(50px);
}

.lnd-pass hr {
  border: 0;
  border-top: 2px dashed var(--bd);
  margin: 18px 0;
}

.lnd-hotel {
  position: absolute;
  right: 2%;
  bottom: 6%;
  width: 158px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--sh);
  transform: translateZ(90px) rotateY(-10deg);
  font-size: 0.8rem;
  animation: lnd-fl 6s ease-in-out infinite reverse;
  color: var(--tx);
}

.lnd-use {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.lnd-use div {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 18px;
  padding: 20px 14px;
  text-align: center;
  font-size: 0.9rem;
  box-shadow: var(--sh);
  font-weight: 600;
  color: var(--tx);
}

.lnd-use span {
  display: block;
  font-size: 2rem;
  margin-bottom: 6px;
}

.lnd-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
  perspective: 1200px;
  align-items: stretch;
}

.lnd-plan {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--sh);
  position: relative;
  transition: transform 0.4s;
  display: flex;
  flex-direction: column;
}

.lnd-plan:hover {
  transform: translateY(-8px) rotateX(4deg);
}

.lnd-plan.f {
  border: 2px solid var(--ac);
  transform: scale(1.04);
}

.lnd-plan.f:hover {
  transform: scale(1.04) translateY(-8px);
}

.lnd-tag {
  position: absolute;
  top: -13px;
  right: 20px;
  background: var(--ac2);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 99px;
  font-weight: 600;
}

.lnd-plan .ic {
  font-size: 2.2rem;
}

.lnd-plan h3 {
  margin: 6px 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.lnd-price {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--tx);
}

.lnd-price small {
  font-size: 0.9rem;
  color: var(--mu);
  font-weight: 400;
}

.lnd-price-sub {
  font-size: 0.82rem;
  color: var(--mu);
  margin-top: 4px;
  font-weight: 500;
}

.lnd-plan ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  color: var(--mu);
  font-size: 0.92rem;
  flex: 1;
}

.lnd-plan li {
  padding: 5px 0;
}

.lnd-plan li:before {
  content: "✓ ";
  color: var(--ac);
  font-weight: 700;
}

.lnd-plan .lnd-btn {
  display: block;
  text-align: center;
}

.lnd-steps {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.lnd-steps > div {
  flex: 1 1 220px;
  max-width: 290px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--sh);
}

.lnd-steps b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--ac);
  color: #ffffff;
  font-weight: 800;
}

.lnd-step-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--tx);
  margin-bottom: 4px;
}

.lnd-step-desc {
  font-size: 0.84rem;
  color: var(--mu);
  line-height: 1.45;
}

.lnd-cta {
  text-align: center;
  background: linear-gradient(135deg, var(--ac), var(--ac-grad-end));
  color: #ffffff;
  border-radius: 28px;
  padding: 50px 20px;
  margin: 0 20px 60px;
  max-width: 1060px;
  margin-inline: auto;
  box-shadow: var(--sh);
}

body.landing-page .lnd-cta h2 {
  color: #ffffff;
}

.lnd-cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.lnd-cta .lnd-btn {
  background: #ffffff;
  color: #3b3bd0;
  margin-top: 0;
}

.lnd-cta .lnd-btn.o {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.48);
  margin-left: 0;
}

.lnd-footer {
  text-align: center;
  color: var(--mu);
  font-size: 0.82rem;
  padding: 0 20px 34px;
}

.lnd-footer-links {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lnd-footer-links a {
  color: var(--mu);
  text-decoration: none;
  font-weight: 600;
}

.lnd-footer-links a:hover {
  color: var(--ac);
}

.rv {
  opacity: 0;
  transform: translateZ(-160px) rotateX(35deg) translateY(50px);
  transform-origin: 50% 100%;
  transition: opacity 0.9s, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv.d1 {
  transition-delay: 0.12s;
}

.rv.d2 {
  transition-delay: 0.24s;
}

.lnd-plan.f.rv.in {
  transform: scale(1.04);
}


/* =========================================================
   Admin Multi-SMTP Accounts, Quota Countdown & Test Grid
   ========================================================= */
.smtp-test-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 180px;
  gap: 12px;
  align-items: end;
}

.smtp-countdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.smtp-countdown-pill {
  font-size: 10.5px;
}

.smtp-quota-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.smtp-quota-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.smtp-quota-fill.is-ok {
  background: #16a34a;
}

.smtp-quota-fill.is-warn {
  background: #d97706;
}

.smtp-quota-fill.is-full {
  background: #dc2626;
}

@media (max-width: 820px) {
  .lnd-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 40px;
    min-height: auto;
  }
  .lnd-stage {
    min-height: 320px;
  }
  .lnd-hotel {
    right: 0;
  }
  .lnd-use {
    grid-template-columns: repeat(2, 1fr);
  }
  .lnd-plans {
    grid-template-columns: 1fr;
  }
  .lnd-plan.f,
  .lnd-plan.f.rv.in {
    transform: none;
  }
  .lnd-btn.o {
    margin: 10px 0 0;
  }
  .landing-topbar .topbar-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .lnd-pass,
  .lnd-hotel {
    animation: none;
  }
}

@media (max-width: 860px) {
  .smtp-test-grid {
    grid-template-columns: 1fr;
  }
}


@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  body,
  body.travel-desk-page {
    background: #ffffff !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }
  .no-print,
  .app-topbar,
  .form-column,
  .preview-toolbar,
  .preview-format-bar,
  .preview-fab-btn,
  .preview-floating-panel,
  .modal-head {
    display: none !important;
  }
  .portal-container,
  .portal-split,
  .preview-column,
  .preview-stage-wrap,
  .panel,
  .preview-stage,
  .modal-backdrop,
  .modal-card,
  .modal-body {
    display: block !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    max-width: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }
  .a4-scale-frame,
  .a4-scale-frame.is-tab-hidden {
    display: block !important;
    width: 210mm !important;
    height: auto !important;
    margin: 0 !important;
  }
  .a4-sheet,
  .a4-sheet.is-tab-hidden {
    display: flex !important;
    width: 210mm !important;
    min-height: 297mm !important;
    transform: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    page-break-after: always;
    break-after: page;
  }
  .a4-scale-frame:last-child .a4-sheet {
    page-break-after: auto;
    break-after: auto;
  }
}
