:root {
  color-scheme: light;
  --canvas: #f4f6f4;
  --paper: #ffffff;
  --ink: #182b32;
  --muted: #62777c;
  --line: #dce5e2;
  --teal: #087f78;
  --teal-dark: #066c66;
  --teal-soft: #e5f4f1;
  --navy: #17343a;
  --amber: #94600a;
  --amber-soft: #fff5df;
  --red: #9b3e37;
  --red-soft: #fff0ee;
  --shadow: 0 12px 34px rgba(30, 57, 57, .055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }
.app-frame { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { background: var(--navy); color: #eaf5f2; padding: 27px 18px 18px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); gap: 3px; width: 29px; height: 29px; padding: 6px; background: #0a958b; border-radius: 8px; transform: rotate(-4deg); }
.brand-mark span { display: block; background: #e9fffa; border-radius: 1px; }
.brand-mark span:first-child { height: 7px; }
.brand-mark span:nth-child(2) { height: 7px; opacity: .75; }
.brand-mark span:last-child { height: 7px; grid-column: 1 / 3; width: 16px; opacity: .9; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; letter-spacing: .1em; }
.brand-copy strong { font-size: 11px; font-weight: 750; }
.brand-copy small { margin-top: 4px; color: #9abbb8; font-size: 9px; letter-spacing: .22em; }
.side-label, .eyebrow { margin: 0; color: #829b9d; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
.side-label { padding: 0 10px 11px; }
.nav-list { display: grid; gap: 5px; }
.nav-link { min-height: 43px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border-radius: 7px; color: #b9cecb; font-size: 13px; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); color: white; }
.nav-link[aria-current="page"] { background: #24484d; color: #fff; box-shadow: inset 3px 0 #37b7a6; }
.nav-icon { color: #78a4a1; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.sidebar-footer { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 15px 10px 6px; border-top: 1px solid rgba(220,245,240,.12); }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 11px; font-weight: 650; }
.sidebar-footer small { margin-top: 2px; color: #91afad; font-size: 10px; }
.local-dot { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #56c8a9; box-shadow: 0 0 0 3px rgba(86,200,169,.13); }
.main-column { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; padding: 0 clamp(22px, 4vw, 56px); background: rgba(255,255,255,.82); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.breadcrumb { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.crumb-sep { padding: 0 10px; color: #a8b8b5; }
#current-section { color: var(--ink); letter-spacing: .01em; }
.local-badge { display: flex; gap: 8px; align-items: center; color: #54716e; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.local-badge .local-dot { width: 6px; height: 6px; flex-basis: 6px; }
main { width: min(100%, 1480px); margin: 0 auto; padding: 34px clamp(22px, 4vw, 56px) 42px; flex: 1; }
.page-heading { margin-bottom: 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.page-heading .eyebrow { color: var(--teal); }
h1 { margin: 5px 0 4px; color: #17343a; font-size: clamp(27px, 3vw, 35px); line-height: 1.16; letter-spacing: -.045em; font-weight: 700; }
.subheading { margin: 0; color: var(--muted); font-size: 13px; }
h2 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.02em; line-height: 1.3; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 14px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 700; transition: background .15s ease, transform .15s ease, border .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { color: #146c67; background: #eef8f6; border-color: #cde6e1; }
.button-secondary:hover { background: #e3f2ef; }
.button-quiet { color: #54686c; background: #fff; border-color: var(--line); }
.button-small { min-height: 31px; padding: 6px 11px; color: #fff; background: var(--navy); border: 0; border-radius: 5px; font-size: 11px; }
.quiet-tag { padding: 6px 9px; border: 1px solid #d6e8e3; border-radius: 4px; color: #587772; background: #eef7f5; font-size: 9px; font-weight: 750; letter-spacing: .1em; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 20px; }
.metric-card { min-height: 128px; padding: 18px 19px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; }
.metric-primary { background: var(--navy); border-color: var(--navy); color: white; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-primary .metric-label, .metric-primary .metric-note { color: #b4cfcb; }
.metric-value { margin-top: 12px; font-size: 30px; line-height: 1; letter-spacing: -.05em; font-weight: 700; }
.metric-note { margin-top: 8px; color: #849493; font-size: 10px; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr); gap: 17px; }
.panel { min-width: 0; padding: 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.panel-heading .eyebrow { color: var(--teal); }
.text-link { color: var(--teal-dark); font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-breakdown { display: grid; gap: 15px; padding-top: 2px; }
.status-row { display: grid; grid-template-columns: 115px minmax(70px, 1fr) 24px; align-items: center; gap: 12px; }
.status-chip { display: inline-flex; width: max-content; max-width: 100%; align-items: center; padding: 4px 8px; border-radius: 4px; color: #496368; background: #eef2f1; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-pending { color: #6a6a47; background: #f5f3e4; }
.status-in_progress { color: #086d67; background: #e2f4f0; }
.status-completed { color: #26704f; background: #e8f5ec; }
.status-failed { color: #963f37; background: #fff0ee; }
.status-skipped { color: #637078; background: #edf0f2; }
.status-track { display: block; width: 100%; height: 7px; border: 0; background: #edf1ef; border-radius: 9px; overflow: hidden; }
.status-track::-webkit-progress-bar { background: #edf1ef; border-radius: 9px; }
.status-track::-webkit-progress-value { background: var(--teal); border-radius: 9px; }
.status-track::-moz-progress-bar { background: var(--teal); border-radius: 9px; }
.status-fill-completed::-webkit-progress-value, .status-fill-completed::-moz-progress-bar { background: #48976b; }
.status-fill-failed::-webkit-progress-value, .status-fill-failed::-moz-progress-bar { background: #d27365; }
.status-fill-skipped::-webkit-progress-value, .status-fill-skipped::-moz-progress-bar { background: #91a0a3; }
.status-count { color: #5f7578; font-size: 11px; text-align: right; }
.quick-panel { padding-bottom: 10px; }
.shortcut { display: grid; grid-template-columns: 32px 1fr 18px; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid #edf1ef; }
.shortcut-number, .panel-index { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 5px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; font-weight: 750; }
.shortcut strong, .shortcut small { display: block; }
.shortcut strong { font-size: 12px; }
.shortcut small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.shortcut-arrow { color: #82a09c; font-size: 14px; }
.notice-stack { display: grid; gap: 8px; }
.notice:empty { display: none; }
.notice { padding: 10px 13px; border: 1px solid #ead7a9; border-left: 3px solid #d59d36; border-radius: 5px; color: #72520f; background: var(--amber-soft); font-size: 12px; overflow-wrap: anywhere; }
.notice-error { border-color: #efc6c0; border-left-color: #bf584f; color: #8b3933; background: var(--red-soft); }
.notice-success { border-color: #c5e6d8; border-left-color: #288b69; color: #236c53; background: #eaf7f1; }
.notice-info { border-color: #c7e3df; border-left-color: var(--teal); color: #235f5b; background: #eef8f6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 17px; }
.form-panel { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.form-panel .panel-heading { margin-bottom: 2px; }
.panel-index { color: #809594; background: #f0f4f2; }
label { color: #4e6568; font-size: 11px; font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #d5dfdc; border-radius: 5px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; }
input:focus, textarea:focus, select:focus { border-color: #4fa99f; box-shadow: 0 0 0 3px rgba(31,146,134,.12); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #98a7a5; }
.form-panel .button { align-self: flex-start; margin-top: 2px; }
.field-hint { margin: 0; color: #81918f; font-size: 10px; }
.table-panel { padding: 0; margin-top: 16px; overflow: hidden; }
.table-panel > .panel-heading { margin: 0; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.count-pill { padding: 4px 9px; border-radius: 12px; color: #56706e; background: #eef4f2; font-size: 10px; font-weight: 700; white-space: nowrap; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 850px; border-collapse: collapse; text-align: left; }
th { padding: 10px 13px; color: #7a8d8c; background: #f8faf9; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 13px; border-top: 1px solid #edf1ef; color: #52676a; font-size: 11px; vertical-align: top; }
tr:hover td { background: #fcfdfc; }
.task-identity { min-width: 220px; }
.task-identity strong, .task-identity span { display: block; }
.mono { color: #34545a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; }
.url-text { display: block; max-width: 360px; margin-top: 4px; color: #718285; font-size: 10px; overflow-wrap: anywhere; }
.update-cell { min-width: 260px; }
.status-controls { display: grid; grid-template-columns: minmax(115px, .9fr) minmax(125px, 1fr) auto; gap: 6px; align-items: center; }
.status-select, .reason-input { padding: 7px 8px; font-size: 10px; }
.completion-confirm { grid-column: 1 / 3; display: flex; gap: 5px; align-items: center; color: #805918; font-size: 9px; }
.completion-confirm input { width: auto; margin: 0; }
.empty-state { padding: 25px 19px; color: #778986; font-size: 12px; text-align: center; }
.material-forms { margin-top: 18px; }
.material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 16px; }
.material-card { box-shadow: none; }
.material-card .panel-heading { margin-bottom: 11px; }
.material-list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.material-list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid #eff2f1; }
.material-bullet { flex: 0 0 25px; color: #6e9a94; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.material-value { min-width: 0; color: #475f62; font-size: 11px; overflow-wrap: anywhere; }
.empty-material { color: #8a9997; font-size: 11px; }
.filter-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.filter-panel > div:first-child { flex: 1; max-width: 490px; }
.filter-panel label { display: block; margin-bottom: 6px; }
.filter-actions { display: flex; gap: 8px; }
.orphan-panel { border-color: #ead9b8; }
.orphan-panel > .panel-heading { align-items: flex-start; }
.orphan-panel .panel-heading .field-hint { max-width: 620px; margin-top: 6px; }
.warning-eyebrow { color: var(--amber) !important; }
.warning-pill { color: #775512; background: var(--amber-soft); }
.orphan-row td { background: #fffaf0; }
.reason-cell { min-width: 140px; max-width: 280px; overflow-wrap: anywhere; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px clamp(22px, 4vw, 56px) 21px; border-top: 1px solid var(--line); color: #879592; font-size: 9px; letter-spacing: .04em; }
.global-message { position: fixed; right: 20px; bottom: 20px; z-index: 5; }
.noscript-warning { position: fixed; inset: auto 0 0; padding: 12px; color: #742b26; background: #fff0ee; text-align: center; }
:focus-visible { outline: 3px solid rgba(8,127,120,.35); outline-offset: 2px; }
@media (max-width: 1050px) {
  .app-frame { grid-template-columns: 205px minmax(0,1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-lower { grid-template-columns: 1fr; }
  .status-controls { grid-template-columns: minmax(100px,.8fr) minmax(115px,1fr) auto; }
}
@media (max-width: 720px) {
  .app-frame { display: block; }
  .sidebar { min-height: 0; padding: 13px 16px 9px; }
  .brand { padding: 0 2px 12px; }
  .side-label, .sidebar-footer { display: none; }
  .nav-list { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 3px; }
  .nav-link { flex: 0 0 auto; min-height: 35px; padding: 7px 9px; font-size: 11px; }
  .nav-icon { display: none; }
  .topbar { height: 49px; padding: 0 17px; }
  .breadcrumb { font-size: 8px; }
  .local-badge { font-size: 8px; }
  main { padding: 26px 16px 30px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .form-grid, .material-grid { grid-template-columns: 1fr; }
  .filter-panel { align-items: stretch; flex-direction: column; }
  .filter-actions { justify-content: flex-start; }
  .page-footer { padding: 13px 16px 18px; flex-direction: column; }
  .status-row { grid-template-columns: 104px minmax(50px,1fr) 20px; gap: 8px; }
}
@media (max-width: 430px) {
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 112px; padding: 13px; }
  .metric-value { font-size: 26px; }
  .status-row { grid-template-columns: 94px minmax(40px,1fr) 18px; }
  .filter-actions .button { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Account Manager */
.account-layout { grid-template-columns: minmax(0, 1.5fr) minmax(290px, .75fr); align-items: start; }
.account-list-panel { padding: 0; overflow: hidden; }
.account-list-panel > .panel-heading { margin: 0; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.account-filter { display: grid; grid-template-columns: minmax(150px, 1fr) 130px auto; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.account-filter input, .account-filter select { padding: 8px 9px; font-size: 11px; }
.account-filter .button { min-height: 34px; padding: 7px 10px; }
.account-form-panel { gap: 9px; }
.account-form-panel .panel-heading { margin-bottom: 3px; }
.account-form-panel .field-hint { display: inline; font-weight: 450; }
.account-form-panel textarea { min-height: 80px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.account-cell { min-width: 145px; }
.account-cell strong, .account-cell small { display: block; }
.account-cell strong { color: #2d484d; font-size: 11px; }
.account-cell small { margin-top: 3px; color: #81918f; font-size: 9px; overflow-wrap: anywhere; }
.account-meta { min-width: 150px; max-width: 245px; color: #718285; font-size: 10px; overflow-wrap: anywhere; }
.account-dates { min-width: 135px; color: #718285; font-size: 10px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 145px; }
.button-small.button-outline { color: #416367; background: white; border: 1px solid var(--line); }
.button-small.button-danger { color: #8e4941; background: #fff5f3; border: 1px solid #f0d4cf; }
.task-account-control { display: grid; min-width: 175px; gap: 5px; }
.task-account-control select { padding: 6px 7px; font-size: 10px; }
.task-account-label { display: block; max-width: 200px; color: #526c69; font-size: 10px; overflow-wrap: anywhere; }
.task-account-label small { display: block; color: #8a9997; font-size: 9px; }
.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: 1050px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-form-panel { order: -1; }
}
@media (max-width: 720px) {
  .account-filter { grid-template-columns: 1fr 1fr; }
  .account-filter input { grid-column: 1 / -1; }
  .account-filter .button { justify-self: start; }
}

/* Phase 5 — manual execution workspace */
.execution-boundary { margin: 0 0 16px; line-height: 1.65; }
.execution-form { max-width: 900px; margin-bottom: 18px; }
.execution-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 5px 0; }
.execution-media-grid fieldset { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.execution-media-grid legend { padding: 0 5px; color: #526b69; font-size: 10px; font-weight: 750; }
.execution-choice-list { display: grid; gap: 6px; max-height: 150px; overflow: auto; }
.execution-choice { display: flex; align-items: flex-start; gap: 7px; color: #536b6e; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.execution-choice input, .execution-confirm-label input { flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--teal); }
.execution-preview-card { margin: 16px 0; border-color: #d5e7e2; }
.execution-preview-content { display: grid; grid-template-columns: minmax(130px, .25fr) minmax(0,1fr); gap: 9px 16px; }
.execution-preview-label { color: #82918e; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.execution-preview-value { color: #3c5556; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.execution-step { display: grid; gap: 9px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.execution-confirm-label { display: flex; align-items: flex-start; gap: 8px; color: #526767; font-size: 10px; line-height: 1.55; }
.execution-result-badge { display: inline-flex; padding: 5px 9px; color: #536a60; background: #edf4ee; border-radius: 99px; font-size: 10px; font-weight: 750; }
.execution-history-panel { margin-top: 16px; }
.execution-history-panel .panel-heading .button { min-height: 31px; }
.execution-comment-cell { min-width: 180px; max-width: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
.execution-id-cell { min-width: 150px; }
@media (max-width: 800px) {
  .execution-media-grid { grid-template-columns: 1fr; }
  .execution-preview-content { grid-template-columns: 1fr; gap: 3px; }
  .execution-preview-label:not(:first-child) { margin-top: 8px; }
}


/* Smart Content Hub, URL batches, matching and approved records */
.content-filter-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; gap: 10px; padding: 15px; margin: 15px 0; }
.content-filter-panel .filter-field { min-width: 0; }
.content-filter-panel label { display: block; margin-bottom: 5px; }
.content-filter-panel .button { justify-self: start; }
.content-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; margin-top: 15px; }
.content-row td { vertical-align: top; }
.content-identity { min-width: 180px; }
.content-identity strong, .content-identity small, .content-meta-cell > *, .content-file-cell > * { display: block; }
.content-identity small { margin-top: 5px; }
.content-snippet { max-width: 260px; margin: 6px 0 0; color: #718285; white-space: pre-line; overflow-wrap: anywhere; }
.content-meta-cell { min-width: 170px; max-width: 240px; overflow-wrap: anywhere; }
.content-meta-cell small { margin-top: 6px; color: #788987; }
.content-meta-cell .analysis-summary { color: #536f68; }
.content-meta-cell .text-warning, .text-warning { color: #8a5b0b; }
.validation-label { max-width: 230px; color: #607674; overflow-wrap: anywhere; }
.content-preview { display: block; width: 120px; max-height: 100px; object-fit: contain; margin-top: 8px; border: 1px solid var(--line); border-radius: 5px; background: #f7faf9; }
video.content-preview { width: 170px; }
.content-dates { min-width: 150px; white-space: pre-line; }
.content-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 140px; }
.content-actions .button { white-space: nowrap; }
.button-outline { color: #315e5c; background: #fff; border-color: #cbded9; }
.button-danger { color: #843c35; background: #fff2ef; border-color: #efcbc5; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.notice { white-space: pre-line; }
.batch-create-form { max-width: 780px; }
.batch-list { display: grid; gap: 15px; margin-top: 17px; }
.batch-card { overflow: hidden; }
.batch-card > .panel-heading { margin-bottom: 8px; }
.batch-table { min-width: 1120px; }
.batch-url-cell { min-width: 250px; }
.batch-url-cell input { font-size: 10px; }
.batch-url-cell .status-chip { margin-top: 6px; }
.batch-table textarea { min-width: 230px; }
.batch-reference-select { min-width: 200px; }
.batch-card > .button { margin-top: 12px; }
.matching-layout { grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr); margin: 14px 0; }
.matching-checks { display: flex; flex-wrap: wrap; gap: 13px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; }
.matching-checks legend { padding: 0 5px; color: #4e6568; font-size: 10px; font-weight: 700; }
.matching-checks label { display: inline-flex; align-items: center; gap: 5px; }
.matching-checks input { width: auto; }
.match-text-cell { min-width: 180px; max-width: 290px; white-space: pre-line; overflow-wrap: anywhere; }
.match-components { min-width: 150px; white-space: pre-line; }
.task-match-label { display: block; margin-top: 5px; color: #657c79; font-size: 10px; }
.task-account-control .text-link { display: inline-block; margin-top: 5px; }
.low-confidence-row td { background: #fffbf2; }
.status-high { color: #236c53; background: #eaf7f1; }
.status-medium { color: #805918; background: #fff5df; }
.status-low { color: #843c35; background: #fff0ee; }
#content-meta-form { grid-column: 1 / -1; max-width: 760px; }
#content-meta-form:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
#content-meta-form .panel-heading, #content-meta-form .form-actions { grid-column: 1 / -1; }
#content-meta-form textarea { min-height: 62px; }
#content-meta-form .form-actions { display: flex; gap: 8px; }
@media (max-width: 1180px) {
  .content-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .content-work-grid, .matching-layout { grid-template-columns: 1fr; }
  .content-filter-panel { grid-template-columns: 1fr; }
  #content-meta-form:not([hidden]) { grid-template-columns: 1fr; }
  #content-meta-form .panel-heading, #content-meta-form .form-actions { grid-column: auto; }
  .content-actions { min-width: 0; }
}

/* Phase 7: optional server-side AI workspace */
.ai-work-grid { align-items: start; }
.ai-status-panel { margin-bottom: 1rem; }
.ai-status-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .25rem 1rem; color: var(--muted); }
.ai-consent { display: flex; align-items: flex-start; gap: .65rem; margin: .8rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: .55rem; background: #f8faf9; line-height: 1.45; }
.ai-consent input { margin-top: .2rem; flex: 0 0 auto; }
.ai-drafts { display: grid; gap: .9rem; padding: 1rem; }
.ai-draft-card { padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; }
.ai-draft-card h3 { margin: 0 0 .3rem; }
.ai-draft-card > p { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-draft-card .ai-proposal-edit { width: 100%; min-height: 7rem; }
.ai-original { padding: .65rem; border-left: 3px solid var(--line); background: #f8faf9; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-draft-card .content-actions { margin-top: .8rem; }
@media (max-width: 760px) { .ai-work-grid, .ai-status-details { grid-template-columns: 1fr; } }


/* Phase 8.2 Publishing workspace */
.publishing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; align-items: start; }
.publishing-form { display: grid; gap: .65rem; }
.publishing-form label { font-weight: 650; color: var(--ink, #172b4d); }
.publishing-form input, .publishing-form select { min-width: 0; width: 100%; }
.publishing-form small { display: block; }
.publishing-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; margin: .75rem 0; }
.publishing-list { display: grid; gap: .75rem; margin-top: .75rem; }
.publishing-card { border: 1px solid var(--line, #dce3ec); border-radius: 12px; padding: 1rem; background: var(--paper, #fff); min-width: 0; }
.publishing-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.publishing-card h3 { margin: 0 0 .35rem; font-size: 1rem; overflow-wrap: anywhere; }
.publishing-card p { margin: .35rem 0; overflow-wrap: anywhere; }
.comment-post-image { display: block; max-width: min(100%, 24rem); max-height: 15rem; object-fit: contain; border-radius: 8px; margin-top: .5rem; }
.publishing-card pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 16rem; overflow: auto; padding: .75rem; background: var(--canvas, #f4f6f4); border-radius: 8px; }
.publishing-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.publishing-preview { border: 1px dashed var(--line, #cbd5e1); border-radius: 10px; padding: .75rem; display: grid; gap: .4rem; }
.publishing-preview pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 12rem; overflow: auto; }
.publishing-meta { font-size: .82rem; color: var(--muted, #62777c); overflow-wrap: anywhere; }
.publishing-danger { color: #9b1c1c; }
@media (max-width: 900px) { .publishing-grid { grid-template-columns: 1fr; } }


/* Secured VPS operator authentication */
.operator-auth-panel { margin: 0 1.5rem 1rem; padding: 1rem; border: 1px solid var(--line, #dce3ec); border-radius: 12px; background: var(--paper, #fff); }
.operator-login-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, .7fr) minmax(160px, 1fr) auto; gap: .65rem; align-items: end; }
.operator-login-form label { font-weight: 650; }
.operator-login-form input { min-width: 0; width: 100%; }
.operator-login-form p { margin: .3rem 0 0; }
.operator-authenticated { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; }
@media (max-width: 760px) { .operator-auth-panel { margin: 0 .75rem .75rem; } .operator-login-form { grid-template-columns: 1fr; } .operator-authenticated { justify-content: flex-start; flex-wrap: wrap; } }
