:root {
  --ink: #19252d;
  --muted: #6b7880;
  --line: #dfe5e7;
  --paper: #f4f7f7;
  --surface: #ffffff;
  --nav: #17272e;
  --nav-muted: #a8b7bb;
  --nav-active: #d5f0e8;
  --accent: #0f806d;
  --accent-dark: #096553;
  --blue: #2e6e9e;
  --amber: #b26b12;
  --red: #b44c4c;
  --green: #2d835c;
  --shadow: 0 8px 24px rgba(22, 42, 49, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 36px; background: #e9f1f0; }
.auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 36px; border-radius: 8px; }
.brand-lockup { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--accent); color: white; border-radius: 8px; font-weight: 800; letter-spacing: 0; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.brand-subtitle { color: var(--muted); font-size: 13px; margin-top: 3px; }
.auth-card h1 { font-size: 24px; margin: 0 0 8px; }
.auth-card p { color: var(--muted); line-height: 1.6; margin: 0 0 24px; }
.form-stack { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 650; color: #44545b; }
input, select, textarea { width: 100%; border: 1px solid #cbd6d9; background: #fff; color: var(--ink); border-radius: 5px; padding: 10px 11px; min-height: 40px; outline: none; }
textarea { resize: vertical; min-height: 86px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,128,109,.12); }
input[readonly] { background: #f2f5f5; color: #33464d; cursor: default; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.btn { border: 1px solid transparent; background: var(--accent); color: white; border-radius: 5px; min-height: 38px; padding: 0 15px; font-weight: 650; }
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: white; color: var(--ink); border-color: #cbd6d9; }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn.danger { background: white; color: var(--red); border-color: #dfb8b8; }
.btn.small { min-height: 30px; padding: 0 9px; font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.error-text { color: var(--red); font-size: 13px; min-height: 19px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.sidebar { background: var(--nav); color: white; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar-head { padding: 24px 19px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand-mark { background: #d5f0e8; color: var(--nav); }
.sidebar .brand-name { font-size: 17px; }
.sidebar .brand-subtitle { color: var(--nav-muted); }
.nav { padding: 14px 10px; display: grid; gap: 4px; }
.nav button { width: 100%; border: 0; background: transparent; color: var(--nav-muted); text-align: left; padding: 11px 10px; border-radius: 5px; font-size: 14px; }
.nav button:hover { background: rgba(255,255,255,.08); color: white; }
.nav button.active { background: var(--nav-active); color: var(--nav); font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 16px 19px; border-top: 1px solid rgba(255,255,255,.1); }
.user-name { font-weight: 650; font-size: 14px; }
.user-role { font-size: 12px; color: var(--nav-muted); margin-top: 4px; }
.logout { margin-top: 13px; width: 100%; border: 1px solid rgba(255,255,255,.18); color: white; background: transparent; border-radius: 5px; min-height: 34px; }
.logout:hover { background: rgba(255,255,255,.08); }

.main { min-width: 0; }
.topbar { height: 72px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; }
.topbar h1 { font-size: 21px; margin: 0; }
.topbar-meta { color: var(--muted); font-size: 13px; }
.page { padding: 28px 34px 48px; max-width: 1500px; }
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-intro h2 { margin: 0; font-size: 24px; }
.page-intro p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.section-title { margin: 28px 0 12px; font-size: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.panel-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-body { padding: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 16px; min-height: 104px; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { font-size: 28px; font-weight: 750; letter-spacing: 0; margin-top: 10px; }
.metric-note { color: var(--muted); font-size: 12px; margin-top: 7px; }
.metric.accent { border-top: 3px solid var(--accent); }
.metric.warn { border-top: 3px solid var(--amber); }
.metric.danger { border-top: 3px solid var(--red); }
.metric.blue { border-top: 3px solid var(--blue); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.stack { display: grid; gap: 14px; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid #edf0f1; white-space: nowrap; vertical-align: middle; }
th { background: #f7f9f9; color: #59676d; font-size: 12px; font-weight: 700; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: #fbfdfd; }
.table-note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; background: #edf1f2; color: #536168; }
.badge.green { color: var(--green); background: #e7f4ec; }
.badge.amber { color: var(--amber); background: #fff3df; }
.badge.red { color: var(--red); background: #fceaea; }
.badge.blue { color: var(--blue); background: #e9f2fa; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0f1; }
.status-line:last-child { border-bottom: 0; }
.status-label { color: #536168; }
.split-form { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; align-items: end; }
.split-form .wide { grid-column: span 2; }
.form-section { padding: 18px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section h4 { margin: 0 0 14px; font-size: 14px; }
.form-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.form-section-head h4 { margin: 0; }
.form-section-head .hint { display: block; margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-4 { grid-column: span 4; }
.check-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid #edf0f1; }
.check-row:last-child { border-bottom: 0; }
.check-account { min-width: 0; }
.check-account strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.check-account span { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.mini-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.check-row input, .check-row select { min-height: 35px; padding: 7px; }
.progress { height: 8px; background: #e8eeee; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.bar-list { display: grid; gap: 13px; }
.bar-item { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; font-size: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,33,39,.45); display: grid; place-items: center; padding: 28px; z-index: 10; }
.modal { width: min(720px, 100%); max-height: 90vh; overflow: auto; background: white; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide-modal { width: min(1120px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; }
.close { border: 0; background: transparent; font-size: 22px; color: var(--muted); }
.notice { padding: 12px 14px; border-left: 3px solid var(--blue); background: #edf5fb; color: #3f5f72; font-size: 13px; line-height: 1.5; }
.notice.warn { border-color: var(--amber); background: #fff7e9; color: #76521e; }
.notice.compact { display: inline-block; padding: 8px 10px; }
.room-advanced { border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.room-advanced summary { cursor: pointer; padding: 10px 12px; color: #536168; font-size: 13px; font-weight: 650; }
.room-advanced[open] summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.room-advanced > .form-grid { padding: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.detail-grid .span-2 { grid-column: 1 / -1; }
.detail-grid p { margin: 5px 0 0; line-height: 1.65; white-space: pre-wrap; }
.improvement-card { overflow: hidden; }
.toast { position: fixed; left: 50%; top: 50%; z-index: 40; min-width: 260px; max-width: min(520px, calc(100vw - 40px)); background: #1b2b32; color: white; padding: 16px 22px; border-radius: 8px; box-shadow: 0 18px 52px rgba(17,33,39,.28); opacity: 0; transform: translate(-50%, -42%) scale(.97); pointer-events: none; transition: .18s ease; font-size: 15px; font-weight: 650; line-height: 1.5; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast.success { background: #106f60; }
.toast.error { background: #963f3f; }
.hidden { display: none !important; }
.section-gap { margin-top: 18px; }
.execution-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.current-focus { overflow: hidden; border: 1px solid #b9d8d0; border-radius: 9px; background: linear-gradient(120deg,#eaf7f3 0%,#f7fbfa 65%,#edf6fb 100%); box-shadow: 0 8px 24px rgba(19,91,78,.08); }
.current-focus-label { display: inline-block; padding: 6px 13px; background: var(--accent); color: white; font-size: 11px; font-weight: 750; letter-spacing: .03em; }
.current-focus-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px 20px; }
.current-focus-main h3 { margin: 0; font-size: 20px; }
.current-focus-main p { margin: 7px 0 0; color: #455a61; font-size: 13px; }
.current-focus-task { display: inline-block; margin-top: 10px; color: #167163; font-size: 12px; font-weight: 650; }
.today-date-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 16px; padding: 11px 14px; border-radius: 6px; background: #edf5f3; color: #526268; font-size: 12px; }
.today-date-note strong { color: var(--ink); }
.today-work-grid { display: grid; grid-template-columns: minmax(400px,.85fr) minmax(520px,1.35fr); gap: 16px; align-items: start; }
.day-timeline { padding-top: 14px; padding-bottom: 10px; }
.day-slot { display: grid; grid-template-columns: 84px 20px minmax(0,1fr) auto; gap: 8px; align-items: start; min-height: 78px; position: relative; }
.day-slot-time { padding-top: 2px; color: #53666d; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-slot-marker { position: relative; align-self: stretch; }
.day-slot-marker::after { content: ''; position: absolute; left: 6px; top: 15px; bottom: -3px; width: 2px; background: #dce5e3; }
.day-slot:last-child .day-slot-marker::after { display: none; }
.day-slot-marker span { position: relative; display: block; width: 14px; height: 14px; border: 3px solid #b8c8c5; border-radius: 50%; background: white; z-index: 1; }
.day-slot.current .day-slot-marker span { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(16,139,122,.12); }
.day-slot.current .day-slot-content strong { color: var(--accent); }
.day-slot.past { opacity: .62; }
.day-slot.rest .day-slot-marker span { border-color: #d7c9a7; background: #fff8e9; }
.day-slot-content { padding: 0 6px 13px 0; }
.day-slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-slot-content p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.day-slot > .btn { margin-top: -3px; white-space: nowrap; }
.flexible-pool .panel-body { max-height: 720px; overflow: auto; }
.work-phase { margin-top: 22px; }
.work-phase-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.work-phase-head h3 { margin: 0; font-size: 16px; }
.work-phase-head span { color: var(--muted); font-size: 12px; }
.work-task-list { display: grid; gap: 9px; }
.work-task { display: grid; grid-template-columns: 82px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 15px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 7px; background: var(--surface); box-shadow: 0 4px 14px rgba(22,42,49,.035); }
.work-task.red { border-left-color: var(--red); }
.work-task.amber { border-left-color: var(--amber); }
.work-task.green { border-left-color: var(--green); opacity: .82; }
.work-task-title { display: grid; gap: 4px; }
.work-task-title strong { font-size: 14px; }
.work-task-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.work-task-detail > span:first-child { color: #4f6067; font-size: 13px; }
.work-task-detail .badge { flex: 0 0 auto; }
.current-focus-task .badge { margin-left: 5px; vertical-align: middle; }
.work-task-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.work-task-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
.low-frequency-button { min-height: 30px; padding: 6px 10px; font-size: 12px; }
.task-issue-link { min-height: 0; border: 0; background: transparent; padding: 1px 0; color: var(--red); font: inherit; font-size: 12px; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.task-issue-link:hover { color: #8d2f2f; }
.task-issue-link:focus-visible { outline: 2px solid rgba(182,75,75,.28); outline-offset: 3px; border-radius: 2px; }
.low-frequency-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.issue-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.issue-choice { display: grid; gap: 7px; text-align: left; border: 1px solid var(--line); background: #f7fbfa; border-radius: 8px; padding: 16px; cursor: pointer; color: var(--ink); }
.issue-choice:hover { border-color: var(--accent); background: #eef8f5; }
.issue-choice strong { font-size: 15px; }
.issue-choice span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.danger-choice { background: #fffafa; border-color: #ead7d5; }
.unified-live-task-list { display: grid; gap: 10px; }
.unified-live-task { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-left: 3px solid #2b7bb9; border-radius: 8px; padding: 14px 16px; }
.unified-live-task.completed { border-left-color: #2a927d; background: #fbfefd; }
.unified-live-task.overdue { border-left-color: #b64b4b; }
.unified-live-task-main { min-width: 0; }
.unified-live-task-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.unified-live-task-main p { margin: 7px 0; color: var(--muted); }
.unified-live-task-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.task-type-filter { display: flex; gap: 8px; }
.task-type-filter button { border: 1px solid var(--line); background: white; color: var(--muted); padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.task-type-filter button.active { border-color: var(--accent); background: #edf8f5; color: var(--accent); font-weight: 700; }
@media (max-width: 720px) { .issue-choice-grid { grid-template-columns: 1fr; } .unified-live-task { align-items: flex-start; flex-direction: column; } .unified-live-task-actions { width: 100%; } }
.completed-work { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.completed-work summary { cursor: pointer; padding: 14px 16px; font-weight: 650; color: #4d5d64; }
.completed-work .work-task-list { padding: 0 14px 14px; }
.success-empty { display: grid; gap: 7px; }
.success-empty strong { color: var(--green); font-size: 16px; }
.compact-results { display: flex; flex-wrap: wrap; gap: 18px 34px; color: #526268; font-size: 13px; }
.compact-results strong { color: var(--ink); font-size: 18px; margin-right: 4px; }
.execution-choice { display: grid; grid-template-columns: 170px minmax(180px, 260px) 1fr; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 13px; border-radius: 6px; background: #edf5f3; }
.execution-choice label { font-size: 13px; font-weight: 700; }
.execution-choice select { min-height: 36px; }
.no-start-grid { padding: 14px; border: 1px solid #ecd4ad; background: #fff9ef; border-radius: 6px; margin-bottom: 12px; }
.morning-list { display: grid; gap: 14px; }
.morning-card { border: 1px solid var(--line); border-radius: 6px; padding: 16px; background: #fbfdfd; }
.morning-card.is-saved { border-color: #b8d8ce; }
.morning-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 15px; }
.morning-card-head strong { display: block; font-size: 15px; }
.morning-card-head span:not(.badge) { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.morning-page-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; }
.morning-page-actions label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.morning-page-actions input { min-height: 38px; padding: 7px 9px; }
.inline-field { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.inline-field select { width: 112px; min-height: 34px; padding: 5px 8px; }
.morning-template-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 4px; background: #f0f6f5; border-radius: 5px; color: #526268; font-size: 12px; }
.morning-saved-summary { display: flex; gap: 12px; align-items: flex-start; margin: -2px 0 12px; padding: 10px 12px; border-radius: 5px; background: #edf8f3; color: #456159; font-size: 12px; line-height: 1.5; }
.morning-saved-summary strong { flex: 0 0 auto; color: #176b59; }
.morning-runs { display: grid; }
.morning-run { padding: 16px 0; border-top: 1px solid var(--line); }
.morning-run.is-pending { opacity: .72; }
.morning-run:first-child { padding-top: 0; border-top: 0; }
.morning-run-head { display: flex; justify-content: space-between; align-items: center; min-height: 32px; margin-bottom: 12px; }
.morning-run-head strong { font-size: 13px; color: #405158; }
.morning-run-head > div { display: grid; gap: 4px; }
.morning-plan { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.empty.compact { padding: 18px 12px; }
.mobile-device-list { display: grid; gap: 10px; }
.mobile-device-card { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 6px; padding: 14px; background: #fbfdfd; }
.mobile-device-card strong { display: block; font-size: 14px; }
.mobile-device-card span:not(.badge) { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.mobile-device-status { min-width: 150px; text-align: center; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.work-date-explain { display: flex; align-items: center; gap: 6px; }
.recording-task-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.recording-task-tabs button { min-width: 150px; padding: 12px 18px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #53656c; font-weight: 700; cursor: pointer; }
.recording-task-tabs button.active { border-bottom-color: var(--accent); color: var(--accent); background: #f1f8f6; }
.recording-task-tabs strong { margin-left: 5px; }
.recording-workspace { display: grid; grid-template-columns: minmax(290px,.7fr) minmax(600px,1.3fr); min-height: 520px; overflow: hidden; }
.recording-task-list { display: grid; align-content: start; gap: 8px; padding: 14px; border-right: 1px solid var(--line); background: #f7f9f9; max-height: 720px; overflow: auto; }
.recording-task-item { display: grid; gap: 5px; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid transparent; border-radius: 7px; background: white; color: var(--ink); text-align: left; cursor: pointer; }
.recording-task-item:hover { border-color: #9ec6be; }
.recording-task-item.active { border-color: #79b5a9; border-left-color: var(--accent); background: #eff8f5; box-shadow: 0 5px 16px rgba(20,80,68,.08); }
.recording-task-item > span:not(.recording-task-item-head) { color: var(--muted); font-size: 12px; }
.recording-task-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.recording-task-item-head strong { margin-right: auto; font-size: 14px; }
.recording-task-detail { min-width: 0; padding: 22px; overflow: auto; }
.recording-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.recording-detail-head h3 { display: flex; align-items: center; gap: 7px; margin: 5px 0; font-size: 20px; }
.recording-detail-head p { margin: 0; color: var(--muted); font-size: 12px; }
.recording-detail-kicker { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.recording-detail-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-bottom: 16px; }
.recording-detail-facts > span { display: grid; gap: 4px; padding: 11px 12px; border-radius: 6px; background: #f2f6f5; }
.recording-detail-facts small { color: var(--muted); font-size: 11px; }
.recording-detail-facts strong { font-size: 13px; }
.computer-result-detail.morning-card { border: 0; padding: 0; background: transparent; }
.mobile-shift-select { width: 118px; min-height: 34px; margin-top: 5px; padding: 5px 8px; }
.daily-shift-field { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 2px; color: var(--muted); font-size: 12px; }
.daily-shift-field .mobile-shift-select { margin-top: 0; }
.morning-add-row { margin-top: 4px; }
.eligibility-section .panel-head > div:first-child { display: grid; gap: 5px; }
.eligibility-action-list { display: grid; gap: 10px; }
.eligibility-action-card { display: grid; grid-template-columns: minmax(260px,1fr) minmax(150px,220px) auto; gap: 18px; align-items: center; padding: 14px 15px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 6px; background: #fffdf8; }
.eligibility-action-card.is-complete { border-left-color: var(--green); background: #f6fbf9; }
.eligibility-action-card.is-focused { outline: 3px solid rgba(15,134,113,.22); }
.eligibility-action-card > div:first-child > span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.eligibility-action-card .eligibility-device-hint { display:block; margin-top:6px; color:var(--ink); font-size:12px; font-weight:600; }
.eligibility-account-title { display: flex; align-items: center; gap: 8px; }
.eligibility-account-title strong { font-size: 15px; }
.eligibility-date-block { display: grid; gap: 3px; }
.eligibility-date-block span, .eligibility-date-block small { color: var(--muted); font-size: 11px; }
.eligibility-date-block strong { font-size: 14px; }
.eligibility-completed { margin-top: 5px; border-top: 1px solid var(--line); }
.eligibility-completed > summary { cursor: pointer; padding: 13px 2px 4px; color: #526268; font-size: 13px; font-weight: 650; }
.eligibility-completed > .eligibility-action-list { padding-top: 8px; }
.schedule-summary { color: var(--muted); font-size: 12px; }
.schedule-summary strong { color: var(--accent); font-size: 20px; margin-right: 4px; }
.schedule-group + .schedule-group { margin-top: 22px; }
.schedule-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.schedule-group-head h4 { margin: 0; font-size: 14px; }
.schedule-group-head span { color: var(--muted); font-size: 12px; }
.schedule-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.schedule-account-card { display: grid; grid-template-columns: 20px 72px minmax(0,1fr) auto; gap: 9px; align-items: center; min-height: 78px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; cursor: pointer; transition: .15s ease; }
.schedule-account-card:hover { border-color: #93bdb5; }
.schedule-account-card.is-selected { border-color: #74b5a8; background: #eff8f5; box-shadow: inset 3px 0 var(--accent); }
.schedule-account-card input { width: 17px; height: 17px; }
.schedule-check-text { color: var(--muted); font-size: 12px; font-weight: 650; }
.schedule-account-card.is-selected .schedule-check-text { color: var(--accent); }
.schedule-account-main { display: grid; gap: 4px; min-width: 0; }
.schedule-account-main strong { font-size: 14px; }
.schedule-account-main em { margin-left: 4px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; }
.schedule-account-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-exception { opacity: 0; transition: .15s ease; }
.schedule-account-card:hover .schedule-exception { opacity: 1; }
.link-button { border: 0; background: transparent; color: #7b5d2a; font-size: 12px; cursor: pointer; white-space: nowrap; }
.plan-change-bar { position: sticky; bottom: 12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 12px 14px; border: 1px solid #b9d8d1; border-radius: 7px; background: rgba(244,250,248,.96); box-shadow: 0 8px 25px rgba(20,50,47,.1); }
.plan-change-bar span { color: #526268; font-size: 13px; }
.eligibility-other { overflow: hidden; }
.eligibility-other > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 18px; list-style-position: inside; }
.eligibility-other > summary > span:first-child { display: grid; gap: 4px; }
.eligibility-other > summary small, .eligibility-other > summary > span:last-child { color: var(--muted); font-size: 12px; font-weight: 400; }
.eligibility-other-block + .eligibility-other-block { margin-top: 20px; }
.eligibility-other-block h4 { margin: 0 0 8px; font-size: 13px; color: #4e6067; }
.eligibility-other-row { display: grid; grid-template-columns: minmax(240px,1fr) minmax(200px,.7fr) auto; gap: 16px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #edf0f1; }
.eligibility-other-row:last-child { border-bottom: 0; }
.eligibility-other-row > div { display: grid; gap: 4px; }
.eligibility-other-row > div > span:not(.badge) { color: var(--muted); font-size: 12px; }
.eligibility-other-row .hint { display: inline-block; margin-left: 8px; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; min-height: 64px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 17px; bottom: -5px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; margin-top: 4px; border: 2px solid var(--accent); background: white; border-radius: 50%; z-index: 1; }
.timeline-item p { margin: 7px 0 0; color: #46565d; font-size: 13px; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 196px 1fr; }
  .page { padding-left: 22px; padding-right: 22px; }
  .metric-grid, .execution-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .today-work-grid { grid-template-columns: 1fr; }
  .form-grid, .split-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid .span-4 { grid-column: span 2; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; }
  .current-focus-main { align-items: stretch; flex-direction: column; }
  .day-slot { grid-template-columns: 74px 18px minmax(0,1fr); }
  .day-slot > .btn { grid-column: 3; justify-self: start; margin-bottom: 12px; }
  .sidebar-head { padding: 14px 18px; }
  .sidebar-foot { display: none; }
  .nav { display: flex; overflow-x: auto; padding: 8px; }
  .nav button { white-space: nowrap; width: auto; }
  .topbar { height: 60px; padding: 0 18px; }
  .page { padding: 18px; }
  .page-intro { display: block; }
  .metric-grid, .execution-metrics, .three-col, .form-grid, .split-form { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid .span-4 { grid-column: span 1; }
  .check-row { grid-template-columns: 1fr 1fr; }
  .check-account { grid-column: span 2; }
  .mobile-device-card { grid-template-columns: 1fr; }
  .recording-workspace { grid-template-columns: 1fr; }
  .recording-task-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .recording-detail-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mobile-device-status { text-align: left; justify-content: flex-start; }
  .work-task { grid-template-columns: 1fr; }
  .work-task-state { order: -1; }
  .work-task-actions { justify-content: flex-start; }
  .execution-choice { grid-template-columns: 1fr; }
  .eligibility-action-card, .eligibility-other-row { grid-template-columns: 1fr; }
  .schedule-card-grid { grid-template-columns: 1fr; }
  .schedule-account-card { grid-template-columns: 20px 72px minmax(0,1fr); }
  .schedule-exception { display: none; }
  .eligibility-other > summary { align-items: flex-start; flex-direction: column; }
}

/* 账号中心：行动优先，状态可筛选，主表只保留决策所需信息。 */
.account-state-grid { display:grid; grid-template-columns:repeat(8,minmax(102px,1fr)); gap:10px; }
.account-state-card { text-align:left; border:1px solid var(--line); background:#fff; border-radius:10px; padding:13px 14px; color:var(--ink); cursor:pointer; }
.account-state-card span { display:block; color:var(--muted); font-size:12px; }
.account-state-card strong { display:block; margin-top:4px; font-size:25px; }
.account-state-card:hover,.account-state-card.active { border-color:var(--accent); box-shadow:inset 0 3px var(--accent); background:#f4fbf9; }
.account-center-toolbar { padding:14px 16px 4px; border-bottom:1px solid var(--line); }
.account-anchor-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.account-anchor-tabs button { border:1px solid var(--line); border-radius:999px; background:#fff; padding:7px 13px; cursor:pointer; color:var(--muted); }
.account-anchor-tabs button.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.account-filter-row { display:grid; grid-template-columns:minmax(220px,1fr) 160px 160px 180px auto; gap:9px; align-items:end; }
.account-filter-row input,.account-filter-row select { width:100%; }
.account-search-group { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.account-center-table th { white-space:nowrap; }
.account-center-table td { vertical-align:top; }
.account-center-table td:first-child { min-width:180px; }
.account-center-table td:nth-child(5) { min-width:190px; }
.account-row-actions { min-width:180px; }
.team-page-actions { display:flex; align-items:end; gap:10px; }
.team-page-actions label { display:grid; gap:5px; color:var(--muted); font-size:12px; }
.team-execution-list { display:grid; }
.team-execution-row { padding:18px; border-top:1px solid var(--line); background:#fff; }
.team-execution-row:first-child { border-top:0; }
.team-execution-row > header { display:grid; grid-template-columns:minmax(160px,220px) 1fr; gap:20px; align-items:center; }
.team-execution-row > header > div:first-child { display:flex; align-items:center; gap:10px; }
.team-execution-row > header > div:first-child > strong { font-size:16px; }
.team-row-facts { display:grid; grid-template-columns:repeat(4,minmax(80px,1fr)); gap:8px; }
.team-row-facts span { padding:9px 11px; border-radius:5px; background:#f3f7f6; color:var(--muted); font-size:12px; }
.team-row-facts b { display:block; margin-top:2px; color:var(--ink); font-size:18px; }
.team-schedule-detail { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.team-schedule-detail > div > span,.team-detail-label { display:block; margin-bottom:7px; color:#526168; font-size:12px; font-weight:700; }
.team-account-chips,.team-task-chips { display:flex; flex-wrap:wrap; gap:6px; }
.team-account-chips span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 8px; border-radius:4px; background:#eef4f3; color:#405158; font-size:11px; }
.team-none { color:#95a2a6; font-size:12px; }
.team-execution-detail { display:grid; grid-template-columns:240px 1fr; gap:18px; align-items:start; margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.team-progress { display:grid; gap:7px; }
.team-progress > span { height:8px; overflow:hidden; border-radius:999px; background:#e7edec; }
.team-progress i { display:block; height:100%; border-radius:999px; background:var(--accent); }
.team-progress strong { color:#405158; font-size:12px; }
.team-task-chips > span { display:grid; gap:2px; min-width:190px; padding:7px 9px; border-left:3px solid #2c73a8; border-radius:4px; background:#f4f8fa; }
.team-task-chips > span.blocked { border-left-color:#bd7a14; background:#fff8ec; }
.team-task-chips > span.overdue { border-left-color:#b94b4b; background:#fff4f4; }
.team-task-chips strong { color:#26383f; font-size:12px; }
.team-task-chips small { color:var(--muted); font-size:10px; }
.discard-choice { display:flex; gap:12px; align-items:flex-start; border:1px solid #efc7c7; background:#fff8f8; border-radius:8px; padding:12px; cursor:pointer; }
.discard-choice input { width:18px; height:18px; margin-top:2px; }
.discard-choice span,.discard-choice small { display:block; }
.discard-choice small { color:var(--muted); margin-top:3px; }
.low-frequency-action { border-top:1px solid var(--line); padding-top:10px; }
.low-frequency-action summary { width:max-content; cursor:pointer; color:var(--muted); font-size:13px; user-select:none; }
.low-frequency-action summary:hover { color:var(--ink); }
.low-frequency-action[open] .discard-choice { margin-top:9px; }
.low-frequency-action .discard-choice { border:1px solid #ead7d5; background:#fffafa; box-shadow:none; padding:10px 12px; }
.low-frequency-action .discard-choice strong { font-size:14px; }
.ocr-capture { border:1px solid #c8dce7; background:#f7fbfd; border-radius:8px; padding:16px; }
.entry-block { border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden; }
.entry-block-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:14px 16px; border-bottom:1px solid var(--line); background:#f7faf9; }
.entry-block-head > div > span { display:block; color:var(--accent); font-size:11px; font-weight:700; letter-spacing:.06em; }
.entry-block-head strong { display:block; margin-top:2px; font-size:16px; }
.entry-block-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.entry-block-content { padding:16px; }
.ocr-entry-block { border-color:#bed9e4; }
.ocr-entry-block > .entry-block-head { background:#f2f8fb; }
.manual-entry-block { border-color:#c9ddd7; }
.manual-entry-block > .entry-block-head { background:#f3f9f7; }
.session-correction-form { gap:16px; }
.correction-reference { border-color:#bed9e4; }
.correction-reference > .entry-block-head { background:#f2f8fb; }
.session-source-images { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px; }
.session-source-images a { min-width:0; display:grid; grid-template-rows:minmax(180px,310px) auto; gap:8px; padding:10px; border:1px solid var(--line); border-radius:7px; background:#f8fafb; color:#405158; text-decoration:none; }
.session-source-images a:hover { border-color:var(--accent); color:var(--accent-dark); }
.session-source-images img { width:100%; height:100%; max-height:310px; object-fit:contain; border-radius:5px; background:#eef2f3; }
.session-source-images span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; text-align:center; }
.correction-reason-block { border-color:#c9ddd7; }
.correction-reason-block > .entry-block-head { background:#f3f9f7; }
.correction-history { margin-top:12px; border-top:1px solid var(--line); padding-top:12px; }
.correction-history summary { cursor:pointer; color:#405158; font-size:13px; font-weight:650; }
.correction-history > div { display:grid; grid-template-columns:auto 1fr; gap:3px 12px; margin-top:10px; padding:10px 12px; border-radius:5px; background:#f7f9f9; font-size:12px; }
.correction-history > div span { color:var(--muted); text-align:right; }
.correction-history > div p { grid-column:1/-1; margin:0; color:#405158; }
.ocr-capture-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:12px; }
.ocr-capture-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.ocr-dropzone { min-height:150px; border:2px dashed #9bb8c7; border-radius:8px; background:#fff; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:7px; cursor:pointer; color:var(--muted); outline:none; }
.ocr-dropzone:hover,.ocr-dropzone:focus,.ocr-dropzone.is-dragging { border-color:var(--accent); background:#f0faf7; color:var(--ink); }
.ocr-drop-icon { width:34px; height:34px; border-radius:7px; background:#d9eee9; color:var(--accent); display:grid; place-items:center; font-weight:800; }
.ocr-preview-list { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.ocr-preview { display:flex; align-items:center; gap:7px; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:#fff; font-size:12px; }
.ocr-preview img { width:42px; height:42px; object-fit:cover; border-radius:4px; }
.ocr-preview button { border:0; background:transparent; color:#8c4b4b; font-size:18px; cursor:pointer; }
.ocr-actions { display:flex; align-items:center; gap:9px; margin-top:11px; flex-wrap:wrap; }
.ocr-status { color:var(--muted); font-size:12px; }
.ocr-metrics { border:1px solid var(--line); border-radius:8px; padding:14px; background:#fff; }
.section-caption { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.section-caption span { color:var(--muted); font-size:12px; }
.ocr-more-fields { border-top:1px solid var(--line); margin-top:12px; padding-top:10px; }
.ocr-more-fields summary { color:var(--accent); cursor:pointer; font-size:13px; }
.ocr-field-status { display:block; min-height:16px; color:var(--accent); font-size:11px; }
input.ocr-needs-review { border-color:#ca8a04; background:#fffaf0; box-shadow:0 0 0 2px rgba(202,138,4,.12); }
@media (min-width: 721px) { .modal:has(.ocr-capture) { width:min(1040px,100%); } }
.session-filter-panel { box-shadow:none; }
.session-filter-row { display:grid; grid-template-columns:minmax(180px,1fr) auto auto 150px; gap:18px; align-items:end; padding:16px 18px 13px; }
.session-filter-row > label { display:grid; gap:6px; color:#44545b; font-size:12px; font-weight:650; }
.filter-label { display:block; margin-bottom:6px; color:#44545b; font-size:12px; font-weight:650; }
.session-filter-placeholder { min-width:220px; }
.segmented-control { display:flex; width:max-content; border:1px solid #cbd6d9; border-radius:6px; overflow:hidden; background:#fff; }
.segmented-control button { min-height:40px; padding:0 14px; border:0; border-right:1px solid #dce3e5; background:#fff; color:#526168; font-weight:650; }
.segmented-control button:last-child { border-right:0; }
.segmented-control button:hover { background:#f2f7f6; color:var(--accent-dark); }
.segmented-control button.active { background:var(--accent); color:#fff; }
.session-filter-foot { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:11px 18px; border-top:1px solid var(--line); background:#f7faf9; color:var(--muted); font-size:12px; }
.session-scope-note strong { color:var(--ink); }
.check-inline { display:flex; align-items:center; gap:7px; white-space:nowrap; cursor:pointer; }
.check-inline input { width:16px; height:16px; min-height:0; }
.session-view-tabs { display:flex; gap:4px; margin-top:18px; border-bottom:1px solid var(--line); }
.session-view-tabs button { min-width:112px; padding:11px 16px; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--muted); font-weight:700; }
.session-view-tabs button.active { border-bottom-color:var(--accent); color:var(--accent-dark); background:#eef7f4; }
.session-metric-switch { display:flex; align-items:center; gap:12px; margin-top:16px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:#f7faf9; }
.session-metric-switch > span { color:#44545b; font-size:12px; font-weight:700; }
.session-metric-switch > small { color:var(--muted); font-size:12px; }
.session-kpis { margin-top:16px; }
.session-kpi .metric-note { line-height:1.45; }
.metric-basis { margin-top:8px; padding-top:8px; border-top:1px solid #e4eaeb; color:#40545b; font-size:12px; font-weight:650; line-height:1.45; }
.metric-cell-basis { margin-top:4px; color:#526268; font-size:11px; line-height:1.4; white-space:nowrap; }
.session-analysis-table { min-width:1060px; }
.session-analysis-table td:first-child { min-width:190px; }
.session-detail-context { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:16px; color:var(--muted); font-size:12px; }
.session-detail-context > span:last-child { margin-left:auto; }
.session-detail-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:18px; }
.session-detail-stat { display:grid; gap:7px; padding:13px 14px; border:1px solid var(--line); border-radius:7px; background:#f7faf9; }
.session-detail-stat span,.session-detail-stat small { color:var(--muted); font-size:11px; line-height:1.4; }
.session-detail-stat strong { font-size:20px; }
.session-detail-grid + .panel th small { color:var(--muted); font-size:10px; font-weight:500; white-space:nowrap; }
@media (min-width: 721px) { .modal:has(.session-detail-grid) { width:min(1100px,100%); } }
@media (max-width: 1200px) {
  .account-state-grid { grid-template-columns:repeat(4,minmax(120px,1fr)); }
  .account-filter-row { grid-template-columns:1fr 1fr; }
  .session-filter-row { grid-template-columns:1fr 1fr; }
  .session-filter-placeholder { display:none; }
  .team-schedule-detail { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .session-filter-row,.session-detail-grid { grid-template-columns:1fr; }
  .segmented-control { width:100%; }
  .segmented-control button { flex:1; padding:0 8px; }
  .session-filter-foot { align-items:flex-start; flex-direction:column; }
  .session-metric-switch { align-items:flex-start; flex-direction:column; }
  .session-detail-context > span:last-child { margin-left:0; width:100%; }
  .team-page-actions { align-items:stretch; flex-direction:column; }
  .team-execution-row > header,.team-execution-detail { grid-template-columns:1fr; }
  .team-row-facts,.team-schedule-detail { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.today-product-test .panel-body { display:grid; gap:8px; }
.today-product-test-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 12px; border:1px solid var(--line); border-radius:6px; background:#f7faf9; }
.today-product-test-row > div { display:grid; gap:3px; }
.today-product-test-row span { color:var(--muted); font-size:12px; }
.product-test-card .panel-body { display:grid; gap:14px; }
.product-test-summary { display:flex; align-items:center; gap:18px; color:var(--muted); font-size:13px; }
.product-test-summary strong { color:var(--ink); }
.product-test-assignments { display:grid; gap:7px; }
.product-test-assignment { display:grid; grid-template-columns:minmax(180px,1.4fr) minmax(130px,1fr) auto auto; gap:12px; align-items:center; padding:9px 11px; border:1px solid var(--line); border-radius:6px; background:#f7faf9; font-size:12px; }
@media (max-width: 720px) {
  .today-product-test-row,.product-test-summary { align-items:flex-start; flex-direction:column; }
  .product-test-assignment { grid-template-columns:1fr 1fr; }
}

.icon-button { width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border:1px solid #cbd6d9; border-radius:5px; background:#fff; color:var(--ink); font-size:18px; line-height:1; }
.icon-button:hover { border-color:var(--accent); color:var(--accent-dark); background:#f2f8f6; }
.icon-button:disabled { cursor:not-allowed; opacity:.45; }
.truncate { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mono { font-family:Consolas,"Segoe UI",sans-serif; }
.automation-page { min-width:0; display:grid; gap:22px; }
.automation-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.automation-toolbar h2 { margin:0; font-size:24px; }
.automation-updated { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:7px; color:var(--muted); font-size:12px; }
.automation-loading { min-height:260px; display:grid; place-items:center; }
.automation-alerts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.automation-alerts .notice { display:grid; gap:4px; margin:0; }
.automation-alerts .notice strong { font-size:12px; }
.automation-alerts .notice span { color:var(--muted); font-size:11px; }
.automation-library { min-width:0; display:grid; gap:14px; }
.automation-library .table-wrap { max-height:54vh; }
.automation-library table { min-width:820px; }
.automation-library td:nth-child(4) { max-width:360px; }
.loading-line { color:var(--muted); }
.automation-service-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--line); border-radius:7px; background:#fff; box-shadow:var(--shadow); }
.automation-service-strip > div { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; align-items:center; padding:14px 16px; border-right:1px solid var(--line); }
.automation-service-strip > div:last-child { border-right:0; }
.automation-service-strip span:first-child { min-width:0; font-size:12px; font-weight:700; }
.automation-service-strip small { grid-column:1/-1; min-width:0; overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.automation-metrics { margin:0; }
.automation-section-grid { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; }
.automation-section { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:7px; background:#fff; box-shadow:var(--shadow); }
.automation-section > header { min-height:62px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 16px; border-bottom:1px solid var(--line); }
.automation-section > header > div { min-width:0; }
.automation-section h3 { margin:0; font-size:15px; }
.automation-section > header span { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.automation-list { min-width:0; display:grid; }
.automation-row { min-width:0; display:grid; grid-template-columns:minmax(140px,1fr) minmax(190px,auto) auto; gap:14px; align-items:center; padding:12px 16px; border-bottom:1px solid #edf0f1; }
.automation-row:last-child { border-bottom:0; }
.automation-row.discovery { background:#fffaf1; }
.automation-row-main { min-width:0; display:grid; gap:4px; }
.automation-row-main strong { font-size:13px; }
.automation-row-main span { min-width:0; overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.automation-row-facts { min-width:0; display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:7px; color:#536168; font-size:11px; }
.automation-row-facts > span:not(.badge) { min-width:0; max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.automation-template-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.automation-template { min-width:0; display:grid; gap:11px; padding:14px 16px; border-right:1px solid #edf0f1; border-bottom:1px solid #edf0f1; }
.automation-template:nth-child(3n) { border-right:0; }
.automation-template > div { min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.automation-template > div:first-child { display:grid; gap:3px; }
.automation-template strong { font-size:13px; }
.automation-template span { color:var(--muted); font-size:11px; }
.automation-task-list { display:grid; gap:0; }
.automation-task { min-width:0; padding:16px; border-bottom:1px solid var(--line); }
.automation-task:last-child { border-bottom:0; }
.automation-task > header,.automation-task > footer { min-width:0; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.automation-task > header > div:first-child { min-width:0; display:grid; gap:5px; }
.automation-task > header strong { font-size:14px; }
.automation-task > header span:not(.badge),.automation-task > footer > div:first-child { color:var(--muted); font-size:11px; }
.automation-task-status,.automation-task-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.automation-task-runtime { min-width:0; display:grid; grid-template-columns:minmax(220px,.8fr) minmax(300px,1fr) minmax(300px,1.2fr); gap:22px; margin:14px 0; padding:13px 0; border-top:1px solid #edf0f1; border-bottom:1px solid #edf0f1; }
.automation-file { min-width:0; display:grid; gap:7px; }
.automation-file > span { font-size:12px; font-weight:650; }
.automation-file small { color:var(--muted); font-size:11px; }
.automation-interjection-stats { min-width:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.automation-interjection-stats > div { min-width:0; display:grid; gap:4px; padding:8px 10px; border:1px solid #e3e9e9; border-radius:6px; background:#f7faf9; }
.automation-interjection-stats span,.automation-interjection-stats small { color:var(--muted); font-size:10px; }
.automation-interjection-stats strong { font-size:14px; }
.automation-command-track { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 12px; }
.automation-command-track > div { min-width:0; display:flex; align-items:center; gap:7px; }
.automation-command-track > div > span:last-child { color:var(--muted); font-size:10px; }
.automation-task > footer { align-items:center; }
.automation-toggle-row { display:flex; flex-wrap:wrap; gap:18px; }
.automation-task-form { gap:16px; }
.automation-form-block { display:grid; gap:13px; padding:16px; border:1px solid var(--line); border-radius:7px; background:#fbfcfc; }
.automation-form-block .section-caption { display:flex; flex-wrap:wrap; align-items:center; gap:7px 13px; }
.automation-form-block .section-caption strong { font-size:14px; }
.automation-form-block .section-caption span { flex:1 1 320px; color:var(--muted); font-size:11px; }
.automation-period-editor,.automation-selected-assets { display:grid; gap:8px; }
.automation-period-row { display:grid; grid-template-columns:30px minmax(130px,1fr) auto minmax(130px,1fr) 38px; gap:10px; align-items:end; padding:10px; border:1px solid #e7ecec; border-radius:6px; background:#fff; }
.automation-order { width:26px; height:26px; display:grid; place-items:center; align-self:center; border-radius:99px; background:#e8f4f1; color:var(--accent); font-size:11px; font-weight:750; }
.automation-period-arrow { align-self:center; color:var(--muted); font-size:12px; }
.automation-asset-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
.automation-selected-audio { min-width:0; display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px; border:1px solid #e7ecec; border-radius:6px; background:#fff; }
.automation-selected-audio > div:nth-child(2) { min-width:0; display:grid; gap:4px; }
.automation-selected-audio strong { min-width:0; font-size:12px; }
.automation-selected-audio small { color:var(--muted); font-size:10px; }
.automation-form-actions { position:sticky; bottom:-20px; z-index:2; margin:0 -20px -20px; padding:14px 20px; border-top:1px solid var(--line); background:rgba(255,255,255,.96); }
.compact-empty { padding:14px; }
.auto-playback-section > .notice { margin:14px 16px 0; display:flex; align-items:center; gap:10px; }
.auto-playback-section > .notice span { color:var(--muted); font-size:12px; }
.auto-session-list { display:grid; gap:0; }
.auto-session-card { min-width:0; padding:15px 16px; border-bottom:1px solid var(--line); }
.auto-session-card:last-child { border-bottom:0; }
.auto-session-card > header,.auto-session-card > footer { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.auto-session-card > header > div:first-child { min-width:0; display:grid; gap:4px; }
.auto-session-card > header > div:last-child { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.auto-session-card > header strong { font-size:14px; }
.auto-session-card > header span:not(.badge) { color:var(--muted); font-size:11px; }
.auto-session-facts { min-width:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin:13px 0; }
.auto-session-facts > div { min-width:0; display:grid; gap:4px; padding:10px 11px; border:1px solid #e2e9e8; border-radius:6px; background:#f7faf9; }
.auto-session-facts span,.auto-session-facts small { min-width:0; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.auto-session-facts strong { min-width:0; overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.auto-missing { display:grid; gap:5px; margin:12px 0; padding:11px 12px; border-left:3px solid #b14343; background:#fff7f7; }
.auto-missing span { color:var(--muted); font-size:11px; }
.blocked-card { background:#fffdfd; }

@media (max-width: 1180px) {
  .automation-service-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .automation-service-strip > div:nth-child(2) { border-right:0; }
  .automation-service-strip > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .automation-template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .automation-template:nth-child(3n) { border-right:1px solid #edf0f1; }
  .automation-template:nth-child(2n) { border-right:0; }
  .automation-task-runtime { grid-template-columns:minmax(220px,.8fr) minmax(300px,1.2fr); }
  .automation-command-track { grid-column:1/-1; }
}
@media (max-width: 900px) {
  .automation-section-grid { grid-template-columns:1fr; }
  .automation-alerts { grid-template-columns:1fr; }
  .automation-task-runtime { grid-template-columns:1fr; }
  .auto-session-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .automation-page { gap:16px; }
  .automation-toolbar { align-items:center; }
  .automation-toolbar h2 { font-size:20px; }
  .automation-service-strip { grid-template-columns:1fr; }
  .automation-service-strip > div,.automation-service-strip > div:nth-child(2) { border-right:0; border-bottom:1px solid var(--line); }
  .automation-service-strip > div:last-child { border-bottom:0; }
  .automation-template-grid { grid-template-columns:1fr; }
  .automation-template,.automation-template:nth-child(3n) { border-right:0; }
  .automation-row { grid-template-columns:minmax(0,1fr) auto; gap:9px; }
  .automation-row-facts { grid-column:1/-1; justify-content:flex-start; }
  .automation-task > header,.automation-task > footer { align-items:flex-start; flex-direction:column; }
  .automation-task-status,.automation-task-actions { justify-content:flex-start; }
  .automation-command-track { grid-template-columns:1fr; }
  .automation-task-actions { width:100%; }
  .auto-playback-section > .notice,.auto-session-card > header,.auto-session-card > footer { align-items:flex-start; flex-direction:column; }
  .auto-session-facts { grid-template-columns:1fr; }
  .modal-backdrop { padding:10px; }
  .modal { max-height:calc(100vh - 20px); }
  .automation-period-row { grid-template-columns:26px minmax(0,1fr) auto; }
  .automation-period-row .field { grid-column:2/-1; }
  .automation-period-arrow { display:none; }
  .automation-period-row > .icon-button { grid-column:3; grid-row:1; }
  .automation-asset-picker { grid-template-columns:1fr; }
}
