:root {
  color-scheme: light;
  --canvas: #f3f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #18212b;
  --ink-soft: #4c5968;
  --muted: #748191;
  --line: #dbe2e8;
  --line-strong: #c7d1da;
  --nav: #202a35;
  --green: #84bd32;
  --green-dark: #5f951a;
  --green-soft: #edf7df;
  --blue: #147ca8;
  --blue-soft: #e8f4f8;
  --red: #c8424b;
  --red-soft: #fcebed;
  --amber: #a86d0c;
  --amber-soft: #fff6dc;
  --shadow: 0 8px 30px rgba(26, 39, 52, 0.08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(20, 124, 168, 0.2); outline-offset: 2px; }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; line-height: 1.16; letter-spacing: 0; }
h2 { margin-bottom: 4px; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
h3 { font-size: 15px; letter-spacing: 0; }

.eyebrow { margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.status-text { color: var(--muted); font-size: 13px; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--nav);
  color: white;
}

.brand-lockup, .login-brand, .mobile-brand { display: inline-flex; align-items: center; color: white; text-decoration: none; }
.brand-logo-image { display: block; width: 146px; height: auto; object-fit: contain; }
.brand-lockup { flex-direction: column; gap: 3px; }
.brand-lockup small, .login-brand small, .mobile-brand small { color: #9eabb8; font-size: 9px; font-weight: 650; line-height: 1; text-transform: uppercase; letter-spacing: 0.08em; }

.primary-nav { height: 68px; display: flex; align-items: stretch; gap: 18px; }
.primary-nav a { position: relative; display: inline-flex; align-items: center; padding: 0 6px; color: #c7d1db; font-size: 13px; text-decoration: none; }
.primary-nav a.active { color: white; }
.primary-nav a.active::after { content: ""; position: absolute; inset: auto 6px 0; height: 3px; background: var(--green); }

.account-menu { position: relative; }
.avatar-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--green); color: white; font-weight: 750; line-height: 1; cursor: pointer; }
.avatar-button span { display: block; line-height: 1; }
.account-dropdown { position: absolute; top: 48px; right: 0; width: 230px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); box-shadow: var(--shadow); }
.account-summary { display: grid; gap: 3px; padding: 10px 11px 12px; border-bottom: 1px solid var(--line); }
.account-summary strong { font-size: 13px; }
.account-summary span { color: var(--muted); font-size: 11px; }
.menu-action { width: 100%; margin-top: 6px; padding: 10px 11px; border: 0; border-radius: 5px; background: transparent; color: var(--red); text-align: left; cursor: pointer; }
.menu-action:hover { background: var(--red-soft); }
.mobile-menu-link { display: none; padding: 10px 11px; border-radius: 5px; color: var(--ink); font-size: 12px; text-decoration: none; }
.mobile-menu-link:hover { background: var(--surface-soft); }

.app-main { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 60px; }
.narrow-main { width: min(1120px, calc(100% - 40px)); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 14px; }
.compact-heading { align-items: center; }
.title-with-help { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.title-with-help h1 { margin-bottom: 0; }
.page-heading-tools { position: relative; display: flex; align-items: center; gap: 10px; }
.help-popover { position: relative; }
.help-popover > summary { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: white; color: var(--blue); font-size: 14px; font-weight: 800; cursor: pointer; list-style: none; }
.help-popover > summary::-webkit-details-marker { display: none; }
.help-popover[open] > summary { border-color: var(--blue); background: var(--blue-soft); }
.help-popover-panel { position: absolute; z-index: 25; top: 40px; right: 0; width: min(460px, calc(100vw - 32px)); padding: 17px 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.help-popover-panel > strong { display: block; margin-bottom: 10px; font-size: 14px; }
.title-help-popover .help-popover-panel { right: auto; left: 0; }
.help-popover-panel ol { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.help-window-note { margin-top: 12px; padding: 10px 11px; border-radius: 5px; background: var(--blue-soft); color: #0e698e; font-size: 10px; line-height: 1.45; }
.help-window-note > strong { display: block; margin-bottom: 5px; font-size: 11px; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--blue); font-size: 13px; font-weight: 650; text-decoration: none; }

.surface { margin-bottom: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 1px 2px rgba(24, 33, 43, 0.03); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.primary-button, .secondary-button, .danger-button, .icon-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border-radius: 5px; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: #fff; }
.primary-button:hover { border-color: var(--green-dark); background: var(--green-dark); }
.secondary-button { border: 1px solid var(--line-strong); background: white; color: var(--ink); }
.secondary-button:hover { border-color: #99aab8; background: var(--surface-soft); }
.danger-button { border: 1px solid #e3b2b6; background: white; color: var(--red); }
.icon-button { width: 36px; min-height: 36px; padding: 0; border: 1px solid var(--line); background: white; color: var(--ink-soft); font-size: 22px; }
.large-button { min-height: 46px; padding-inline: 22px; }
button:disabled { cursor: not-allowed; opacity: 0.48; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
.stat-strip article { min-height: 90px; display: flex; flex-direction: column-reverse; justify-content: center; gap: 6px; padding: 18px 22px; border-right: 1px solid var(--line); }
.stat-strip article:last-child { border-right: 0; }
.stat-strip span { color: var(--muted); font-size: 12px; }
.stat-strip strong { font-size: 25px; font-weight: 650; }

.search-field { width: 240px; min-width: 240px; display: block; }
.search-field input { min-height: 40px; padding: 9px 13px; border-color: var(--line); border-radius: 6px; background: var(--surface-soft); font-size: 13px; }
.search-field input::placeholder { color: #8a96a3; }
.search-field input:focus { background: white; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: #9cabb8; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(20, 124, 168, 0.1); }
label > span, .read-only-field > span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
label > span small { margin-left: 4px; color: var(--muted); font-weight: 400; }

.upload-surface { border-top: 3px solid var(--green); }
.structure-guide { display: grid; grid-template-columns: 1fr 50px 1fr; align-items: center; max-width: 720px; margin: 0 auto 20px; }
.structure-guide > div { min-height: 74px; display: grid; grid-template-columns: auto 1fr; align-content: center; column-gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.structure-guide strong { font-size: 13px; }
.structure-guide small { grid-column: 2; color: var(--muted); font-size: 11px; }
.folder-icon { grid-row: 1 / span 2; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 750; }
.connector-line { height: 1px; background: var(--line-strong); }
.folder-dropzone { min-height: 160px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #9eafbd; border-radius: 7px; background: #fbfdfe; cursor: pointer; }
.folder-dropzone:hover { border-color: var(--blue); background: #f6fbfd; }
.folder-dropzone.disabled-dropzone { border-color: var(--line); background: #f4f6f8; cursor: not-allowed; opacity: 0.66; pointer-events: none; }
.folder-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.folder-dropzone small { max-width: 580px; color: var(--muted); text-align: center; }
.upload-glyph { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 24px; font-weight: 300; }
.upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.feedback-list { display: grid; gap: 8px; margin-top: 14px; }
.feedback-item { padding: 10px 12px; border-radius: 5px; font-size: 12px; }
.feedback-item.error { background: var(--red-soft); color: #8c2730; }
.feedback-item.warning { background: var(--amber-soft); color: #7e540e; }
.feedback-item.success { background: var(--green-soft); color: #476f15; }

.package-list, .deployment-list { display: grid; gap: 10px; }
.package-row,
.package-row.deployed-package-row { display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.8fr) repeat(3, minmax(82px, 0.5fr)) 510px; align-items: center; gap: 18px; min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.package-row:hover { border-color: #bac6cf; box-shadow: 0 5px 18px rgba(24, 33, 43, 0.05); }
.package-row.live-active { border-color: #79b9d2; box-shadow: inset 3px 0 0 var(--blue), 0 5px 18px rgba(15, 113, 153, 0.08); }
.package-row.historical-active { border-color: #d6b56b; box-shadow: inset 3px 0 0 #c58a18, 0 5px 18px rgba(197, 138, 24, 0.09); }
.package-identity { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; }
.package-identity > span:last-child { min-width: 0; display: grid; gap: 3px; }
.package-symbol { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 5px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 750; }
.package-identity strong, .package-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.package-identity strong { font-size: 14px; }
.package-identity span { color: var(--muted); font-size: 11px; }
.template-name-line { display: flex; align-items: center; gap: 6px; color: var(--ink) !important; }
.edit-template-button { flex: 0 0 auto; width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--blue); font: 600 17px/1 inherit; cursor: pointer; }
.edit-template-button:hover { background: var(--blue-soft); }
.edit-template-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.package-metric { display: grid; gap: 3px; }
.package-metric strong { font-size: 14px; }
.uploaded-metric strong { font-size: 12px; line-height: 1.3; }
.package-metric span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.row-actions { display: grid; align-items: center; justify-content: end; gap: 8px; }
.template-actions { grid-template-columns: 82px 92px; }
.attention-actions { grid-template-columns: 124px 132px 118px; }
.deployed-actions { grid-template-columns: 112px 124px 132px 118px; }
.row-actions .action-nowrap { white-space: nowrap; }
.row-actions .status-badge { width: 100%; white-space: nowrap; }
.status-badge { min-height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 750; text-transform: capitalize; }
.status-badge.ready, .status-badge.deployed, .status-badge.completed, .status-badge.configured { background: var(--green-soft); color: #4b7716; }
.status-badge.deploying, .status-badge.running { background: var(--blue-soft); color: #0e698e; }
.live-running-badge::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #0c91c6; box-shadow: 0 0 0 3px rgba(12, 145, 198, 0.14); }
.live-active-button { box-shadow: 0 0 0 3px rgba(126, 196, 36, 0.16); }
.historical-running-badge::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #c58a18; box-shadow: 0 0 0 3px rgba(197, 138, 24, 0.14); }
.historical-active-button { box-shadow: 0 0 0 3px rgba(197, 138, 24, 0.16); }
.status-badge.failed, .status-badge.needs-attention { background: var(--red-soft); color: #9a2d36; }
.status-badge.neutral { background: #edf0f3; color: #596675; }
.attention-control { border: 0; font-family: inherit; cursor: pointer; }
.attention-control:hover { box-shadow: inset 0 0 0 1px #d88990; }
.attention-control:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.remove-deployment-button { border-color: #e3b2b6; color: var(--red); }
.remove-deployment-button:hover { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.empty-state { padding: 40px 20px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); text-align: center; }

.package-dialog { width: min(760px, calc(100% - 32px)); max-height: min(780px, calc(100vh - 40px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: white; color: var(--ink); box-shadow: 0 24px 70px rgba(17, 27, 38, 0.24); }
.package-dialog::backdrop { background: rgba(19, 29, 40, 0.58); }
.template-form-dialog { width: min(820px, calc(100% - 32px)); }
.compact-dialog { width: min(580px, calc(100% - 32px)); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.dialog-heading > div { min-width: 0; }
.dialog-heading h2 { margin: 10px 0 4px; font-size: 22px; }
.dialog-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.package-issue-content { max-height: 430px; overflow-y: auto; padding: 22px 26px; }
.issue-summary { display: grid; gap: 7px; padding: 15px 17px; border-left: 3px solid var(--red); background: var(--red-soft); }
.issue-summary span { color: #8c2730; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.issue-summary strong { font-size: 14px; line-height: 1.5; }
.issue-summary.remove-summary { border-left-color: var(--amber); background: var(--amber-soft); }
.issue-summary.remove-summary span { color: #7e540e; }
.issue-section { margin-top: 22px; }
.issue-section h3 { margin: 0 0 10px; font-size: 13px; }
.issue-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.issue-timeline li { position: relative; display: grid; gap: 3px; min-height: 45px; padding: 1px 0 12px 24px; }
.issue-timeline li::before { content: ""; position: absolute; top: 5px; left: 3px; width: 9px; height: 9px; border-radius: 50%; background: #a8b4bf; }
.issue-timeline li::after { content: ""; position: absolute; top: 15px; bottom: 0; left: 7px; width: 1px; background: var(--line); }
.issue-timeline li:last-child::after { display: none; }
.issue-timeline li.completed::before { background: var(--green); }
.issue-timeline li.failed::before { background: var(--red); }
.issue-timeline li.running::before { background: var(--blue); }
.issue-timeline span { font-size: 12px; font-weight: 700; }
.issue-timeline small, .muted-copy { color: var(--muted); font-size: 11px; line-height: 1.45; }
.issue-log { max-height: 150px; overflow: auto; margin: 0; padding: 13px 15px; border-radius: 5px; background: #17232f; color: #d8e8df; font: 11px/1.55 Consolas, monospace; white-space: pre-wrap; }
.dialog-loading { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.inline-spinner { width: 16px; height: 16px; display: inline-block; border: 2px solid rgba(20, 124, 168, 0.22); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.75s linear infinite; }
.dialog-note { margin: 0 26px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 26px 22px; }
.template-dialog-actions { align-items: center; }
.template-dialog-actions .status-text { margin-right: auto; }
.template-form-content { display: grid; gap: 20px; }
.template-name-field { display: grid; gap: 8px; }
.template-name-field > span { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.template-name-field > span b, .folder-dropzone strong b { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 10px; }
.field-feedback { display: block; min-height: 16px; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.field-feedback.success { color: #4b7716; }
.field-feedback.error { color: var(--red); }
.field-feedback.checking { color: var(--blue); }
.compact-structure-guide { margin: 2px 0 0; }
.template-format-guide { display: grid; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.format-guide-heading { display: grid; gap: 5px; }
.format-guide-heading > strong { font-size: 13px; }
.format-guide-heading > small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.format-folder-tree { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.format-root, .format-branch { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: start; column-gap: 11px; }
.format-root { grid-column: 1 / -1; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.format-root > strong { font-size: 12px; }
.format-root > small { grid-column: 2; color: var(--muted); font-size: 10px; }
.format-branch > div { display: grid; gap: 5px; min-width: 0; }
.format-branch code { width: fit-content; padding: 2px 5px; border-radius: 3px; background: #e9eef2; color: var(--ink); font: 700 11px/1.4 Consolas, monospace; }
.format-branch strong { font-size: 11px; }
.format-branch small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.format-branch small code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.format-branch:last-child { padding-left: 16px; border-left: 1px solid var(--line); }
.format-rule { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; }
.format-rule b { color: var(--ink); }

.deployment-overview { border-left: 3px solid var(--blue); }
.target-grid { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); gap: 12px; }
.read-only-field { min-height: 70px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.read-only-field strong { font-size: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice-card { min-height: 88px; display: flex; align-items: flex-start; gap: 11px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.choice-card:hover, .choice-card.selected { border-color: var(--blue); background: var(--blue-soft); }
.choice-card input { width: 16px; min-height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.choice-card span { display: grid; gap: 5px; }
.choice-card strong { font-size: 13px; }
.choice-card small { color: var(--muted); line-height: 1.35; }
.file-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.file-check { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; }
.file-check input { width: 16px; min-height: 16px; }
.file-check span { margin: 0; }
.advanced-box { margin-top: 16px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; }
.advanced-box summary { padding: 13px 0; color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
.short-field { display: block; max-width: 260px; padding: 0 0 14px; }
.input-suffix { display: flex; }
.input-suffix input { border-radius: 5px 0 0 5px; }
.input-suffix i { min-width: 42px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 5px 5px 0; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-style: normal; }
.deploy-action-bar { position: sticky; bottom: 16px; z-index: 20; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin: 20px 0; padding: 15px 18px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,0.97); box-shadow: var(--shadow); }
.deploy-action-bar > div { display: grid; gap: 3px; }
.deploy-action-bar span { color: var(--muted); font-size: 11px; }

.deployment-setup { margin-top: 20px; }
.deployment-setup > summary { min-height: 62px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; margin-bottom: 0; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; cursor: pointer; list-style: none; }
.deployment-setup > summary::-webkit-details-marker { display: none; }
.deployment-setup > summary > span:first-child { display: grid; gap: 3px; }
.deployment-setup > summary strong { font-size: 14px; }
.deployment-setup > summary small { color: var(--muted); font-size: 11px; }
.deployment-setup > summary::after { content: "+"; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); font-size: 18px; line-height: 1; }
.deployment-setup[open] > summary::after { content: "-"; }
.deployment-setup[open] > summary { margin-bottom: 16px; border-color: #aebdc8; }
.deployment-active .deployment-setup > summary { border-color: #b8d8e5; background: var(--blue-soft); }
.setup-summary-action { color: var(--blue); font-size: 11px; font-weight: 700; }
.deployment-setup-content { min-width: 0; }
.deployment-setup-content > :last-child { margin-bottom: 0; }
.deployment-setup input:disabled { color: var(--muted); background: var(--surface-soft); cursor: not-allowed; }

.progress-surface { border-top: 3px solid var(--blue); box-shadow: var(--shadow); }
.progress-heading { align-items: flex-start; }
.progress-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.active-operation { display: flex; align-items: center; gap: 11px; margin: -4px 0 16px; padding: 12px 14px; border: 1px solid #cce1e9; border-radius: 6px; background: var(--blue-soft); }
.active-operation > span:last-child { display: grid; gap: 3px; }
.active-operation strong { color: #0e698e; font-size: 12px; }
.active-operation small { color: var(--muted); font-size: 10px; }
.provisioning-notice { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 11px; margin: -5px 0 16px; padding: 13px 14px; border: 1px solid #ead6aa; border-left: 3px solid var(--amber); border-radius: 6px; background: #fffaf0; }
.provisioning-notice[hidden] { display: none; }
.provisioning-notice > span:last-child { display: grid; gap: 4px; }
.provisioning-notice strong { color: #6f4a0b; font-size: 12px; }
.provisioning-notice small { color: #715f40; font-size: 10px; line-height: 1.45; }
.notice-symbol { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #f3dfb4; color: #704909; font: 700 13px/1 Georgia, serif; }
.ade-deployment-notice { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 11px; margin-top: 16px; padding: 14px; border: 1px solid #b8d8e5; border-left: 3px solid var(--blue); border-radius: 6px; background: var(--blue-soft); }
.ade-deployment-notice > div { display: grid; gap: 5px; }
.ade-deployment-notice > div > strong { color: #0e698e; font-size: 13px; }
.ade-deployment-notice p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.ade-deployment-notice .notice-symbol { background: #cfe8f1; color: #0e698e; }
.ade-window-list { display: grid; gap: 5px; }
.ade-window-list span { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 10px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.ade-window-list strong { color: var(--ink); }
.operation-spinner, .mini-spinner { display: inline-block; border-radius: 50%; border: 2px solid rgba(20, 124, 168, 0.22); border-top-color: var(--blue); animation: spin 0.75s linear infinite; }
.operation-spinner { width: 20px; height: 20px; flex: 0 0 20px; }
.mini-spinner { width: 12px; height: 12px; }
.job-completed .operation-spinner, .job-failed .operation-spinner, .job-stopped .operation-spinner { display: none; }
.job-completed .active-operation { border-color: #cfe3b3; background: var(--green-soft); }
.job-completed .active-operation strong { color: #4b7716; }
.job-failed .active-operation { border-color: #efc7ca; background: var(--red-soft); }
.job-failed .active-operation strong { color: #9a2d36; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e7edf1; }
.progress-track.large { height: 12px; }
.progress-track > div { width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 0.25s ease; }
.progress-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 18px 0; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.progress-metrics.compact { grid-template-columns: repeat(2, 1fr); }
.progress-metrics > div { display: grid; gap: 3px; padding: 13px; background: white; }
.progress-metrics strong { font-size: 19px; }
.progress-metrics span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.timeline { display: grid; margin-top: 20px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; padding: 0 0 18px; }
.timeline-item::before { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { z-index: 1; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e9eef2; color: var(--muted); font-size: 10px; font-weight: 750; }
.timeline-item.completed .timeline-dot { background: var(--green-soft); color: var(--green-dark); }
.timeline-item.running .timeline-dot { background: var(--blue-soft); color: var(--blue); }
.timeline-item.failed .timeline-dot { background: var(--red-soft); color: var(--red); }
.timeline-copy { display: grid; gap: 3px; padding-top: 2px; }
.timeline-copy strong { font-size: 13px; }
.timeline-copy span { color: var(--muted); font-size: 11px; }
.timeline-state { padding-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.activity-details { margin-top: 8px; border-top: 1px solid var(--line); }
.activity-details summary { padding: 14px 0 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
pre { max-height: 240px; overflow: auto; margin: 0; padding: 13px; border-radius: 5px; background: #18212b; color: #d8e2e9; font: 11px/1.55 Consolas, monospace; white-space: pre-wrap; }
.completion-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ade-history-surface { border-top: 3px solid var(--blue); }
.ade-history-list { display: grid; gap: 10px; }
.ade-history-item { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.ade-history-item > summary { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto 18px; gap: 18px; align-items: center; padding: 15px 17px; cursor: pointer; list-style: none; }
.ade-history-item > summary::-webkit-details-marker { display: none; }
.ade-history-run, .ade-history-duration { display: grid; gap: 3px; min-width: 0; }
.ade-history-run strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ade-history-run small, .ade-history-duration small { color: var(--muted); font-size: 10px; }
.ade-history-workbook { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue) !important; font-weight: 650; }
.ade-history-duration strong { font-size: 13px; }
.ade-history-chevron { color: var(--muted); font-size: 18px; transition: transform 0.18s ease; }
.ade-history-item[open] .ade-history-chevron { transform: rotate(180deg); }
.ade-history-body { padding: 0 17px 17px; border-top: 1px solid var(--line); }
.ade-history-artifact { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f7fafc; }
.ade-history-artifact > span { min-width: 0; display: grid; gap: 4px; }
.ade-history-artifact small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.ade-history-artifact strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ade-history-body .timeline { margin-top: 17px; }
.ade-history-error { margin: 0; padding: 11px 17px; border-top: 1px solid #efc7ca; background: var(--red-soft); color: var(--red); font-size: 11px; line-height: 1.45; }

.guide-main { width: min(1180px, calc(100% - 40px)); }
.guide-heading { align-items: center; }
.guide-jump-nav { position: sticky; top: 80px; z-index: 15; display: flex; gap: 4px; margin: 0 0 20px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,0.96); box-shadow: 0 4px 16px rgba(26,39,52,0.06); }
.guide-jump-nav a { flex: 1 0 auto; padding: 9px 12px; border-radius: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 700; text-align: center; text-decoration: none; }
.guide-jump-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.guide-overview { border-top: 3px solid var(--green); }
.guide-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.guide-flow article { min-height: 135px; display: grid; align-content: start; gap: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.guide-flow article > span, .guide-step-heading > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 13px; font-weight: 800; }
.guide-flow strong { font-size: 13px; }
.guide-flow small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.guide-step { scroll-margin-top: 148px; }
.guide-step-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.guide-step-heading > span { flex: 0 0 30px; margin-top: 2px; background: var(--blue); }
.guide-step-heading .eyebrow { margin-bottom: 4px; }
.guide-step-heading h2 { font-size: 20px; }
.guide-step-heading p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.guide-columns, .guide-training-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-columns h3 { margin: 0 0 10px; }
.guide-checklist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.guide-checklist li { position: relative; padding-left: 23px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.guide-checklist li::before { content: "✓"; position: absolute; top: 0; left: 0; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-size: 10px; font-weight: 800; }
.guide-checklist.critical li::before { content: "!"; background: var(--amber-soft); color: var(--amber); }
.guide-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.guide-action > div { display: grid; gap: 3px; }
.guide-action strong { font-size: 12px; }
.guide-action span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.guide-numbered { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.guide-numbered li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-numbered li:last-child { border-bottom: 0; }
.guide-numbered li > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; }
.guide-numbered li > div { display: grid; gap: 3px; padding-top: 2px; }
.guide-numbered strong { font-size: 12px; }
.guide-numbered p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.guide-numbered.compact { margin-top: 14px; }
.guide-callout { display: grid; gap: 4px; margin-top: 18px; padding: 13px 15px; border-left: 3px solid var(--blue); border-radius: 5px; background: var(--blue-soft); }
.guide-callout.warning { border-left-color: var(--amber); background: var(--amber-soft); }
.guide-callout strong { font-size: 12px; }
.guide-callout span { color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.guide-training-grid article, .guide-mode-card { padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.guide-training-grid h3 { margin: 12px 0 6px; }
.guide-training-grid p, .guide-mode-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.guide-mode-card { display: grid; align-content: start; gap: 10px; }
.guide-mode-card h3 { margin: 0; }
.guide-mode-card .secondary-button { width: fit-content; margin-top: 4px; }
.guide-table-wrap { overflow-x: auto; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.guide-table th { padding: 10px 12px; border-bottom: 2px solid var(--line); color: var(--ink); text-align: left; }
.guide-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); line-height: 1.45; vertical-align: top; }
.guide-table td:first-child { color: var(--ink); font-weight: 700; }
.guide-security-note { border-left: 3px solid var(--blue); }
.guide-security-note > div { display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: start; }
.guide-security-note > div > div { display: grid; gap: 4px; }
.guide-security-note strong { font-size: 13px; }
.guide-security-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.simulation-layout, .live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.progress-sidebar { position: sticky; top: 88px; }
.connection-surface { border-top: 3px solid var(--blue); }
.connection-surface textarea { min-height: 86px; resize: vertical; }
.connection-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 14px; }
.connection-actions .primary-button { min-width: 190px; }
.inline-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 650; white-space: nowrap; }
.inline-toggle input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--green); }
.inline-toggle span { margin: 0; }
.segmented-tabs { width: fit-content; display: flex; margin: 0 0 20px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; }
.segmented-tabs button { min-width: 150px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-soft); font-weight: 700; font-size: 12px; cursor: pointer; }
.segmented-tabs button.active { background: var(--nav); color: white; }
.manual-mode-panel { margin-bottom: 0; }
.manual-live-toolbar { grid-template-columns: minmax(180px, 1fr) 150px repeat(4, auto); }
.historical-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.historical-package-files { display: grid; gap: 9px; margin-bottom: 18px; }
.historical-file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 190px; align-items: center; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.historical-file-row.selected { border-color: #b5c9d5; background: #fbfdfe; }
.historical-file-choice { min-width: 0; display: flex; align-items: center; gap: 11px; cursor: pointer; }
.historical-file-choice input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue); }
.historical-file-choice span { min-width: 0; display: grid; gap: 3px; }
.historical-file-choice strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.historical-file-choice small { color: var(--muted); font-size: 10px; }
.historical-all-rows { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.historical-all-rows input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue); }
.historical-all-rows span { margin: 0; }
.historical-file-limit-field { display: grid; grid-template-columns: auto minmax(70px, 1fr); align-items: center; gap: 9px; }
.historical-file-limit-field > span { margin: 0; color: var(--muted); font-size: 10px; white-space: nowrap; }
.historical-file-limit { min-height: 36px; }
.historical-run-bar { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.historical-run-bar > label { width: min(280px, 100%); }
.historical-run-actions, .historical-bulk-actions > div { display: flex; align-items: center; gap: 10px; }
.historical-bulk-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 2px 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.text-button { border: 0; background: transparent; color: var(--blue); padding: 4px 2px; font: inherit; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.text-button:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.random-mode-button.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(20, 124, 168, 0.12); }
.live-source-tabs { margin-bottom: 14px; }
.csv-live-panel { display: grid; gap: 18px; }
.csv-live-panel[hidden] { display: none; }
.live-csv-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card.disabled { cursor: not-allowed; opacity: .55; }
.live-package-csv-panel[hidden], .live-package-csv-panel + [hidden] { display: none; }
.live-package-csv-files { display: grid; gap: 9px; }
.live-package-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; background: var(--surface-soft); }
.live-package-file:hover, .live-package-file.selected { border-color: var(--blue); background: var(--blue-soft); }
.live-package-file input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue); }
.live-package-file span { display: grid; gap: 4px; min-width: 0; }
.live-package-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-package-file small { color: var(--muted); }
.live-package-file i { padding: 5px 9px; border-radius: 999px; color: var(--success-text); background: var(--success-soft); font-size: 10px; font-style: normal; text-transform: uppercase; }
.empty-inline { padding: 18px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.live-csv-upload { margin-bottom: 0; }
.csv-live-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.csv-live-summary > div { display: grid; gap: 3px; padding: 12px 14px; background: var(--surface-soft); }
.csv-live-summary > div + div { border-left: 1px solid var(--line); }
.csv-live-summary strong { font-size: 15px; }
.csv-live-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.csv-live-advanced { margin-top: 0; }
.csv-live-options { margin: 0; padding-top: 14px; }
.csv-live-options label { display: grid; gap: 6px; }
.csv-live-options small { color: var(--muted); font-size: 10px; }
.file-upload { min-height: 100px; display: grid; place-items: center; align-content: center; gap: 4px; margin-bottom: 18px; border: 1px dashed var(--line-strong); border-radius: 6px; background: var(--surface-soft); cursor: pointer; }
.file-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-upload span { margin: 0; color: var(--blue); font-size: 13px; }
.file-upload small { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.live-toolbar { display: grid; grid-template-columns: 1fr 150px auto auto auto auto; align-items: end; gap: 10px; }
.live-toolbar > div:first-child { display: grid; gap: 4px; }
.live-toolbar > div:first-child span { color: var(--muted); font-size: 11px; }
.interval-control { display: block; }
.modern-sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slider-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.slider-card header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.slider-card header span { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); font-size: 11px; font-weight: 650; white-space: nowrap; }
.slider-card output { color: var(--blue); font-size: 12px; font-weight: 750; }
.slider-card input[type="range"] { min-height: 18px; padding: 0; border: 0; accent-color: var(--green); }
.payload-preview, .event-feed { display: grid; gap: 7px; margin-top: 16px; }
.payload-preview > span, .event-feed > span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.event-log { max-height: 230px; overflow: auto; display: grid; gap: 1px; padding: 7px 0; border-top: 1px solid var(--line); }
.event-log p { margin: 0; padding: 7px 4px; border-bottom: 1px solid #edf1f3; color: var(--ink-soft); font: 11px/1.4 Consolas, monospace; }

.ade-environment-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 0; overflow: hidden; background: var(--line); }
.ade-environment-strip > div { min-width: 0; display: grid; gap: 5px; padding: 17px 20px; background: white; }
.ade-environment-strip span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.ade-environment-strip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ade-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.ade-workbook-surface .file-upload { margin-top: 4px; }
.ade-validation-message { margin: 4px 0 16px; padding: 12px 14px; border-left: 3px solid var(--line-strong); border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.ade-validation-message.success { border-color: var(--green); background: var(--green-soft); color: var(--success-text); }
.ade-validation-message.error { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.ade-workbook-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ade-stat-strip { margin-bottom: 18px; }
.ade-group-list { display: grid; gap: 9px; }
.ade-group-card { display: grid; grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr); align-items: center; gap: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.ade-group-card > div:first-child { min-width: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px 10px; }
.ade-group-card > div:first-child > small { grid-column: 1 / -1; color: var(--muted); }
.ade-group-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ade-group-metrics span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ade-group-metrics strong { color: var(--ink); }
.ade-start-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.ade-start-bar > div { display: grid; gap: 4px; }
.ade-start-bar span { color: var(--muted); font-size: 11px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; max-width: 420px; padding: 13px 16px; border-radius: 6px; background: var(--nav); color: white; box-shadow: var(--shadow); font-size: 12px; }
.toast.error { background: #8d2931; }

.login-page { overflow: hidden; background: white; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr); }
.login-brand-panel { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 54px 64px 44px; overflow: hidden; background: var(--nav); color: white; }
.login-brand, .login-message-block { position: relative; z-index: 1; }
.login-brand { width: fit-content; flex-direction: column; align-items: flex-start; gap: 7px; }
.login-brand .brand-logo-image { width: 215px; }
.login-brand > small { align-self: center; }
.login-message-block { max-width: 560px; margin-block: auto; }
.login-message-block .eyebrow { color: var(--green); }
.login-message-block h1 { margin-bottom: 18px; font-size: clamp(42px, 4.4vw, 68px); line-height: 1.03; font-weight: 650; }
.login-message-block > p:last-child { max-width: 510px; color: #b7c2cc; font-size: 16px; line-height: 1.65; }
.login-form-panel { display: grid; place-items: center; padding: 40px; background: #f7f9fa; }
.login-card { width: min(100%, 430px); }
.login-card h2 { margin-bottom: 7px; font-size: 31px; }
.login-disclaimer { margin-bottom: 30px; color: var(--muted); font-size: 14px; }
.login-card label { display: block; margin-bottom: 17px; }
.login-card input { min-height: 50px; background: white; }
.login-submit { width: 100%; min-height: 50px; justify-content: space-between; margin-top: 5px; padding-inline: 18px; }
.login-submit i { font-size: 18px; font-style: normal; }
.form-message { min-height: 20px; margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.form-message.error { color: var(--red); }
.environment-note { display: flex; align-items: center; gap: 7px; margin-top: 22px; color: var(--muted); font-size: 11px; }
.environment-note span { width: 7px; height: 7px; margin: 0; border-radius: 50%; background: var(--green); }
.mobile-brand { display: none; flex-direction: column; align-items: center; gap: 6px; width: fit-content; margin-bottom: 28px; padding: 13px 15px 11px; border-radius: 4px; background: var(--nav); color: white; }
.mobile-brand .brand-logo-image { width: 172px; }

@media (max-width: 1040px) {
  .target-grid { grid-template-columns: repeat(2, 1fr); }
  .simulation-layout, .live-layout { grid-template-columns: 1fr; }
  .progress-sidebar { position: static; }
  .live-toolbar { grid-template-columns: 1fr 140px repeat(2, auto); }
  .package-row,
  .package-row.deployed-package-row { grid-template-columns: minmax(220px, 1fr) 510px; }
  .package-row .package-metric { display: none; }
  .guide-flow { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .app-header { grid-template-columns: 1fr auto; gap: 12px; min-height: 62px; padding: 0 16px; }
  .primary-nav { display: none; }
  .mobile-menu-link { display: block; }
  .app-main, .narrow-main { width: min(100% - 24px, 1380px); padding-top: 22px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading-tools { width: 100%; justify-content: space-between; }
  .help-popover-panel { position: fixed; top: 78px; right: 12px; left: 12px; width: auto; max-height: calc(100vh - 96px); overflow: auto; }
  .page-heading .primary-button, .page-heading .secondary-button { width: 100%; }
  h1 { font-size: 25px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip article:nth-child(2) { border-right: 0; }
  .stat-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .surface { padding: 17px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .search-field { min-width: 0; width: 100%; }
  .connection-actions { grid-template-columns: 1fr; }
  .connection-actions .primary-button { width: 100%; }
  .segmented-tabs { width: 100%; }
  .segmented-tabs button { min-width: 0; flex: 1; }
  .live-csv-source-grid, .csv-live-summary, .csv-live-options { grid-template-columns: 1fr; }
  .ade-environment-strip, .ade-source-grid, .ade-group-card, .ade-group-metrics, .ade-start-bar { grid-template-columns: 1fr; }
  .ade-workbook-actions { display: grid; grid-template-columns: 1fr; }
  .ade-workbook-actions a, .ade-workbook-actions button, .ade-start-bar button { width: 100%; }
  .ade-window-list span { grid-template-columns: 1fr; gap: 2px; }
  .guide-jump-nav { top: 70px; }
  .guide-flow, .guide-columns, .guide-training-grid { grid-template-columns: 1fr; }
  .guide-flow article { min-height: 0; }
  .guide-action { align-items: stretch; flex-direction: column; }
  .guide-action .secondary-button { width: 100%; }
  .csv-live-summary > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .structure-guide { grid-template-columns: 1fr; gap: 8px; }
  .format-folder-tree { grid-template-columns: 1fr; }
  .format-root { grid-column: 1; }
  .format-branch:last-child { padding-left: 0; border-left: 0; }
  .connector-line { width: 1px; height: 18px; justify-self: center; }
  .package-row, .package-row.deployed-package-row { grid-template-columns: 1fr auto; gap: 12px; }
  .package-row .package-metric { display: none; }
  .row-actions { grid-column: 1 / -1; justify-content: stretch; }
  .template-actions { grid-template-columns: 1fr 1fr; }
  .attention-actions,
  .deployed-actions { grid-template-columns: 1fr 1fr; }
  .attention-actions .status-badge,
  .deployed-actions .status-badge { grid-column: 1 / -1; }
  .row-actions a, .row-actions button { width: 100%; }
  .package-dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); }
  .dialog-heading, .package-issue-content { padding-inline: 18px; }
  .dialog-note { margin-inline: 18px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; padding-inline: 18px; }
  .template-dialog-actions .status-text { margin: 0 0 4px; text-align: center; }
  .dialog-actions a, .dialog-actions button { width: 100%; }
  .target-grid, .choice-grid, .file-selector, .form-row, .modern-sliders { grid-template-columns: 1fr; }
  .historical-file-row { grid-template-columns: 1fr; gap: 10px; }
  .historical-run-bar { align-items: stretch; flex-direction: column; }
  .historical-run-bar > label, .historical-run-actions, .historical-run-actions button { width: 100%; }
  .historical-run-actions { flex-direction: column; }
  .deploy-action-bar { position: static; grid-template-columns: 1fr; }
  .deploy-action-bar button { width: 100%; }
  .progress-heading-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .progress-heading-actions .danger-button { flex-basis: 100%; }
  .progress-metrics { grid-template-columns: repeat(2, 1fr); }
  .ade-history-item > summary { grid-template-columns: minmax(0, 1fr) auto 18px; gap: 10px; }
  .ade-history-duration { display: none; }
  .live-toolbar { grid-template-columns: 1fr 1fr; align-items: end; }
  .live-toolbar > div:first-child { grid-column: 1 / -1; }
  .live-toolbar .interval-control { grid-column: 1 / -1; }
  .live-toolbar button { width: 100%; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 28px 22px; }
  .mobile-brand { display: flex; }
}
