:root {
  --paper: #f5f1e8;
  --paper-deep: #ece6d9;
  --card: rgba(255, 253, 247, .88);
  --ink: #17251f;
  --muted: #718078;
  --line: #dcd9ce;
  --green: #173d35;
  --green-deep: #0e2c27;
  --green-soft: #dce8dc;
  --yellow: #efc75e;
  --yellow-soft: #f6e9b8;
  --coral: #cf6b52;
  --shadow: 0 18px 50px rgba(22, 48, 39, .08);
  --shadow-small: 0 6px 18px rgba(22, 48, 39, .08);
  --radius: 18px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }

::selection { color: var(--green-deep); background: var(--yellow); }

.ambient { position: fixed; z-index: -1; pointer-events: none; border-radius: 999px; filter: blur(1px); opacity: .4; }
.ambient-one { width: 34vw; height: 34vw; top: -16vw; right: -10vw; background: radial-gradient(circle, rgba(239, 199, 94, .38), rgba(239, 199, 94, 0) 69%); }
.ambient-two { width: 32vw; height: 32vw; bottom: -18vw; left: 16%; background: radial-gradient(circle, rgba(166, 192, 158, .26), rgba(166, 192, 158, 0) 69%); }

.pairing-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 24px 24px; position: relative; overflow: hidden; }
.pairing-card { width: min(100%, 560px); padding: 48px 52px 42px; border: 1px solid rgba(23, 61, 53, .12); border-radius: 28px; background: rgba(255, 253, 247, .84); box-shadow: var(--shadow); animation: rise-in .55s ease both; }
.pairing-card h1 { margin: 14px 0 12px; color: var(--green-deep); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; line-height: 1.12; }
.pairing-copy { max-width: 440px; margin: 0 0 30px; color: var(--muted); line-height: 1.8; }
.pairing-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--green); text-transform: uppercase; }
.pairing-form .remember-choice { display: inline-flex; gap: 8px; align-items: center; margin: 13px 0 0; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.pairing-form .remember-choice input { width: 15px; height: 15px; min-height: 15px; margin: 0; accent-color: var(--green); }
.input-with-action { display: flex; gap: 10px; }
.input-with-action .text-input, .input-with-action input { flex: 1; min-width: 0; }
.pairing-hint { display: flex; gap: 9px; align-items: center; margin-top: 22px; color: var(--muted); font-size: 12px; }
.hint-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.pairing-side-note { position: absolute; bottom: 28px; display: flex; gap: 13px; align-items: center; color: rgba(23, 61, 53, .47); font-size: 11px; letter-spacing: .05em; }
.pairing-side-note .line-label { font-size: 10px; font-weight: 800; letter-spacing: .16em; color: var(--green); }
.pairing-side-note .arrow { color: var(--yellow); font-size: 18px; line-height: 1; }

.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; color: var(--green-deep); background: var(--yellow); font-weight: 900; letter-spacing: -.12em; box-shadow: 4px 4px 0 rgba(23, 61, 53, .12); }
.brand-mark-large { width: 48px; height: 48px; flex-basis: 48px; border-radius: 16px; font-size: 22px; box-shadow: 6px 6px 0 rgba(23, 61, 53, .12); }
.wordmark { display: inline-flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; }
.wordmark-copy { display: grid; gap: 0; line-height: 1.15; }
.wordmark-copy strong { font-size: 15px; letter-spacing: -.03em; }
.wordmark-copy small { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.eyebrow { margin: 0; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .16em; line-height: 1.2; text-transform: uppercase; }

.app-shell { min-height: 100vh; animation: fade-in .5s ease both; }
.topbar { position: sticky; z-index: 10; top: 0; height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid rgba(23, 61, 53, .1); background: rgba(245, 241, 232, .85); backdrop-filter: blur(20px); }
.topbar-right { display: flex; gap: 14px; align-items: center; }
.sync-status { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.status-pip { width: 7px; height: 7px; border-radius: 99px; background: #9ba8a0; }
.sync-status.is-online .status-pip { background: #5caa73; box-shadow: 0 0 0 4px rgba(92, 170, 115, .16); }
.sync-status.is-error .status-pip { background: var(--coral); box-shadow: 0 0 0 4px rgba(207, 107, 82, .15); }
.pairing-chip { display: inline-flex; gap: 7px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); background: rgba(255, 253, 247, .68); font-size: 12px; }
.pairing-chip:hover { border-color: var(--green); background: white; }
.chip-icon { color: var(--yellow); font-size: 17px; font-weight: 900; line-height: 1; }
.icon-button, .modal-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 18px; transform: rotate(90deg); }
.icon-button:hover, .modal-close:hover { color: var(--green); background: var(--green-soft); }
.logout-button { width: auto; padding: 7px 9px; transform: none; font-size: 11px; }

.app-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 74px); }
.sidebar { display: flex; flex-direction: column; padding: 34px 18px 28px; border-right: 1px solid rgba(23, 61, 53, .1); background: rgba(238, 234, 224, .45); }
.sidebar-label { margin: 0 12px 12px; color: #849087; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; gap: 11px; align-items: center; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; color: #637068; background: transparent; text-align: left; transition: color .2s ease, background .2s ease, transform .2s ease; }
.nav-item:hover { color: var(--green); background: rgba(255, 253, 247, .72); transform: translateX(2px); }
.nav-item.is-active { color: var(--green-deep); background: rgba(255, 253, 247, .94); box-shadow: var(--shadow-small); font-weight: 700; }
.nav-icon { position: relative; width: 17px; height: 17px; flex: 0 0 17px; color: currentColor; }
.nav-icon-grid::before, .nav-icon-grid::after { content: ""; position: absolute; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 2px; }
.nav-icon-grid::before { top: 1px; left: 1px; box-shadow: 8px 0 0 -1.5px var(--paper), 8px 0 0 0 currentColor; }
.nav-icon-grid::after { bottom: 1px; left: 1px; box-shadow: 8px 0 0 -1.5px var(--paper), 8px 0 0 0 currentColor; }
.nav-icon-target { border: 1.5px solid currentColor; border-radius: 50%; }
.nav-icon-target::before { content: ""; position: absolute; inset: 4px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-icon-target::after { content: ""; position: absolute; top: 7px; left: -2px; width: 20px; border-top: 1.5px solid currentColor; transform: rotate(45deg); }
.nav-icon-spark::before { content: "✦"; position: absolute; top: -4px; left: 0; font-size: 20px; line-height: 1; }
.nav-icon-activity::before { content: "⌁"; position: absolute; top: -4px; left: 0; font-size: 22px; line-height: 1; }
.nav-count { min-width: 19px; margin-left: auto; padding: 1px 6px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 800; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.sidebar-device { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(23, 61, 53, .1); border-radius: 14px; background: rgba(255, 253, 247, .64); }
.device-orbit { position: relative; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #b7c4b6; border-radius: 50%; }
.device-orbit::before { content: ""; width: 9px; height: 12px; border: 1.5px solid var(--green); border-radius: 3px; }
.device-orbit i { position: absolute; right: -2px; top: -1px; width: 6px; height: 6px; border: 1px solid var(--paper); border-radius: 50%; background: #9ba8a0; }
.sidebar-device.is-online .device-orbit i { background: #5caa73; }
.sidebar-device-copy { display: grid; min-width: 0; }
.sidebar-device-copy strong { overflow: hidden; color: var(--green); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-device-copy small { color: var(--muted); font-size: 10px; }
.sidebar-footnote { margin: 12px 7px 0; color: #89918a; font-size: 10px; line-height: 1.65; }

.main-content { min-width: 0; max-width: 1480px; width: 100%; margin: 0 auto; padding: 46px clamp(22px, 4.4vw, 68px) 70px; }
.view { display: none; }
.view.is-visible { display: block; animation: rise-in .36s ease both; }
.page-heading { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.page-heading h1 { margin: 8px 0 8px; color: var(--green-deep); font-size: clamp(28px, 3vw, 42px); letter-spacing: -.055em; line-height: 1.08; }
.heading-copy { max-width: 660px; margin: 0; color: var(--muted); line-height: 1.75; }
.heading-overview { align-items: center; }
.heading-actions { display: flex; gap: 10px; align-items: center; }
.button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 38px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-dark { color: #fffdf7; background: var(--green); box-shadow: 0 5px 14px rgba(23, 61, 53, .16); }
.button-dark:hover { background: var(--green-deep); box-shadow: 0 8px 20px rgba(23, 61, 53, .21); }
.button-accent { color: var(--green-deep); background: var(--yellow); box-shadow: 0 5px 15px rgba(193, 151, 46, .18); }
.button-accent:hover { background: #f3ce72; box-shadow: 0 8px 20px rgba(193, 151, 46, .24); }
.button-light { color: var(--green); border-color: var(--line); background: rgba(255, 253, 247, .7); }
.button-light:hover { border-color: #a8b9ac; background: #fffdf7; }
.button-quiet { color: var(--muted); border-color: transparent; background: transparent; }
.button-quiet:hover { color: var(--green); background: var(--green-soft); }
.button-danger { color: white; background: var(--coral); box-shadow: 0 5px 15px rgba(207, 107, 82, .18); }
.plus-symbol { font-size: 17px; font-weight: 400; line-height: .7; }
.text-button { display: inline-flex; gap: 7px; align-items: center; padding: 4px 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 700; }
.text-button:hover { color: var(--coral); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { min-height: 143px; padding: 18px 20px; border: 1px solid rgba(23, 61, 53, .1); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.stat-card-olive { color: #f3f1e7; background: var(--green); border-color: var(--green); }
.stat-card-yellow { color: var(--green-deep); background: var(--yellow); border-color: var(--yellow); }
.stat-card-paper { background: rgba(255, 253, 247, .7); }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: inherit; opacity: .72; font-size: 11px; font-weight: 700; }
.stat-glyph { font-size: 19px; line-height: 1; }
.stat-card strong { display: block; margin: 16px 0 2px; font-size: 32px; letter-spacing: -.06em; line-height: 1; }
.stat-card small { color: inherit; opacity: .62; font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(330px, .98fr); gap: 18px; margin-bottom: 18px; }
.panel { min-width: 0; border: 1px solid rgba(23, 61, 53, .1); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-small); }
.panel-heading { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 22px 24px 0; }
.panel-heading h2 { margin: 5px 0 0; color: var(--green-deep); font-size: 18px; letter-spacing: -.035em; }
.panel-intro { margin: 17px 24px 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.badge, .dispatch-stamp { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge-muted { color: #78847d; background: #e9e7de; }
.badge-online { color: #27613c; background: #dcebdc; }
.badge-offline { color: #936053; background: #f2ded8; }
.badge-yellow { color: #735718; background: var(--yellow-soft); }
.dispatch-stamp { color: var(--green); background: var(--green-soft); }
.device-list { display: grid; gap: 9px; padding: 19px 24px 22px; }
.device-row { display: flex; gap: 12px; align-items: center; min-width: 0; padding: 12px 13px; border: 1px solid #e4e5db; border-radius: 13px; background: rgba(255, 253, 247, .62); }
.device-row.is-selected { border-color: #a8c0ab; background: #f3f7ec; box-shadow: inset 3px 0 0 var(--yellow); }
.device-phone-icon { display: grid; place-items: center; width: 29px; height: 34px; flex: 0 0 29px; border: 1.5px solid #8da296; border-radius: 6px; color: var(--green); font-size: 11px; }
.device-phone-icon::after { content: "·"; align-self: end; margin-bottom: -4px; font-size: 17px; }
.device-row-copy { display: grid; min-width: 0; gap: 1px; }
.device-row-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.device-row-copy small { color: var(--muted); font-size: 10px; }
.device-row-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-left: auto; justify-content: flex-end; }
.micro-tag { padding: 3px 6px; border-radius: 5px; color: #6e7d72; background: #eeeee6; font-size: 9px; white-space: nowrap; }
.micro-tag.is-ready { color: #347247; background: #e3f0df; }
.micro-tag.is-alert { color: #a36351; background: #f4e2db; }
.compact-empty { padding: 28px 24px 30px; }
.dispatch-fields { padding: 0 24px 5px; }
.field-label { display: block; margin: 0 0 7px; color: var(--green); font-size: 11px; font-weight: 800; }
.select-input, .text-input, .pairing-form input, .search-field input, .price-filter input { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: rgba(255, 253, 247, .88); font-size: 12px; }
.select-input:focus, .text-input:focus, .pairing-form input:focus, .search-field input:focus, .price-filter input:focus { border-color: #789c83; box-shadow: 0 0 0 3px rgba(122, 157, 131, .15); }
.select-input:disabled { color: #a3aaa4; background: #efeee8; }
.quick-dispatch-actions { display: flex; gap: 8px; margin-top: 14px; }
.quick-dispatch-actions .button { flex: 1; }
.dispatch-hint { min-height: 32px; margin: 4px 24px 21px; padding-top: 4px; color: var(--muted); font-size: 10px; }
.dispatch-hint.is-ready { color: #52815d; }
.recent-panel { overflow: hidden; }
.recent-panel .panel-heading { align-items: center; }
.mini-candidate-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 18px 24px 24px; }
.mini-candidate { min-width: 0; padding: 13px; border: 1px solid #e7e5dc; border-radius: 12px; background: rgba(255, 253, 247, .66); }
.mini-candidate-title { display: -webkit-box; overflow: hidden; min-height: 38px; color: var(--green-deep); font-size: 12px; font-weight: 700; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mini-candidate-meta { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; margin-top: 11px; }
.mini-candidate-price { color: var(--coral); font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.mini-candidate-time { color: var(--muted); font-size: 10px; }

.tasks-layout { display: grid; grid-template-columns: minmax(310px, .77fr) minmax(0, 1.23fr); gap: 18px; align-items: start; }
.task-editor-panel { position: sticky; top: 98px; }
.required-note, .optional-label { color: #99a29a; font-size: 10px; font-weight: 500; }
.task-editor-panel form { padding: 22px 24px 24px; }
.form-section { margin-bottom: 18px; }
.form-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-help { margin: 7px 0 0; color: #89948b; font-size: 10px; line-height: 1.55; }
.image-dropzone { position: relative; display: grid; place-items: center; min-height: 145px; padding: 17px; overflow: hidden; border: 1px dashed #bfcabd; border-radius: 13px; color: var(--green); background: #f2f5ea; text-align: center; transition: border-color .2s ease, background .2s ease; }
.image-dropzone:hover, .image-dropzone.is-dragging { border-color: var(--green); background: #eaf1e3; }
.image-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-prompt { display: grid; gap: 5px; place-items: center; }
.drop-prompt strong { font-size: 12px; }
.drop-prompt small { color: var(--muted); font-size: 10px; }
.drop-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--green-deep); background: var(--yellow); font-size: 19px; font-weight: 400; line-height: 1; }
.image-preview-wrap { position: relative; display: block; width: 100%; height: 160px; }
.image-preview-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 9px; background: #e6e7dd; }
.clear-image { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; color: var(--green-deep); background: rgba(255, 253, 247, .9); font-size: 17px; line-height: 1; }
.clear-image:hover { color: white; background: var(--coral); }
.toggle-field { min-width: 0; }
.toggle { display: flex; gap: 8px; align-items: center; min-height: 39px; color: var(--muted); font-size: 11px; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; display: inline-block; width: 37px; height: 21px; flex: 0 0 37px; border-radius: 99px; background: #c9d0c9; transition: background .2s ease; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease; }
.toggle input:checked + .toggle-track { background: var(--green); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid rgba(122, 157, 131, .3); }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; padding-top: 4px; }
.form-error { margin: 8px 0; color: var(--coral); font-size: 11px; line-height: 1.5; }
.task-list-panel { overflow: hidden; }
.task-list-heading { align-items: center; }
.panel-counter { color: var(--muted); font-size: 11px; }
.task-list { display: grid; gap: 8px; padding: 18px 24px 0; }
.task-row { display: grid; grid-template-columns: auto 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 78px; padding: 10px 11px; border: 1px solid #e6e5dc; border-radius: 13px; background: rgba(255, 253, 247, .66); transition: border-color .2s ease, background .2s ease; }
.task-row:hover { border-color: #b9c8ba; background: #fffdf7; }
.task-row.is-selected { border-color: #aec2ac; background: #f2f6ed; }
.task-check { width: 16px; height: 16px; accent-color: var(--green); }
.task-thumb { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 9px; color: #809080; background: #e7e8df; }
.task-thumb img { width: 100%; height: 100%; object-fit: cover; }
.task-thumb-placeholder { font-size: 18px; }
.task-row-copy { display: grid; min-width: 0; gap: 3px; }
.task-row-title { overflow: hidden; color: var(--green-deep); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.task-row-meta { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-row-tags { display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.task-state { display: inline-flex; padding: 2px 6px; border-radius: 5px; color: #6e7d72; background: #ecece5; font-size: 9px; }
.task-state.is-enabled { color: #327245; background: #e0efdd; }
.task-row-actions { display: flex; gap: 3px; align-items: center; }
.row-button { padding: 6px 7px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; }
.row-button:hover { color: var(--green); background: var(--green-soft); }
.row-button.danger:hover { color: var(--coral); background: #f4e2db; }
.task-list-footer { display: flex; justify-content: space-between; margin: 18px 24px 20px; padding-top: 13px; border-top: 1px solid #e6e5dc; color: #929b93; font-size: 10px; }
.dispatch-wide-panel { margin-top: 18px; }
.dispatch-wide-body { display: flex; gap: 30px; align-items: flex-end; justify-content: space-between; padding: 19px 24px 23px; }
.dispatch-wide-copy { max-width: 460px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dispatch-wide-copy p { margin: 0 0 6px; }
.small-note { color: #9aa39a; font-size: 10px; }
.dispatch-wide-controls { display: grid; grid-template-columns: minmax(170px, 220px) auto; gap: 8px 9px; align-items: end; min-width: min(100%, 440px); }
.dispatch-wide-controls .field-label { grid-column: 1 / -1; margin-bottom: -2px; }
.dispatch-wide-buttons { display: flex; gap: 7px; }
.dispatch-wide-buttons .button { white-space: nowrap; }

.large-count { padding-bottom: 4px; color: var(--green); font-size: 32px; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.large-count small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.candidate-panel { overflow: hidden; }
.filter-bar { display: flex; gap: 10px; align-items: center; padding: 18px 24px; border-bottom: 1px solid #e7e5dc; }
.search-field { position: relative; flex: 1; min-width: 180px; }
.search-field input { padding-left: 32px; }
.search-icon { position: absolute; z-index: 1; top: 8px; left: 11px; color: var(--muted); font-size: 19px; line-height: 1; }
.price-filter { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; white-space: nowrap; }
.price-filter input { width: 75px; min-height: 37px; }
.select-sort { width: auto; min-width: 130px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 730px; border-collapse: collapse; }
.data-table th { padding: 13px 24px; color: #8b958c; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: left; white-space: nowrap; }
.data-table td { padding: 15px 24px; border-top: 1px solid #eeece4; color: var(--muted); font-size: 11px; vertical-align: middle; }
.data-table tr:hover td { background: rgba(244, 247, 237, .6); }
.candidate-title-cell { max-width: 330px; color: var(--green-deep) !important; font-size: 12px !important; font-weight: 700; }
.candidate-price-cell { color: var(--coral) !important; font-size: 15px !important; font-weight: 800; white-space: nowrap; }
.candidate-time { display: grid; gap: 1px; white-space: nowrap; }
.candidate-time small { color: #a2aaa2; font-size: 9px; }
.candidate-source { display: grid; gap: 2px; min-width: 130px; }
.candidate-source strong { overflow: hidden; color: var(--green); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.candidate-source small { color: #9ba39b; font-size: 9px; }
.table-empty { padding: 52px 24px; }
.empty-state { display: grid; place-items: center; padding: 42px 24px; color: var(--muted); text-align: center; }
.empty-state h3 { margin: 10px 0 4px; color: var(--green); font-size: 14px; }
.empty-state p { max-width: 360px; margin: 7px 0 0; font-size: 11px; line-height: 1.65; }
.empty-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--green); background: var(--green-soft); font-size: 18px; }
.empty-state .button { margin-top: 15px; }

.activity-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 18px; }
.command-list, .log-list { display: grid; gap: 8px; padding: 18px 24px 24px; }
.command-item, .log-item { display: grid; gap: 5px; padding: 12px 13px; border: 1px solid #e7e5dc; border-radius: 11px; background: rgba(255, 253, 247, .65); }
.command-top, .log-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.command-action { color: var(--green); font-size: 11px; font-weight: 800; }
.command-time, .log-time { color: #9aa39a; font-size: 9px; white-space: nowrap; }
.command-message, .log-line { color: var(--muted); font-size: 11px; line-height: 1.55; }
.command-meta, .log-device { color: #9aa39a; font-size: 9px; }
.command-status { display: inline-flex; padding: 3px 6px; border-radius: 5px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.command-status.queued { color: #765c1e; background: var(--yellow-soft); }
.command-status.accepted { color: #357246; background: #e0efdd; }
.command-status.failed { color: #a35e4f; background: #f4e2db; }

.global-feedback { position: fixed; z-index: 20; top: 88px; right: 28px; max-width: min(420px, calc(100vw - 56px)); padding: 12px 15px; border: 1px solid #bfd1be; border-radius: 11px; color: #315e3c; background: #eff7ea; box-shadow: var(--shadow-small); font-size: 12px; animation: slide-in .25s ease both; }
.global-feedback.is-error { border-color: #e4b8a9; color: #9d584a; background: #fff1eb; }
.global-feedback.is-loading { border-color: #d7c781; color: #765f24; background: #fff9dd; }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(14, 44, 39, .27); backdrop-filter: blur(6px); animation: fade-in .2s ease both; }
.modal-card { position: relative; width: min(100%, 470px); padding: 31px 32px 28px; border: 1px solid rgba(23, 61, 53, .12); border-radius: 20px; background: #fffdf7; box-shadow: 0 30px 80px rgba(14, 44, 39, .22); animation: rise-in .25s ease both; }
.modal-card-small { width: min(100%, 390px); }
.modal-card h2 { margin: 7px 0 10px; color: var(--green-deep); font-size: 23px; letter-spacing: -.045em; }
.modal-copy { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.modal-close { position: absolute; top: 16px; right: 17px; transform: none; font-size: 21px; }
.detail-block { display: grid; gap: 6px; margin-top: 11px; }
.detail-block span { color: var(--muted); font-size: 10px; }
.detail-block code { display: block; overflow: auto; padding: 9px 10px; border-radius: 8px; color: var(--green); background: #eef1e7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; white-space: nowrap; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 25px; }

@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .app-layout { grid-template-columns: 184px minmax(0, 1fr); }
  .main-content { padding-right: 28px; padding-left: 28px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .tasks-layout, .activity-grid { grid-template-columns: 1fr; }
  .task-editor-panel { position: static; }
  .mini-candidate-list { grid-template-columns: repeat(3, minmax(170px, 1fr)); overflow-x: auto; }
}

@media (max-width: 760px) {
  .topbar { height: 64px; padding: 0 17px; }
  .sync-status { display: none; }
  .app-layout { display: block; min-height: calc(100vh - 64px); }
  .sidebar { position: sticky; z-index: 9; top: 64px; display: block; padding: 8px 12px; border-right: 0; border-bottom: 1px solid rgba(23, 61, 53, .1); background: rgba(245, 241, 232, .9); backdrop-filter: blur(18px); }
  .sidebar-label, .sidebar-bottom { display: none; }
  .main-nav { display: flex; gap: 3px; overflow-x: auto; }
  .nav-item { width: auto; flex: 0 0 auto; padding: 9px 11px; white-space: nowrap; }
  .nav-count { display: none; }
  .main-content { padding: 28px 16px 50px; }
  .page-heading, .heading-overview { display: grid; gap: 18px; align-items: start; }
  .page-heading h1 { font-size: 31px; }
  .page-heading .button, .heading-actions { width: 100%; }
  .heading-actions { display: flex; }
  .heading-actions .button { flex: 1; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 124px; padding: 14px; }
  .stat-card strong { margin-top: 13px; font-size: 27px; }
  .panel-heading { padding-right: 17px; padding-left: 17px; }
  .device-list, .task-list, .command-list, .log-list, .mini-candidate-list { padding-right: 17px; padding-left: 17px; }
  .dispatch-fields, .panel-intro { margin-right: 17px; margin-left: 17px; }
  .dispatch-fields { padding-right: 0; padding-left: 0; }
  .dispatch-hint { margin-right: 17px; margin-left: 17px; }
  .dispatch-wide-body { display: grid; gap: 18px; padding-right: 17px; padding-left: 17px; }
  .dispatch-wide-controls { display: grid; min-width: 0; }
  .dispatch-wide-buttons { flex-wrap: wrap; }
  .filter-bar { flex-wrap: wrap; padding: 14px 17px; }
  .search-field { flex-basis: 100%; }
  .price-filter { flex: 1; }
  .select-sort { flex: 1; }
  .data-table th, .data-table td { padding-right: 17px; padding-left: 17px; }
  .pairing-card { padding: 35px 25px 30px; }
  .pairing-side-note { display: none; }
  .modal-card { padding: 28px 22px 23px; }
}

@media (max-width: 430px) {
  .wordmark-copy small, .pairing-chip span:last-child { display: none; }
  .topbar-right { gap: 7px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-section-grid { grid-template-columns: 1fr; gap: 14px; }
  .task-row { grid-template-columns: auto 42px minmax(0, 1fr); gap: 9px; }
  .task-thumb { width: 42px; height: 42px; }
  .task-row-actions { grid-column: 3; justify-content: flex-end; }
  .task-list-footer { display: grid; gap: 5px; margin-right: 17px; margin-left: 17px; }
  .input-with-action { display: grid; }
}
