:root {
  --navy: #0b1730;
  --navy-2: #111f3f;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe4ec;
  --soft: #f6f8fb;
  --panel: #ffffff;
  --blue: #4657ed;
  --blue-strong: #3043dd;
  --blue-soft: #eef1ff;
  --green: #15945f;
  --amber: #d88316;
  --red: #d44848;
  --purple: #8659e6;
  --sidebar-w: 224px;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html { background: #f4f6f9; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: #f4f6f9; font-family: "IBM Plex Sans", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 13px; color: #344054; background: #fff; font-weight: 600; cursor: pointer; transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease; }
button:hover { color: var(--blue); border-color: #aeb7ff; background: #f8f9ff; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: wait; transform: none; }
button.primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 6px 15px rgba(70,87,237,.18); }
button.primary:hover { color: #fff; border-color: var(--blue-strong); background: var(--blue-strong); }
.danger-subtle { color: #c83d43; border-color: #f1c6c8; background: #fffafa; }
.danger-subtle:hover { color: #ad252d; border-color: #e98e93; background: #fff2f2; }
.link-danger { min-height: 24px; margin-left: 6px; padding: 0 5px; color: #b4232d; border: 0; background: transparent; font-size: 11px; }
.link-danger:hover { color: #8f1720; background: #fff0f1; }
.hidden { display: none !important; }
.blue { color: #3b69ef !important; }.green { color: var(--green) !important; }.purple { color: var(--purple) !important; }.amber { color: var(--amber) !important; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar-w); display: flex; flex-direction: column; color: #dce5f7; background: linear-gradient(180deg, #0d1c39, #09152c 100%); box-shadow: 10px 0 30px rgba(10,20,42,.08); }
.brand { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #5265ff; font-size: 12px; font-weight: 800; letter-spacing: -.03em; }
.brand strong { color: #fff; font-size: 17px; white-space: nowrap; }
.side-nav { flex: 1; overflow: auto; padding: 15px 10px; }
.nav-item { position: relative; width: 100%; min-height: 44px; display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 9px; margin: 2px 0; padding: 0 12px; color: #b9c5dd; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.nav-item i { font-size: 19px; }.nav-item span { font-weight: 600; }.nav-item b { min-width: 22px; padding: 2px 6px; border-radius: 99px; color: #91a1c0; background: rgba(255,255,255,.08); font-size: 11px; text-align: center; }
.nav-item:hover { color: #fff; border: 0; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, #4657ed, #3647d7); box-shadow: 0 8px 20px rgba(47,62,211,.28); }
.nav-item.active b { color: #fff; background: rgba(255,255,255,.16); }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.system-state { display: flex; align-items: center; gap: 9px; padding: 9px; }.system-state b,.system-state small { display: block; }.system-state b { color: #f5f7ff; font-size: 12px; }.system-state small { margin-top: 2px; color: #8998b5; font-size: 11px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #36c988; box-shadow: 0 0 0 4px rgba(54,201,136,.12); }
.sidebar-action { width: 100%; justify-content: flex-start; color: #aebad1; border-color: transparent; background: transparent; }.sidebar-action:hover { color: #fff; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); }

.app-main { grid-column: 2; min-width: 0; }
.app-topbar { position: sticky; z-index: 12; top: 0; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px 26px; color: #fff; background: #0c1420; border-bottom: 1px solid #1f2937; }
.top-kicker { color: #8292ac; font-size: 10px; font-weight: 700; letter-spacing: .12em; }.app-topbar h1 { margin: 2px 0 0; font-size: 19px; font-weight: 600; }
.top-inventory { display: flex; align-items: stretch; gap: 0; }.top-inventory > div { min-width: 112px; display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; padding: 1px 16px; border-left: 1px solid #293344; }.top-inventory i { grid-row: 1 / 3; align-self: center; font-size: 20px; }.top-inventory span { color: #9ca8bb; font-size: 11px; }.top-inventory b { margin-top: 1px; font-size: 13px; }
.top-link { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 0 12px; color: #d7deeb; text-decoration: none; font-weight: 600; }.top-link:hover { color: #fff; }

.workspace { padding: 22px 24px 38px; }.tab-page { display: none; animation: page-in .18s ease; }.tab-page.active { display: block; } @keyframes page-in { from { opacity: 0; transform: translateY(3px); } }
.page-heading { min-height: 62px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }.page-heading > div > span,.section-head > div > span,.drawer-head > div > span { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }.page-heading h2 { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 24px; line-height: 1.2; }.page-heading p { margin: 0; color: var(--muted); }.count-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; color: #4c5dc5; border-radius: 99px; background: var(--blue-soft); font-size: 12px; font-style: normal; font-weight: 700; }

.surface { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }.surface + .surface,.split-grid + .surface { margin-top: 16px; }
.section-head { min-height: 38px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }.section-head h3 { margin: 3px 0 0; font-size: 17px; }.section-head p { margin: 3px 0 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }.metric-grid.compact { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric-card { min-height: 126px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto auto; align-items: center; padding: 16px; text-align: left; box-shadow: var(--shadow); }.metric-card > i { grid-row: 1/4; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #f3f5fb; font-size: 21px; }.metric-card span { color: var(--muted); font-size: 12px; }.metric-card b { color: var(--ink); font-size: 26px; }.metric-card small { color: #8993a5; font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }.quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.quick-actions button { min-height: 86px; display: grid; grid-template-columns: 32px 1fr; grid-template-rows: 1fr 1fr; align-items: center; text-align: left; }.quick-actions i { grid-row: 1/3; font-size: 22px; color: var(--blue); }.quick-actions b { color: var(--ink); }.quick-actions small { color: var(--muted); }
.compact-list { display: grid; }.compact-order { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid #edf0f5; }.compact-order:last-child { border: 0; }.compact-order b { font-size: 13px; }.compact-order span,.compact-order small { color: var(--muted); font-size: 11px; }.compact-order .status-pill { grid-row: 1/3; grid-column: 2; align-self: center; }

.table-surface { overflow: hidden; padding: 0; }.table-surface > .section-head { padding: 17px 17px 0; }.table-toolbar { display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }.table-toolbar .grow { flex: 1 1 440px; }.table-toolbar textarea { min-height: 58px; }
.search-box { flex: 1 1 280px; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }.search-box i { color: #98a2b3; }.search-box input { min-height: 34px; padding: 0; border: 0; box-shadow: none; }
.file-button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: #344054; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; cursor: pointer; }.file-button input { display: none; }.check-all { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }.check-all input { width: 16px; min-height: 16px; }
.data-table { width: 100%; overflow-x: auto; }.table-head,.table-row { display: grid; align-items: center; min-width: 1000px; border-bottom: 1px solid #edf0f4; }.table-head { min-height: 42px; color: #667085; background: #f8f9fb; font-size: 11px; font-weight: 700; }.table-row { min-height: 52px; color: #344054; font-size: 12px; }.table-row:hover { background: #fafbff; }.table-head > *, .table-row > * { min-width: 0; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.table-row input,.table-head input { width: 16px; min-height: 16px; }.row-actions { display: flex; align-items: center; gap: 3px; }.row-actions button { min-height: 30px; padding: 0 8px; font-size: 11px; }
.address-table .table-head,.address-table .table-row { grid-template-columns: 40px 100px 50px 55px 80px minmax(150px,1.3fr) minmax(120px,1fr) 72px 120px 160px 122px 90px; }
.cdk-table .table-head,.cdk-table .table-row { min-width: 1080px; grid-template-columns: 42px 135px 110px 130px 90px 90px 160px 85px 140px 120px; }.card-table .table-head,.card-table .table-row { min-width: 720px; grid-template-columns: 42px 100px 100px 90px 1fr 160px; }
.order-table .table-head,.order-table .table-row { min-width: 1500px; grid-template-columns: 42px 118px minmax(145px,1fr) 105px 135px 105px 105px 105px 105px 145px 140px 165px; }.environment-table .table-head,.environment-table .table-row { min-width: 850px; grid-template-columns: 90px minmax(150px,1fr) 160px 90px 130px 180px 90px; }.proxy-table .table-head,.proxy-table .table-row { min-width: 1120px; grid-template-columns: 42px 52px minmax(180px,1fr) 68px 60px 90px 100px 105px 90px minmax(170px,1fr) 72px; }
.proxy-test-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }.proxy-test-summary > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }.proxy-test-summary span,.proxy-test-summary b { display: block; }.proxy-test-summary span { color: var(--muted); font-size: 11px; }.proxy-test-summary b { margin-top: 5px; font-size: 21px; }.proxy-score { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }.proxy-score i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: #98a2b3; font-style: normal; }.proxy-score.good i { background: var(--green); }.proxy-score.medium i { background: var(--amber); }.proxy-score.bad i { background: var(--red); }
.status-pill { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 23px; padding: 0 8px; border-radius: 6px; color: #475467; background: #f2f4f7; font-size: 11px; font-weight: 700; }.status-pill.ok { color: #087443; background: #e8f7ef; }.status-pill.warn { color: #a25d08; background: #fff3da; }.status-pill.err { color: #b4232d; background: #feecee; }.status-pill.info { color: #344bc8; background: #eef0ff; }
.stage-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 0 8px; border-radius: 7px; color: #667085; background: #f2f4f7; font-size: 10px; font-weight: 700; white-space: nowrap; }.stage-pill.success { color: #087443; background: #e8f7ef; }.stage-pill.running { color: #344bc8; background: #eef0ff; }.stage-pill.failed { color: #b4232d; background: #feecee; }.stage-pill.skipped { color: #7a4b08; background: #fff3da; }.session-copy { max-width: 150px; min-height: 30px; padding: 0 8px; font: 10px "JetBrains Mono",monospace; }
.stage-overview { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 4px 0 16px; }.stage-card { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfc; }.stage-card span,.stage-card b { display: block; }.stage-card span { color: var(--muted); font-size: 10px; }.stage-card b { margin-top: 7px; }
.empty-state { padding: 35px 18px; color: #98a2b3; text-align: center; }.mono { font-family: "JetBrains Mono", monospace; }

.split-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,.7fr); gap: 16px; }.inventory-summary { display: flex; align-items: center; gap: 16px; background: #f8f9ff; }.inventory-summary > i { font-size: 40px; color: var(--blue); }.inventory-summary span { color: var(--blue); font-size: 11px; font-weight: 700; }.inventory-summary h3 { margin: 4px 0; }.inventory-summary p { margin: 0; color: var(--muted); line-height: 1.55; }
.form-grid { display: grid; gap: 12px; margin-bottom: 13px; }.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }.form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }.form-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }.span-2 { grid-column: span 2; }.form-button { align-self: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }.field > span { color: #475467; font-size: 11px; font-weight: 700; }.field.compact { flex-direction: row; align-items: center; }.field.compact > span { white-space: nowrap; }
input,select,textarea { width: 100%; min-height: 38px; padding: 8px 10px; color: #25314a; border: 1px solid #d8dee8; border-radius: 8px; background: #fff; outline: none; }
textarea { min-height: 94px; resize: vertical; line-height: 1.55; }.mono-output { font-family: "JetBrains Mono", monospace; font-size: 12px; }
input:focus,select:focus,textarea:focus { border-color: #8996f8; box-shadow: 0 0 0 3px rgba(70,87,237,.11); }.inline-control { display: flex; gap: 6px; }.inline-control select { min-width: 0; }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }.admin-create-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; }

.simulation-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border-color: #cfd6ff; background: #f7f8ff; }.simulation-hero h3 { margin: 5px 0; font-size: 19px; }.simulation-hero p { margin: 0; color: var(--muted); }.mode-label { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.environment-test-badge { padding: 7px 11px; border-radius: 99px; font-size: 11px; font-weight: 800; }.environment-test-badge.idle { color: #475467; background: #e9ecf1; }.environment-test-badge.running { color: #344bc8; background: #e8ebff; }.environment-test-badge.ok { color: #087443; background: #e3f7eb; }.environment-test-badge.error { color: #b4232d; background: #fee7e9; }
.environment-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 16px 0; }.environment-card { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }.environment-card header { display: flex; justify-content: space-between; }.environment-card h3 { margin: 0; }.environment-card p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.step-strip { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }.step-strip span { position: relative; display: flex; align-items: center; gap: 8px; padding: 12px; color: #475467; background: #f8f9fb; border-radius: 8px; font-weight: 600; }.step-strip i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-style: normal; font-size: 11px; }

.mode-banner { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; margin-bottom: 16px; padding: 17px; border: 1px solid #abb6ff; border-radius: var(--radius); background: linear-gradient(90deg,#f4f6ff,#fff); }.mode-banner.test-mode { border-color: #efc979; background: #fffaf0; }.mode-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 26px; box-shadow: 0 0 0 7px #e7eaff; }.test-mode .mode-icon { background: var(--amber); box-shadow: 0 0 0 7px #fff0cf; }.mode-banner h2 { margin: 3px 0; font-size: 20px; }.mode-banner p { margin: 0; color: var(--muted); }.mode-switch { display: grid; grid-template-columns: auto 44px auto; align-items: center; gap: 9px; cursor: pointer; }.mode-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }.mode-switch-track { width: 44px; height: 25px; padding: 3px; border-radius: 99px; background: #a7b0c1; }.mode-switch-track i { display: block; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .18s ease; box-shadow: 0 2px 5px rgba(0,0,0,.2); }.mode-switch input:checked + .mode-switch-track { background: var(--amber); }.mode-switch input:checked + .mode-switch-track i { transform: translateX(19px); }.mode-switch b { min-width: 50px; font-size: 12px; }
.workflow-grid { display: grid; grid-template-columns: minmax(300px,.82fr) minmax(410px,1.25fr) minmax(280px,.83fr); gap: 14px; align-items: start; }.workflow-form > .field textarea { min-height: 130px; font-family: "JetBrains Mono",monospace; font-size: 11px; }.submit-task { width: 100%; min-height: 44px; margin: 5px 0 8px; }
.execution-lanes { display: grid; gap: 10px; }.execution-lane { padding: 13px; border: 1px solid #e2e6ee; border-radius: 9px; }.execution-lane header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }.execution-lane header b { font-size: 15px; }.execution-lane header span { color: var(--muted); font-size: 11px; }.lane-steps { display: grid; grid-template-columns: repeat(6,1fr); gap: 2px; }.lane-steps span { position: relative; padding-top: 18px; color: #98a2b3; font-size: 9px; text-align: center; }.lane-steps span:before { content: ""; position: absolute; z-index: 2; top: 4px; left: calc(50% - 5px); width: 10px; height: 10px; border: 2px solid #cbd2dc; border-radius: 50%; background: #fff; }.lane-steps span:after { content: ""; position: absolute; top: 9px; right: 50%; width: 100%; height: 1px; background: #dce1e8; }.lane-steps span:first-child:after { display: none; }.lane-steps .ready { color: var(--green); }.lane-steps .ready:before { border-color: var(--green); background: #e9f8f0; }
.live-panel { position: sticky; top: 90px; }.live-dot { padding: 3px 7px; color: #087443; border-radius: 99px; background: #e2f8ec; font-size: 9px; font-weight: 800; }.resource-mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 12px; }.resource-mini-grid button { min-height: 72px; display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto; padding: 9px; text-align: left; }.resource-mini-grid i { grid-row: 1/3; align-self: center; font-size: 18px; }.resource-mini-grid span { color: var(--muted); font-size: 9px; }.resource-mini-grid b { color: var(--ink); }
.log-box { height: 380px; margin: 0; overflow: auto; padding: 12px; color: #c7d3e8; border-radius: 8px; background: #111b2c; font: 10px/1.65 "JetBrains Mono",monospace; white-space: pre-wrap; }.advanced-panel { margin-top: 16px; }.advanced-panel summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 700; }.advanced-panel summary span { display: flex; align-items: center; gap: 8px; }.advanced-panel summary small { color: var(--muted); font-weight: 400; }.advanced-panel[open] summary { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }.hidden-library { display: none; }.toggle-row { display: flex; align-items: center; gap: 20px; margin: 14px 0; flex-wrap: wrap; }.toggle-row > label:not(.field) { display: flex; align-items: center; gap: 7px; font-weight: 600; }.toggle-row input[type=checkbox] { width: 16px; min-height: 16px; }.result-panel { margin-top: 16px; }

.drawer-backdrop { position: fixed; z-index: 50; inset: 0; display: flex; justify-content: flex-end; background: rgba(11,17,28,.34); }.side-drawer { width: min(430px,100%); height: 100%; display: flex; flex-direction: column; padding: 20px; background: #fff; box-shadow: -20px 0 50px rgba(13,24,46,.15); animation: drawer-in .2s ease; }.order-drawer { width: min(510px,100%); } @keyframes drawer-in { from { transform: translateX(18px); opacity: .7; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }.drawer-head h2 { margin: 4px 0 0; font-size: 20px; }.icon-button { width: 36px; padding: 0; font-size: 20px; }.drawer-form,.order-detail { flex: 1; overflow: auto; display: grid; align-content: start; gap: 13px; padding: 17px 0; }.drawer-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }.detail-item { padding: 10px; border-radius: 8px; background: #f7f8fb; }.detail-item span { display: block; color: var(--muted); font-size: 10px; }.detail-item b { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: 12px; }.timeline { display: grid; gap: 0; }.timeline-row { position: relative; padding: 0 0 16px 24px; }.timeline-row:before { content: ""; position: absolute; top: 5px; left: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e5f7ed; }.timeline-row:after { content: ""; position: absolute; top: 16px; bottom: 0; left: 8px; width: 1px; background: #dfe4e9; }.timeline-row:last-child:after { display: none; }.timeline-row b,.timeline-row small { display: block; }.timeline-row small { margin-top: 3px; color: var(--muted); }

.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(11,17,28,.64); }.environment-test-dialog { width: min(900px,100%); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; border-radius: 14px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.25); }.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.dialog-head h2 { margin: 4px 0; }.environment-selector-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }.environment-selector-head > div { display: grid; gap: 2px; }.environment-selector { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }.environment-choice { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }.environment-choice:has(input:checked) { border-color: #949fff; background: #f2f4ff; }.environment-choice input { width: 16px; min-height: 16px; }.environment-test-input textarea { min-height: 170px; font-family: "JetBrains Mono",monospace; font-size: 11px; }.diagnostic-warning { margin-top: 10px; padding: 11px; color: #975a0b; border: 1px solid #f0d28c; border-radius: 8px; background: #fff9e9; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }.diagnostic-overview { display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 8px; }.diagnostic-overview > div { padding: 12px; border-radius: 8px; background: #f7f8fa; }.diagnostic-overview span,.diagnostic-overview b { display: block; }.diagnostic-overview span { color: var(--muted); font-size: 10px; }.diagnostic-overview b { margin-top: 4px; font-size: 16px; }.diagnostic-profiles { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 12px; }.diagnostic-profile { padding: 11px; border: 1px solid var(--line); border-radius: 8px; }.diagnostic-profile b,.diagnostic-profile span { display: block; }.diagnostic-profile span { margin-top: 5px; color: var(--muted); font-size: 10px; }.diagnostic-profile.running { border-color: #96a2ff; background: #f4f5ff; }.diagnostic-profile.ok { border-color: #88d8b3; background: #effaf4; }.diagnostic-profile.error { border-color: #f0a2a6; background: #fff4f4; }.diagnostic-log-head { display: flex; justify-content: space-between; margin: 14px 0 7px; }.diagnostic-log { height: 230px; overflow: auto; padding: 11px; color: #cbd5e1; border-radius: 8px; background: #111827; font: 10px/1.6 "JetBrains Mono",monospace; }.diagnostic-log-row { display: grid; grid-template-columns: 60px 68px 1fr; gap: 7px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.05); }.diagnostic-log-row .ok { color: #66d59d; }.diagnostic-log-row .error { color: #ff8c92; }.diagnostic-log-row .start,.diagnostic-log-row .retry { color: #8da2ff; }

.session-inspect { margin: -4px 0 12px; padding: 10px; border: 1px solid #cfd5ff; border-radius: 8px; background: #f7f8ff; }.session-inspect-head { display: flex; justify-content: space-between; }.session-account-list { display: grid; gap: 6px; margin-top: 7px; }.session-account-item { padding: 8px; border-radius: 6px; background: #fff; }.session-account-item b,.session-account-item small { display: block; }.session-account-item small { color: var(--muted); }
.admin-list { display: grid; gap: 8px; margin-top: 14px; }.admin-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; }.admin-row b,.admin-row small { display: block; }.admin-row small,.admin-row span { color: var(--muted); font-size: 11px; }
.ai-recovery-panel{margin-top:16px;padding:16px;border:1px solid rgba(99,102,241,.28);border-radius:12px;background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(14,165,233,.05))}.ai-recovery-panel .section-head{margin-bottom:12px}.recovery-note{margin-top:10px;padding:12px;border-radius:9px;background:var(--panel,#fff);border:1px solid var(--line)}.recovery-note b{display:block;margin-bottom:6px}.recovery-note p{margin:0;white-space:pre-wrap;line-height:1.65;color:var(--muted)}.ai-takeover{border-color:rgba(99,102,241,.4)!important;color:#4f46e5!important}
.operation-progress { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--muted); border-bottom: 1px solid var(--line); }.progress-track { flex: 1; height: 4px; overflow: hidden; border-radius: 99px; background: #e8ebf1; }.progress-track i { display: block; width: 35%; height: 100%; background: var(--blue); animation: progress 1.2s infinite ease-in-out; } @keyframes progress { from { transform: translateX(-110%); } to { transform: translateX(310%); } }
.toast-host { position: fixed; z-index: 100; top: 88px; right: 18px; display: grid; gap: 8px; }.toast { min-width: 230px; max-width: 380px; padding: 11px 14px; color: #fff; border-radius: 8px; background: #1e8c5d; box-shadow: 0 12px 35px rgba(0,0,0,.18); }.toast.err { background: #c83d47; }

@media (max-width: 1180px) {
  :root { --sidebar-w: 200px; }.brand strong { font-size: 15px; }.workflow-grid { grid-template-columns: minmax(300px,.9fr) minmax(400px,1.1fr); }.live-panel { position: static; grid-column: 1 / -1; }.log-box { height: 220px; }.top-inventory > div { min-width: 95px; padding: 1px 9px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }.sidebar { position: sticky; top: 0; width: 100%; height: auto; }.brand { min-height: 56px; }.side-nav { display: flex; overflow-x: auto; padding: 7px; }.nav-item { min-width: max-content; width: auto; grid-template-columns: 20px auto auto; padding: 0 10px; }.sidebar-foot { display: none; }.app-main { width: 100%; }.app-topbar { position: static; }.top-inventory > div { display: none; }.workspace { padding: 16px; }.metric-grid,.proxy-test-summary { grid-template-columns: repeat(2,1fr); }.overview-grid,.split-grid,.workflow-grid { grid-template-columns: 1fr; }.live-panel { grid-column: auto; }.environment-cards { grid-template-columns: repeat(2,1fr); }.form-grid.four { grid-template-columns: repeat(2,1fr); }.form-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .brand { padding: 0 12px; }.brand strong { font-size: 14px; }.app-topbar { padding: 10px 14px; }.top-link { margin: 0; padding: 0; }.page-heading { display: grid; }.metric-grid,.proxy-test-summary,.overview-grid,.quick-actions,.form-grid.two,.form-grid.four,.admin-create-row,.environment-cards,.step-strip,.diagnostic-overview,.diagnostic-profiles { grid-template-columns: 1fr; }.span-2 { grid-column: auto; }.mode-banner { grid-template-columns: 44px 1fr; }.mode-switch { grid-column: 1 / -1; justify-self: end; }.table-toolbar { align-items: stretch; }.table-toolbar > * { flex: 1 1 auto; }.environment-selector { grid-template-columns: repeat(2,1fr); }
}
