:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17211f;
  background: #e9eeec;
  font-synthesis: none;
  --ink: #17211f;
  --muted: #687572;
  --line: #d8e0dd;
  --surface: #fff;
  --soft: #f5f7f6;
  --sidebar: #121a19;
  --sidebar-soft: #1d2926;
  --accent: #167d64;
  --accent-strong: #0e6853;
  --accent-pale: #e0f2ec;
  --orange: #b96b10;
  --blue: #2d6f9c;
  --danger: #a33a32;
  --shadow: 0 20px 58px rgba(26, 45, 40, .1);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: linear-gradient(120deg, rgba(255,255,255,.45), transparent 38%), #e9eeec; }
button, input, select, textarea { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(22,125,100,.24); outline-offset: 2px; }

.app-shell { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 28px 19px 22px; overflow-y: auto; background: radial-gradient(circle at 18% 0, rgba(70,190,152,.12), transparent 18rem), var(--sidebar); color: #f0f7f4; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 23px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(128,235,199,.52); border-radius: 11px; background: #20332f; color: #8ef0cf; font-size: 1.15rem; font-weight: 780; }
.brand p, .brand span { display: block; margin: 0; }
.brand p { font-size: 1.02rem; font-weight: 720; }
.brand span { margin-top: 3px; color: #91a19d; font-size: .75rem; font-weight: 700; letter-spacing: .17em; }
.main-nav { padding-top: 22px; }
.nav-item { display: grid; width: 100%; min-height: 46px; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; margin: 3px 0; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: #a8b7b3; text-align: left; font-size: .9rem; font-weight: 610; }
.nav-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.nav-item.is-active { background: var(--sidebar-soft); color: #fff; }
.nav-icon { color: #75cdb1; font-size: 1.15rem; text-align: center; }
.nav-count { display: grid; min-width: 24px; height: 22px; place-items: center; padding: 0 6px; border-radius: 999px; background: #29413b; color: #a8ead4; font-size: .72rem; }
.wizard-tree { position: relative; margin: 5px 0 15px 22px; padding: 2px 0 2px 20px; list-style: none; }
.wizard-tree::before { position: absolute; top: 7px; bottom: 9px; left: 8px; width: 1px; content: ""; background: rgba(255,255,255,.11); }
.wizard-tree button { display: flex; width: 100%; min-height: 34px; align-items: center; gap: 10px; padding: 3px 6px; border: 0; background: transparent; color: #768682; text-align: left; font-size: .78rem; }
.wizard-tree button:hover, .wizard-tree button.is-current { color: #e9f4f0; }
.wizard-tree button span { position: relative; z-index: 1; display: grid; width: 18px; height: 18px; place-items: center; margin-left: -21px; border: 1px solid #40514d; border-radius: 50%; background: var(--sidebar); color: #7e8d89; font-size: .62rem; }
.wizard-tree button.is-current span { border-color: #66c9a9; background: #24765f; color: #fff; }
.wizard-tree button.is-complete span { border-color: #408f77; background: #1d5143; color: #b5e9d8; }
.sidebar-tasks { display: grid; gap: 7px; margin: 5px 0 16px 38px; }
.sidebar-task { padding: 9px 10px; border: 1px solid rgba(255,255,255,.075); border-radius: 8px; background: rgba(255,255,255,.026); }
.sidebar-task-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sidebar-task strong { color: #dce9e5; font: 650 .72rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.sidebar-task p { margin: 5px 0 7px; color: #7f918c; font-size: .68rem; line-height: 1.3; }
.mini-progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 99px; background: #31413e; overflow: hidden; appearance: none; -webkit-appearance: none; }
.mini-progress::-webkit-progress-bar { background: #31413e; }
.mini-progress::-webkit-progress-value { background: #5bc69f; }
.mini-progress::-moz-progress-bar { background: #5bc69f; }
.task-icon-actions { display: flex; gap: 3px; }
.icon-button { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #d5dedb; border-radius: 7px; background: #fff; color: #52605c; font-size: .77rem; }
.sidebar .icon-button { width: 23px; height: 23px; border-color: rgba(255,255,255,.1); background: transparent; color: #8bd6bd; }
.environment-card { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.03); }
.environment-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 5px; border-radius: 50%; background: #66dbae; box-shadow: 0 0 0 4px rgba(102,219,174,.1); }
.environment-card strong, .environment-card div span { display: block; }
.environment-card strong { color: #dce8e4; font-size: .79rem; }
.environment-card div span { margin-top: 4px; color: #83938f; font-size: .72rem; }
.environment-card.is-offline .environment-dot { background: #df9548; }

.workspace { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; padding: 30px clamp(24px, 4.5vw, 66px) 20px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; width: min(1120px, 100%); margin: 0 auto 25px; }
.topbar h1 { margin: 5px 0 0; font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
.breadcrumb { margin: 0; color: #75827f; font-size: .8rem; }
.breadcrumb span { margin: 0 6px; color: #a3aeab; }
.breadcrumb b { font-weight: 600; }
.test-badge { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #e4bd88; border-radius: 999px; background: #fff7ea; color: #8a540e; font-size: .75rem; font-weight: 720; white-space: nowrap; }
.test-badge span { width: 7px; height: 7px; border-radius: 50%; background: #d07a15; }
.app-view { display: none; width: min(1120px, 100%); flex: 1; margin: 0 auto; }
.app-view.is-active { display: flex; }
.panel { width: 100%; border: 1px solid #d7dfdc; border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.installer-panel { display: flex; min-height: 690px; flex-direction: column; }
.panel-heading { position: relative; display: flex; min-height: 137px; align-items: center; justify-content: space-between; gap: 22px; padding: 27px clamp(23px, 4vw, 42px) 24px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .page-panel-heading h2 { margin: 0; font-size: clamp(1.32rem, 2vw, 1.75rem); letter-spacing: -.025em; }
.panel-heading p:last-child, .page-panel-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.step-kicker, .content-eyebrow { margin: 0 0 5px; color: var(--accent); font-size: .73rem; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.record-chip { padding: 8px 11px; border: 1px solid #c9ded7; border-radius: 8px; background: #f1f8f5; color: var(--accent-strong); font: 650 .78rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.heading-progress { position: absolute; right: 0; bottom: -1px; left: 0; display: block; width: 100%; height: 3px; border: 0; background: transparent; appearance: none; -webkit-appearance: none; }
.heading-progress::-webkit-progress-bar { background: transparent; }
.heading-progress::-webkit-progress-value { background: var(--accent); }
.heading-progress::-moz-progress-bar { background: var(--accent); }
.panel-content { flex: 1; padding: clamp(26px, 4vw, 42px); }
.installer-step { display: none; animation: reveal .18s ease both; }
.installer-step.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.textarea-field, .field { display: flex; flex-direction: column; gap: 8px; color: #2a3632; font-size: .85rem; font-weight: 680; }
.textarea-field textarea, .field input, .field select, .field textarea { width: 100%; border: 1px solid #cbd6d2; border-radius: 9px; background: #fff; color: var(--ink); outline: none; }
.textarea-field textarea, .field textarea { padding: 12px 13px; resize: vertical; line-height: 1.5; }
.textarea-field textarea { min-height: 116px; font: 500 .9rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.field input, .field select { min-height: 44px; padding: 0 12px; font-size: .86rem; }
.textarea-field textarea:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,125,100,.1); }
.field small { color: var(--muted); font-size: .73rem; font-weight: 430; line-height: 1.4; }
.extract-row { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 18px; margin: 8px 0 23px; }
.extract-row p { margin: 0; color: var(--muted); font-size: .77rem; }
.extract-row p.has-imei { color: var(--accent-strong); font-weight: 650; }
.imei-preview { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.imei-preview span { padding: 4px 7px; border-radius: 6px; background: var(--accent-pale); color: var(--accent-strong); font: 620 .7rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.record-section { padding-top: 23px; border-top: 1px solid var(--line); }
.history-section { margin-top: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.section-heading h3 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.section-heading > span { display: grid; min-width: 26px; height: 24px; place-items: center; border-radius: 99px; background: var(--soft); color: #697672; font-size: .72rem; font-weight: 700; }
.record-list { display: grid; gap: 9px; }
.record-card { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(130px, .8fr) auto; align-items: center; gap: 18px; min-height: 65px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.record-card strong, .task-card-imei { font: 670 .86rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.record-card small { display: block; margin-top: 4px; color: var(--muted); font-size: .7rem; }
.record-stage { color: #55625f; font-size: .76rem; }
.record-action { min-height: 34px; padding: 0 11px; border: 1px solid #cbd7d3; border-radius: 7px; background: #fff; color: var(--accent-strong); font-size: .75rem; font-weight: 680; }
.record-action:hover { background: #f0f7f4; }
.empty-state { padding: 19px; border: 1px dashed #cfd9d6; border-radius: 10px; color: var(--muted); font-size: .79rem; text-align: center; }
.status { display: inline-flex; min-height: 25px; align-items: center; gap: 6px; padding: 0 8px; border-radius: 99px; font-size: .68rem; font-weight: 720; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-preparation { background: #edf1f0; color: #697773; }
.status-in_progress { background: #e5f1fb; color: #28698f; }
.status-paused { background: #fff2df; color: #a45f0c; }
.status-completed { background: var(--accent-pale); color: var(--accent-strong); }
.status-failed { background: #fbe9e6; color: #a23c34; }

.candidate-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.candidate-symbol { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 10px; background: var(--accent-pale); color: var(--accent-strong); font-weight: 800; }
.candidate-summary h3, .candidate-summary p { margin: 0; }
.candidate-summary h3 { font-size: 1rem; }
.candidate-summary p { margin-top: 4px; color: var(--muted); font-size: .77rem; }
fieldset { margin: 0; padding: 0; border: 0; }
input[type="radio"], input[type="checkbox"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.candidate-list, .algorithm-list { display: grid; gap: 10px; }
.candidate-card, .algorithm-card { display: flex; align-items: center; gap: 14px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.candidate-card:hover, .algorithm-card:hover { background: #fafcfb; }
.candidate-card:has(input:checked), .algorithm-card:has(input:checked) { border-color: #72ad9c; background: #f5faf8; box-shadow: 0 0 0 3px rgba(22,125,100,.07); }
.radio-indicator { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border: 1.5px solid #9aaba6; border-radius: 50%; }
input:checked + .radio-indicator { border-color: var(--accent); }
input:checked + .radio-indicator::after { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); content: ""; }
.checkbox-indicator { position: relative; display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border: 1.5px solid #9ba9a6; border-radius: 5px; background: #fff; }
input:checked + .checkbox-indicator { border-color: var(--accent); background: var(--accent); }
input:checked + .checkbox-indicator::after { width: 8px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; content: ""; transform: rotate(-45deg) translate(1px,-1px); }
.candidate-copy, .algorithm-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.candidate-copy strong { font: 670 .88rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.candidate-copy span, .algorithm-copy span { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.algorithm-copy strong { font-size: .88rem; }
.candidate-order, .version-label { color: #788581; font-size: .71rem; font-weight: 650; }
.selection-count { margin: 15px 2px 0; color: var(--accent-strong); font-size: .78rem; font-weight: 680; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field.full { margin-top: 16px; }
.input-with-unit { position: relative; display: block; }
.input-with-unit input { padding-right: 42px; }
.input-with-unit > span { position: absolute; top: 50%; right: 13px; color: var(--muted); font-size: .78rem; transform: translateY(-50%); }
.switch-list { margin-top: 24px; border-top: 1px solid var(--line); }
.switch-row { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row > span:first-of-type { display: flex; flex-direction: column; gap: 4px; }
.switch-row strong { font-size: .82rem; }
.switch-row small, .confirmation small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 42px; border-radius: 99px; background: #bdc8c5; transition: background .18s; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); content: ""; transition: transform .18s; }
input:checked + .switch { background: var(--accent); }
input:checked + .switch::after { transform: translateX(18px); }

.summary-card { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.summary-row { display: grid; grid-template-columns: 190px 1fr; gap: 22px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--muted); font-size: .76rem; }
.summary-row strong { font-size: .79rem; line-height: 1.45; }
.notice { display: flex; align-items: flex-start; gap: 11px; margin-top: 19px; padding: 14px 16px; border: 1px solid #cce3dc; border-radius: 10px; background: #f1faf7; color: #3e5d54; }
.notice > span { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; border-radius: 50%; background: #ccebe1; color: #0e6a54; font-size: .7rem; font-weight: 800; }
.notice p { margin: 0; font-size: .8rem; line-height: 1.5; }
.confirmation { display: flex; align-items: flex-start; gap: 12px; margin-top: 17px; padding: 15px 17px; border: 1px solid #ead2af; border-radius: 10px; background: #fffaf1; cursor: pointer; }
.confirmation > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.confirmation strong { font-size: .82rem; }

.execution-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.execution-head h3, .execution-head p { margin: 0; }
.execution-head h3 { font: 680 1.1rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.execution-head p { max-width: 610px; margin-top: 7px; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.execution-progress { display: block; width: 100%; height: 10px; margin-top: 26px; border: 0; border-radius: 99px; background: #e1e8e6; overflow: hidden; appearance: none; -webkit-appearance: none; }
.execution-progress::-webkit-progress-bar { background: #e1e8e6; }
.execution-progress::-webkit-progress-value { background: linear-gradient(90deg,#167d64,#5fc19f); }
.execution-progress::-moz-progress-bar { background: linear-gradient(90deg,#167d64,#5fc19f); }
.execution-stats { display: flex; justify-content: space-between; margin-top: 8px; }
.execution-stats strong { color: var(--accent-strong); font-size: .8rem; }
.execution-stats span { color: var(--muted); font-size: .75rem; }
.process-log { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--line); }
.process-log ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.process-event { display: grid; grid-template-columns: 105px 1fr auto; gap: 13px; align-items: center; min-height: 44px; padding: 8px 11px; border-radius: 8px; background: var(--soft); }
.process-event strong { color: #38554c; font-size: .73rem; }
.process-event span { color: #586762; font-size: .76rem; }
.process-event time { color: #8b9693; font-size: .68rem; }

.form-error { min-height: 20px; margin: 0; padding: 0 clamp(23px,4vw,42px); color: var(--danger); font-size: .76rem; font-weight: 650; }
.panel-actions { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px clamp(23px,4vw,42px); border-top: 1px solid var(--line); background: #fbfcfc; }
.action-group { display: flex; gap: 9px; }
.button { min-width: 104px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px; font-size: .81rem; font-weight: 680; }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 5px 13px rgba(22,125,100,.14); }
.button-primary:hover:not(:disabled) { background: var(--accent-strong); }
.button-secondary { border-color: #cbd6d2; background: #fff; color: #31403c; }
.button-secondary:hover:not(:disabled) { background: #f2f6f4; }
.button-ghost { min-width: 88px; padding: 0 9px; background: transparent; color: #6d7976; }
.button-ghost:hover { color: var(--accent-strong); background: #f0f7f4; }

.page-panel { min-height: 690px; padding: clamp(25px,4vw,42px); }
.page-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.safe-label { padding: 7px 10px; border: 1px solid #e5c693; border-radius: 7px; background: #fff8ec; color: #925a13; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.task-board { display: grid; gap: 12px; margin-top: 25px; }
.task-card { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.task-card-top { display: grid; grid-template-columns: minmax(200px,1fr) auto auto; align-items: start; gap: 18px; }
.task-card h3, .task-card p { margin: 0; }
.task-card h3 { font: 680 .92rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; }
.task-card p { margin-top: 5px; color: var(--muted); font-size: .74rem; }
.task-stage-marker { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; color: #61716c; font-size: .72rem; }
.task-stage-marker strong { color: #234d40; font-size: .76rem; }
.task-progress-row { display: grid; grid-template-columns: 1fr 42px; gap: 12px; align-items: center; margin-top: 17px; }
.task-progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 99px; background: #e2e9e7; overflow: hidden; appearance: none; -webkit-appearance: none; }
.task-progress::-webkit-progress-bar { background: #e2e9e7; }
.task-progress::-webkit-progress-value { background: var(--accent); }
.task-progress::-moz-progress-bar { background: var(--accent); }
.task-progress-row strong { color: var(--accent-strong); font-size: .75rem; text-align: right; }
.task-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 9px; color: #6f7d79; font-size: .7rem; }
.task-details { margin-top: 14px; border-top: 1px solid var(--line); }
.task-details summary { padding-top: 12px; color: var(--accent-strong); font-size: .74rem; font-weight: 680; cursor: pointer; }
.task-details .process-log { margin-top: 11px; padding-top: 0; border: 0; }
.completed-board { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.completed-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; min-height: 52px; padding: 8px 5px; border-bottom: 1px solid var(--line); }
.completed-row strong { font: 650 .8rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.completed-row time { color: var(--muted); font-size: .71rem; }

.config-layout { display: grid; grid-template-columns: minmax(270px,.72fr) minmax(450px,1.28fr); gap: 30px; margin-top: 26px; }
.config-tree-panel { min-width: 0; padding-right: 27px; border-right: 1px solid var(--line); }
.config-tree { min-height: 430px; }
.config-tree-root-row { display: grid; grid-template-columns: minmax(0,1fr) 38px; gap: 8px; align-items: center; }
.config-tree-list { margin: 8px 0 0 14px; padding: 0 0 0 14px; border-left: 1px solid #d9e4e0; list-style: none; }
.config-tree-list .config-tree-list { margin-top: 5px; }
.config-tree-list li { position: relative; margin: 5px 0; }
.config-tree-list li::before { position: absolute; top: 21px; left: -15px; width: 14px; height: 1px; content: ""; background: #d9e4e0; }
.config-tree-node { display: grid; width: 100%; min-width: 0; min-height: 45px; grid-template-columns: 29px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 5px 8px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #33433e; text-align: left; }
.config-tree-node:hover { border-color: #d6e2de; background: #f8fbfa; }
.config-tree-node.is-selected { border-color: #8cc2b1; background: #eef8f4; box-shadow: 0 0 0 2px rgba(22,125,100,.06); }
.config-tree-root { min-height: 54px; padding-inline: 10px; border-color: #b8d8ce; background: linear-gradient(135deg,#f8fcfb,#eef8f4); }
.config-tree-kind { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #dcefe9; color: var(--accent-strong); font-size: .75rem; font-weight: 800; }
.config-tree-node.kind-step .config-tree-kind { background: #eaf0f9; color: #416082; }
.config-tree-node.kind-option .config-tree-kind { background: #fff1dc; color: #895919; }
.config-tree-copy { min-width: 0; }
.config-tree-copy strong, .config-tree-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-tree-copy strong { font-size: .81rem; }
.config-tree-copy small { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.config-tree-count { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 99px; background: #e9efed; color: #66746f; font-size: .72rem; font-weight: 750; }
.config-tree-add { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--accent); border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.3rem; line-height: 1; box-shadow: 0 5px 14px rgba(22,125,100,.16); }
.config-tree-add:hover { background: var(--accent-strong); transform: translateY(-1px); }
.config-empty-hint { margin-top: 11px; padding: 16px; border: 1px dashed #ccd9d5; border-radius: 14px; color: var(--muted); font-size: .79rem; text-align: center; }
.config-form { min-width: 0; align-self: start; }
.config-create-actions { margin: 0 0 14px; padding: 12px 13px; border: 1px solid #dce6e2; border-radius: 11px; background: #f8fbfa; }
.config-create-actions > span { display: block; margin-bottom: 8px; color: #66746f; font-size: .77rem; }
.config-create-actions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.config-create-actions button { min-height: 34px; padding: 0 11px; border: 1px solid #b8d7cd; border-radius: 8px; background: #fff; color: var(--accent-strong); font-size: .77rem; font-weight: 680; }
.config-create-actions button:hover { border-color: var(--accent); background: var(--accent-pale); }
.config-create-actions[hidden], #config-cancel[hidden], #config-kind-field[hidden] { display: none; }
.config-form-context { margin: 0 0 16px; padding: 11px 13px; border-radius: 10px; background: var(--soft); color: #64736e; font-size: .8rem; }
.config-form-context strong { color: #294d42; }
.config-parent-display { display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #d7e0dd; border-radius: 9px; background: #f8faf9; }
.config-parent-display > span { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--accent); }
.config-parent-display b { min-width: 0; overflow: hidden; color: #4d5d58; font-size: .78rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.command-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.command-grid textarea { min-height: 86px; background: #111917; color: #c6e7dc; font: 500 .75rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.config-form .form-error { padding: 0; margin-top: 12px; }
.config-success { min-height: 18px; margin: 7px 0 0; color: var(--accent-strong); font-size: .78rem; font-weight: 650; }
.form-submit { display: flex; justify-content: flex-end; gap: 9px; margin-top: 12px; }
.page-footer { display: flex; width: min(1120px,100%); justify-content: space-between; margin: 15px auto 0; color: #7b8784; font-size: .69rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 245px minmax(0,1fr); }
  .sidebar { padding-inline: 15px; }
  .config-layout { grid-template-columns: 1fr; }
  .config-tree-panel { padding: 0 0 25px; border-right: 0; border-bottom: 1px solid var(--line); }
  .command-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; display: block; height: auto; padding: 16px 18px; overflow: visible; }
  .brand { padding: 0 0 14px; }
  .main-nav { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding-top: 12px; }
  .nav-item { display: flex; justify-content: center; padding: 0 7px; }
  .nav-count { display: inline-grid; }
  .wizard-tree, .sidebar-tasks, .environment-card { display: none; }
  .workspace { min-height: auto; padding: 22px 16px 16px; }
  .config-layout { grid-template-columns: 1fr; }
  .config-tree-panel { padding: 0 0 23px; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 610px) {
  .nav-icon { display: none; }
  .nav-item { font-size: .75rem; }
  .topbar { align-items: flex-start; }
  .breadcrumb { display: none; }
  .test-badge { min-height: 30px; padding: 0 9px; font-size: .68rem; }
  .panel-heading { min-height: 150px; align-items: flex-start; flex-direction: column; }
  .panel-content, .page-panel { padding: 24px 19px; }
  .record-chip { margin-top: -11px; }
  .extract-row { align-items: flex-start; flex-direction: column; }
  .imei-preview { justify-content: flex-start; }
  .record-card { grid-template-columns: 1fr auto; gap: 10px; }
  .record-stage { grid-column: 1 / -1; grid-row: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr; gap: 4px; }
  .process-event { grid-template-columns: 1fr; gap: 3px; }
  .panel-actions { align-items: stretch; flex-direction: column-reverse; }
  .action-group { display: grid; grid-template-columns: 1fr 1fr; }
  .button { width: 100%; }
  .page-panel-heading { align-items: stretch; flex-direction: column; }
  .task-card-top { grid-template-columns: 1fr auto; }
  .task-card-top .task-icon-actions { grid-column: 1 / -1; }
  .completed-row { grid-template-columns: 1fr auto; }
  .completed-row time { grid-column: 1 / -1; }
  .page-footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
