/* Scoped to the active compact Seat Config view; other tools keep their own layout. */
@scope (body:has(#view_seat_config.sc-compact:not(.hidden)), body.amt-compact-mode:has(#view_seat_config:not(.hidden))) {
:scope { background:#070e1c; font-size:11px; }
#sc_floating_circuit_actions, :scope > footer { display:none!important; }
#view_seat_config {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#view_seat_config.hidden { display:none!important; }
#view_seat_config > *, .sc_layout_pane > * { margin:0!important; min-width:0; }
.sc_layout_pane:not([hidden]):not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.sc_layout_pane[hidden],
.sc_layout_pane.hidden {
  display: none !important;
}
#view_seat_config input:not([type=checkbox]), #view_seat_config select { font-size:11px; padding:4px 6px; min-height:28px; border-radius:5px; }
#view_seat_config input[type=checkbox] { width:12px; height:12px; }
#view_seat_config label, #view_seat_config button { font-size:10px; }
#sc_aircraft_type_badge, #sc_trigger_plane_details, #sc_aircraft_price_badge { display:none; }
#sc_aircraft_category_badge { font-size:9px; }
#sc_layout_editor h3 { font-size:11px; }
.sc_layout_examples { display:flex; align-items:center; }
.sc_layout_examples button { border:1px solid #263a51; border-radius:4px; }
.sc_layout_toolbar { position:fixed; bottom:0; left:0; right:0; z-index:40; display:flex; background:#0b1527f5; border-top:1px solid #2b3c53; backdrop-filter:blur(12px); width:100%!important; box-sizing:border-box!important; }
.sc_layout_toolbar button { flex:1; border:1px solid #304056; color:#b7c9dc; background:#131e31; }
.sc_layout_toolbar button:first-child { color:#6ee7b7; background:#072b28; border-color:#17574d; }
.sc_layout_toolbar .sc_layout_clear { color:#fda4af; }
.sc_layout_tabs { display:grid; grid-template-columns:repeat(4,1fr); background:#111c2f; border:1px solid #25364e; z-index:10; width:100%!important; box-sizing:border-box!important; }
.sc_layout_tabs button { color:#8da1bb; border-radius:5px; }
.sc_layout_tabs [aria-selected=true] { background:#164354; color:#a5f3fc; }
:scope :focus-visible { outline:2px solid #22d3ee; outline-offset:2px; }
/* Match Route Finder's micro controls and row density, without desktop-width tables. */
.sc-source,[hidden]{display:none!important}
:scope{font-family:Inter,'Segoe UI',sans-serif;font-variant-numeric:tabular-nums}
:scope > main {
  padding: 5px 7px 46px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
#sc_layout_setup{position:relative;z-index:30;padding:5px 7px!important;border-radius:8px!important;width:100%!important;box-sizing:border-box!important}
#sc_layout_setup:has(#sc_combobox_popover:not(.hidden)),
#sc_layout_setup.is-open {z-index:60}
#sc_layout_setup > *{margin:0!important;padding:0!important}
.sc-topline{display:flex;align-items:center;gap:4px}
#view_seat_config #sc_circuit_hub{width:44px;min-width:44px;padding:3px 5px;text-align:center;min-height:25px}
#sc_aircraft_combobox_root{position:relative;flex:1;min-width:0;z-index:40}
#sc_aircraft_combobox_root:has(#sc_combobox_popover:not(.hidden)),
#sc_aircraft_combobox_root.is-open {z-index:60}
#sc_aircraft_combobox_root > :first-child,#sc_aircraft_combobox_root > .sc_layout_aircraft_actions{display:none}
#sc_aircraft_combobox_root > *{margin:0!important}
#sc_combobox_trigger{min-height:25px;padding:3px 5px!important;font-size:10px!important}
#sc_combobox_popover{width:min(320px,calc(100vw - 28px));left:-48px;right:auto;z-index:60}
#sc_combobox_popover input{min-height:25px}
.sc-topline > button{padding:4px 5px!important;font-size:9px!important;border-radius:5px;white-space:nowrap;min-height:25px;border:1px solid #304056;background:#101f32;color:#94cee0}
.sc-topline > .sc-info{min-width:22px;padding:2px!important;font-size:13px!important}
#sc_layout_setup .sc-statusline{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:2px!important;font-size:9px;color:#90a2b9;line-height:12px}
.sc-statusline b{color:#dbe7f5;font-weight:600}.sc-statusline > :first-child{color:#67e8f9;font-weight:600}
#sc_layout_setup .sc-warning{font-size:9px;line-height:1.35;color:#fbbf24;padding-top:4px!important}
.sc_layout_tabs{position:static;border-radius:7px;padding:2px;gap:2px;z-index:10}.sc_layout_tabs button{font-size:10px!important;padding:5px 1px}
#sc_layout_editor{padding:7px!important;border-radius:8px!important;width:100%!important;box-sizing:border-box!important}
#sc_layout_editor > *{margin:0!important;padding:0!important}
.sc-section-title{display:flex;align-items:center;gap:6px;min-height:23px;font-size:10px;color:#cbd8e9}
.sc-section-title .sc-muted{margin-left:auto}.sc-section-title strong{font-weight:600}
#sc_layout_editor .sc-section-title{border-bottom:1px solid #243044;padding-bottom:4px!important;min-height:20px}
#sc_form_hub_badge{font-size:8px;padding:1px 4px}
#sc_layout_editor .sc-fields{display:grid;grid-template-columns:1fr 1.12fr 1fr;gap:6px;margin-top:5px!important}
.sc-fields > *{min-width:0;font-size:9px!important;color:#8fa2bb}
.sc-field-label{display:flex;align-items:center;justify-content:space-between;font-size:9px;white-space:nowrap;min-height:16px}
.sc-field-label label{font-size:9px!important}.sc-manual{display:flex;align-items:center;gap:2px;font-size:8px!important}
#view_seat_config .sc-fields input{width:100%;font-size:10px;padding:3px 4px!important;min-height:24px;height:24px}
#view_seat_config .sc-fields input[type=checkbox]{width:10px;height:10px;min-height:0}
.sc-fields > label > input{display:block;margin-top:2px}
.sc-times{display:flex;align-items:center;gap:3px}.sc-times input{min-width:0;text-align:center}
#sc_layout_editor .sc-hints{display:flex;gap:7px;min-width:0;margin-top:2px!important}
#sc_layout_editor:has(#sc_leg_dst:placeholder-shown) .sc-hints{display:none}
.sc-hints > *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:8px!important;flex:1}
#sc_layout_editor .sc-input-matrix{display:grid;grid-template-columns:42px repeat(4,minmax(0,1fr));align-items:center;gap:3px 4px;margin-top:5px!important;font-size:9px;text-align:center}
.sc-input-label{text-align:left;color:#8fa2bb}
#view_seat_config .sc-input-matrix input{width:100%;min-height:23px;height:23px;padding:2px 4px;font-size:10px;text-align:right}
.sc-input-matrix input:disabled{opacity:.3;cursor:not-allowed}
#sc_layout_editor .sc-editor-actions{display:flex;align-items:center;gap:5px;margin-top:6px!important}
.sc-cargo-toggle{display:flex;gap:4px;align-items:center;font-size:9px!important;margin-right:auto}
#view_seat_config .sc-editor-actions button{font-size:9px;padding:3px 7px;border-radius:5px;min-height:23px}
#sc_add_leg_btn{flex:0 0 auto;min-width:58px}#sc_cancel_edit_btn{padding:3px 5px!important}
#sc_audit_basis_toggle_group{font-size:8px!important;flex-wrap:wrap}
#sc_audit_basis_toggle_group button{padding:2px!important;font-size:8px!important}
#sc_layout_routes{padding:0;width:100%!important;box-sizing:border-box!important}#sc_layout_routes > :first-child{margin-bottom:3px!important}
#sc_compact_route_count{font-size:9px;color:#67e8f9}
#sc_circuit_table_container{display:flex;flex-direction:column;gap:3px;margin-top:0!important}
#sc_circuit_table_container > *{margin:0!important}
.sc-route{border:1px solid #233149;background:#0d1728;border-radius:6px;padding:2px 5px}
.sc-route-top{display:flex;align-items:center;gap:5px;min-width:0}
.sc-route-code{font-size:10px;font-weight:700;border-left:3px solid;padding-left:5px;color:#e0edfc}
.sc-route-meta{font-size:8px;color:#849ab6;white-space:nowrap}.sc-route-meta b{font-weight:600;color:#acd9e4}
.sc-route-actions{display:flex;align-items:center;gap:2px;margin-left:auto}
#view_seat_config .sc-route-actions button,#view_seat_config .sc-stepper button{font-size:10px;padding:0;min-width:18px;height:20px;line-height:20px;background:#172438;border-radius:3px;color:#b7c8dd}
#view_seat_config button:disabled{opacity:.3;cursor:not-allowed}
.sc-stepper{display:inline-flex;align-items:center;justify-content:center;gap:2px;white-space:nowrap}
.sc-stepper b{font-size:9px;font-weight:500;min-width:14px;text-align:center}
.sc-route-demand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;font-size:8px;line-height:12px;margin-top:1px}
#view_seat_config .sc-route-actions button{height:17px;line-height:17px}
.sc-route.dragging{opacity:.5}.sc-route.drag-over{border-color:#22d3ee}
.sc-route-demand > span{white-space:nowrap}.sc-route-demand small{font-size:8px;color:#8d9fb7}.sc-route-demand b{font-weight:600}
.sc-class-eco{color:#67e8f9!important}.sc-class-bus{color:#93c5fd!important}.sc-class-first{color:#fcd34d!important}.sc-class-cargo{color:#6ee7b7!important}
#view_seat_config .sc-results{padding:7px;overflow:visible;border-radius:8px!important;background:#0a1424;width:100%!important;box-sizing:border-box!important}
#view_seat_config #circuit_fleet_config_section > .sc-strategy{display:flex;gap:4px;padding:0 0 6px!important}
#view_seat_config .sc-strategy button{padding:4px 6px!important;font-size:9px!important;border-radius:5px;flex:1;justify-content:center}
.sc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-bottom:5px}
.sc-kpis > div{padding:5px;background:#070f1d;border:1px solid #233248;border-radius:5px;min-width:0}
.sc-kpis small{display:block;color:#7f92ad;font-size:8px;white-space:nowrap}
.sc-kpis strong{display:block;font:600 11px/1.6 ui-monospace,Consolas,monospace;color:#dae6f5;white-space:nowrap}
.sc-good{color:#6ee7b7!important}.sc-warn{color:#fbbf24!important}.sc-muted{color:#8496af;font-size:8px}
.sc-spacer{flex:1}.sc-inline-info{display:flex;align-items:center;gap:4px;font-size:9px;color:#92a5c0;margin:5px 0}
#view_seat_config .sc-inline-info button{font-size:8px;padding:2px 4px;color:#67d6e8;background:#10283a;border-radius:3px}
.sc-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:10px;color:#d5e1f1;font-variant-numeric:tabular-nums}
.sc-table caption{text-align:left;caption-side:bottom;font-size:8px;line-height:1.4;padding:5px 0}
.sc-table th{font-weight:500;font-size:8px;color:#8598b2;background:#101d2f}
.sc-table td,.sc-table th{padding:5px 3px;text-align:right;border-bottom:1px solid #213047;line-height:1.25;vertical-align:middle}
.sc-table td:first-child,.sc-table th:first-child{text-align:left}
.sc-table small{display:block;font-size:8px;line-height:1.35;color:#899cb7}
#view_seat_config .sc-table button{font-size:9px;color:#78d6e7;padding:1px 3px;border-radius:3px}
.sc-table button:hover{background:#1b334a}.sc-selected{background:#143044}.sc-complete{background:#07302755}
.sc-fleet-table th:first-child{width:82px}.sc-fleet-table th:nth-child(6){width:64px}.sc-fleet-table th:last-child{width:20px}
.sc-fleet-table td{height:31px}.sc-fleet-table .sc-stepper > button:nth-child(2){min-width:25px!important;font-size:9px!important;background:transparent!important}
.sc-metric-line{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:3px 6px;font-size:8px;color:#96a9c3;padding:5px 0}
.sc-cabin-detail{display:grid;grid-template-columns:1fr;gap:4px;text-align:left;font-size:9px;color:#a8bcd4;padding:3px}
.sc-cabin-bar{height:6px;display:flex;background:#253246;border-radius:3px;overflow:hidden}
.sc-week{padding:5px 0;margin-bottom:5px}.sc-day{display:grid;grid-template-columns:24px 1fr;gap:5px;align-items:center;margin-bottom:4px;font-size:9px;color:#8ea3be}
.sc-day-track{position:relative;height:20px;border-radius:3px;overflow:hidden;background:repeating-linear-gradient(to right,#29374d 0 1px,#0f1c2e 1px calc(100%/24))}
.sc-day-track > span{position:absolute;top:0;bottom:0;overflow:hidden;white-space:nowrap;text-align:center;padding:3px 1px;font-size:8px;color:#061326;font-weight:700;border-right:1px solid #07132688}
.sc-hours > div{display:flex;justify-content:space-between;font:8px ui-monospace,monospace}
.sc-dot{display:inline-block;width:5px;height:5px;border-radius:50%;margin-right:4px}
.sc-schedule-note{padding-top:6px;line-height:1.4}
.sc-schedule-view .sc-day{margin-bottom:2px}.sc-schedule-view .sc-day-track{height:17px}.sc-schedule-view .sc-day-track > span{padding-top:1px}
.sc-schedule-view .sc-table td{padding-top:3px;padding-bottom:3px}
#view_seat_config .sc-financial-view select{padding:2px 4px;min-height:23px;max-width:160px;font-size:9px;background:#0c1b2d;border:1px solid #2d415e;border-radius:4px;margin-left:auto}
.sc-finance-matrix th:first-child{width:83px}.sc-finance-matrix td,.sc-finance-matrix th{padding:2px 3px;font-size:9px;white-space:nowrap}
.sc-finance-matrix th{font-size:8px}.sc-finance-matrix tbody tr:nth-child(2n){background:#101c2b55}
.sc-financial-view .sc-section-title{min-height:20px}.sc-financial-view .sc-metric-line{padding:3px 0}
.sc-route-finance td{padding:3px 2px;font-size:8px;white-space:nowrap}.sc-route-finance small{display:inline;font-size:8px}.sc-route-finance small::before{content:' / ';color:#53667f}
.sc-route-finance td:first-child small{font-size:7px}.sc-route-finance td:first-child button{padding:0!important;font-size:8px!important}
.sc-money-note{padding-top:4px}
.sc_layout_toolbar{padding:5px 7px;gap:4px}.sc_layout_toolbar button{padding:5px 3px;font-size:9px!important;border-radius:5px}
.sc_layout_toolbar .sc_layout_examples{border:0;margin:0!important;padding:0;gap:3px;flex:0 0 auto}
.sc_layout_toolbar .sc_layout_examples button{font-size:8px!important;border-color:#24364e;color:#92b2cd;flex:0;padding:5px}
.sc-dialog{width:calc(100% - 20px);max-width:470px;max-height:88dvh;overflow:auto;background:#0c1627;color:#c9daed;border:1px solid #38516e;border-radius:10px;padding:12px;box-shadow:0 20px 80px #000a}
.sc-dialog::backdrop{background:#020611b8;backdrop-filter:blur(3px)}.sc-dialog-title{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:10px}
.sc-dialog-title button{width:25px;height:25px;background:#1b2a40;border-radius:5px}
.sc-dialog #sc_hub_info,.sc-dialog #sc_aircraft_specs_summary{display:block;font-size:11px!important;white-space:normal;margin:8px 0}
.sc-empty{padding:20px 10px;text-align:center;font-size:11px;color:#90a5bf}
:scope [id^="sc_layout_panel_"]{min-width:0}
@media(max-width:380px){.sc-route-meta{font-size:7px}.sc-route-actions{gap:1px}.sc-route-demand{gap:2px;font-size:7px}.sc-route-demand small{font-size:7px}#view_seat_config .sc-route-actions button{min-width:16px}.sc-field-label label{font-size:8px!important}.sc-manual{font-size:7px!important}.sc-finance-matrix th:first-child{width:76px}.sc-kpis strong{font-size:10px}.sc-finance-matrix td{font-size:8px}.sc-topline{gap:3px}.sc-topline > button{font-size:8px!important;padding:4px!important}}
}

body.amt-compact-mode #view_seat_config.hidden,
#view_seat_config.hidden {
  display: none !important;
}

/* ==========================================================================
   Direct fallback rules for compact Seat Config container & main padding
   Ensures seamless responsive sizing across all environments and sidebar widths
   ========================================================================== */
body.amt-compact-mode:has(#view_seat_config.sc-compact:not(.hidden)) > main,
body.amt-compact-mode:has(#view_seat_config:not(.hidden)) > main,
body:has(#view_seat_config.sc-compact:not(.hidden)) > main {
  padding: 5px 7px 46px !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

body.amt-compact-mode #view_seat_config,
#view_seat_config.sc-compact {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  box-sizing: border-box !important;
}

body.amt-compact-mode #view_seat_config > *,
#view_seat_config.sc-compact > *,
body.amt-compact-mode .sc_layout_pane > *,
.sc_layout_pane > * {
  margin: 0 !important;
  min-width: 0;
}

body.amt-compact-mode .sc_layout_pane:not([hidden]):not(.hidden),
#view_seat_config.sc-compact .sc_layout_pane:not([hidden]):not(.hidden),
.sc_layout_pane:not([hidden]):not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

body.amt-compact-mode .sc_layout_pane[hidden],
body.amt-compact-mode .sc_layout_pane.hidden,
#view_seat_config.sc-compact .sc_layout_pane[hidden],
#view_seat_config.sc-compact .sc_layout_pane.hidden,
.sc_layout_pane[hidden],
.sc_layout_pane.hidden {
  display: none !important;
}

.sc-source {
  display: none !important;
}


