/* A full-page review form, using the BI workspace's spacing and hierarchy. */
.main.editing .topbar .global-search,
.main.editing .topbar #top-source-link { display:none; }
.editor-page { max-width:1500px; margin:0 auto; padding:0 32px 48px; min-width:0; }
.editor-page { --editor-card-edge:37px; }
.editor-page-head {
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  position:sticky; top:0; z-index:4; padding:24px 0 22px;
  border-bottom:0; background:var(--bg);
}
.editor-heading { min-width:0; }
.editor-back { display:inline-flex; padding:0; margin-bottom:13px; color:var(--muted); font-size:12px; }
.editor-back:hover { color:var(--ink); }
.editor-heading h1 { margin:0; color:var(--ink); font-size:28px; font-weight:650; letter-spacing:-.5px; line-height:1.4; overflow-wrap:anywhere; }
.editor-heading p { margin-top:8px; color:var(--tertiary); font-size:11.5px; }
.editor-page-actions { display:flex; align-items:center; flex-shrink:0; gap:10px; }
.editor-page-actions .btn { min-height:38px; padding:9px 18px; font-size:12.5px; }
.editor-page-body { padding-top:24px; max-width:1160px; margin:0 auto; }
.editor-card { margin:0 0 18px; border:0; border-radius:16px; background:#fff; overflow:hidden; }
.editor-card-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:22px 26px 0; }
.editor-card h2,.editor-card>summary strong { margin:0; font-size:15px; font-weight:600; line-height:1.5; }
.editor-card-content { padding:18px 26px 22px; min-width:0; container-type:inline-size; }
.editor-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px 24px; align-items:end; }
.editor-section-heading { display:flex; align-items:center; flex-wrap:wrap; gap:8px 10px; min-width:0; }
.editor-heading-controls { display:flex; align-items:flex-end; flex-wrap:wrap; justify-content:flex-end; gap:12px; }
.editor-assignment { min-width:0; max-width:100%; }
.editor-assignment-row { display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.editor-assignment-row .editor-type-control { min-width:185px; }
.editor-assignment-row .editor-type-control select { width:100%; max-width:250px; border-radius:7px; }
.editor-assignment-row .btn { min-height:32px; padding:6px 12px; font-size:12px; white-space:nowrap; }
.editor-assignment-row .text-btn { display:inline-flex; align-items:center; justify-content:center; height:32px; padding:0 6px; white-space:nowrap; }
.assignment-current { font-size:12px; color:var(--ink); }
.assignment-feedback { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px 7px; margin:9px 0 0; font-size:11px; line-height:1.6; color:var(--muted); }
.assignment-feedback[data-state="pending"],.assignment-feedback[data-state="unverified"] { color:#b46a20; }
.assignment-feedback[data-state="verified"],.assignment-feedback[data-state="completed"] { color:#397852; }
.assignment-help { margin:3px 0 0; text-align:right; color:var(--tertiary); font-size:10.5px; line-height:1.6; }
/* Align this action with the select below its label, rather than its text baseline. */
.editor-heading-controls>[data-action="refresh-operators"] {
  display:inline-flex; align-items:center; justify-content:center; align-self:flex-end;
  flex:0 0 auto; height:32px; min-height:32px; padding:0 6px;
  line-height:1; white-space:nowrap; text-align:center;
}
.editor-linked-summary { padding:3px 7px; border-radius:4px; background:#f2f6ee; color:#758667; font-size:10.5px; font-weight:400; line-height:1.4; white-space:nowrap; }
.editor-page .form-field { width:100%; max-width:100%; min-width:0; gap:6px; margin:0; color:var(--muted); font-size:12px; }
.editor-page .field-title { display:block; min-height:18px; font-size:12px; }
.editor-page .form-field input,
.editor-page .form-field select,
.editor-page .form-field textarea { min-width:0; min-height:40px; padding:10px 12px; border-radius:8px; font-size:13px; line-height:1.5; }
/* New and old reviews share plain white control surfaces in every edit state. */
.editor-page input,
.editor-page select,
.editor-page textarea,
.editor-page input[readonly],
.editor-page textarea[readonly],
.editor-page :is(input,select,textarea):disabled { background-color:#fff; }
.editor-page .form-field textarea { min-height:64px; line-height:1.65; resize:vertical; }
.editor-page .form-field.wide { grid-column:auto; }
.editor-page .editor-type-control { display:flex; flex-direction:column; align-items:flex-start; gap:6px; flex-shrink:0; font-size:11px; color:var(--tertiary); }
.editor-type-control select { max-width:150px; min-height:32px; padding:5px 34px 5px 10px; border-radius:999px; color:var(--muted); font-size:12px; appearance:none; -webkit-appearance:none; background-color:#fff; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23748076' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:12px 8px; }
.editor-type-control select:disabled { opacity:1; cursor:default; }
.editor-card>summary {
  display:flex; align-items:center; gap:15px; cursor:pointer; list-style:none;
  padding:22px 26px; color:var(--ink); min-height:70px;
}
.editor-card>summary::-webkit-details-marker { display:none; }
.editor-card>summary>span { margin-left:auto; color:var(--tertiary); font-size:11.5px; font-weight:400; text-align:right; }
.editor-card>summary:after { content:'⌄'; margin-top:-5px; color:var(--muted); font-size:18px; line-height:1; }
.editor-card[open]>summary:after { transform:rotate(180deg); margin-top:5px; }
.editor-card[open]>summary { border-bottom:1px solid #f0f2ee; }
.editor-card>summary:hover { background:#fcfdfa; }
.editor-subgroup+ .editor-subgroup { margin-top:24px; padding-top:0; border-top:0; }
.editor-subgroup h3 { margin:0 0 12px; color:var(--ink); font-size:12px; font-weight:500; }
.editor-page .bi-box { padding:0; margin:0; border-radius:0; }
.editor-page .bi-heading { margin-bottom:18px; }
.editor-page .bi-heading strong { font-size:13px; font-weight:500; }
.editor-page .bi-heading p { max-width:660px; margin-top:6px; line-height:1.8; }
.editor-page .bi-inputs { align-items:flex-end; flex-wrap:wrap; }
.editor-page .bi-inputs input { min-width:0; }
.editor-page .bi-inputs>label { min-width:170px; }
.editor-page .bi-inputs .btn { flex:none; min-height:40px; }
.editor-page .bi-preview-wrap { overflow:auto; max-width:100%; }
.editor-page .bi-preview { min-width:650px; }
.editor-page .bi-preview th,.editor-page .bi-preview td { white-space:normal; }
.editor-page .field-mapping { margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.field-mapping>summary { cursor:pointer; color:var(--muted); font-size:12px; }
.field-mapping .bi-preview-wrap { margin-top:14px; }
.editor-page .field-mapping-wrap,
.editor-page .field-mapping>.bi-preview-wrap,
.editor-page .editor-connection-readonly>.editor-card-content>.bi-preview-wrap {
  width:100%; max-height:none; border:0; border-radius:0; box-shadow:none;
  background:#fff; overflow:visible;
}
.editor-page .field-mapping-table {
  width:100%; min-width:0; table-layout:fixed; border-collapse:collapse;
  background:#fff; color:var(--ink);
}
.editor-page .field-mapping-table th,
.editor-page .field-mapping-table td {
  width:auto; position:static; z-index:auto; border:0; text-align:left;
  white-space:normal; overflow-wrap:anywhere; word-break:normal;
}
.editor-page .field-mapping-table th {
  padding:12px 18px; border-bottom:1px solid var(--line); background:#fff;
  color:var(--muted); font-size:12px; font-weight:400; line-height:1.75;
}
.editor-page .field-mapping-table td {
  padding:16px 18px; border-bottom:1px solid #edf0ec; background:#fff;
  vertical-align:middle; font-size:13px; line-height:1.75;
}
.editor-page .field-mapping-table tr:last-child td { border-bottom:0; }
.editor-page .field-mapping-table tbody tr:hover td { background:#fafcf9; }
.editor-page .field-mapping-table small {
  color:var(--tertiary); font-size:11px; line-height:1.6; overflow-wrap:anywhere;
}
@media(max-width:600px) {
  .editor-page .field-mapping-table th,
  .editor-page .field-mapping-table td { padding:12px 8px; font-size:12px; line-height:1.65; }
  .editor-page .field-mapping-table small { font-size:10px; }
}
.editor-page .editor-connection-readonly>.editor-card-content { padding-top:14px; padding-bottom:16px; }
.editor-page .note-entry { margin:0; }
.editor-page .note-entry textarea { font-size:13px; min-width:0; }
.editor-page .activity-list { padding:0 0 16px; }
.editor-page .activity-body p { font-size:12px; }
.editor-page .activity-item time { font-size:11px; }
.editor-page .empty { padding:8px 0 24px; font-size:12px; }
.editor-page .field-title { display:flex; justify-content:flex-start; align-items:baseline; gap:4px 6px; flex-wrap:wrap; width:100%; min-width:0; }
.editor-page .field-label-text { min-width:0; overflow-wrap:anywhere; }
.field-source { flex:0 0 auto; max-width:100%; font-size:10px; font-weight:400; color:var(--tertiary); white-space:nowrap; }
.field-source.associated { color:#66812b; }
.editor-page .field-linked input,
.editor-page .field-linked select,
.editor-page .field-linked textarea { background-color:#fff; color:#45533b; opacity:1; cursor:default; }
.bi-result-details { margin-top:16px; }
.bi-result-details>summary { color:var(--muted); font-size:12px; cursor:pointer; }
.bi-result-details .bi-preview-wrap { margin-top:14px; }
.bi-date-notice { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:14px 0; padding:14px 16px; border:1px solid #e8dfc7; border-radius:8px; background:#fcfaf3; }
.bi-date-notice strong { font-size:12px; font-weight:500; color:#735d2b; }
.bi-date-notice p { margin:5px 0 0; font-size:12px; color:var(--muted); line-height:1.7; }
.bi-date-notice .btn { flex:none; }
@media(max-width:700px) { .bi-date-notice { align-items:flex-start; flex-direction:column; gap:10px; } }
.recipient>span { display:flex; flex-direction:column; gap:4px; }
.recipient small { font-size:10px; font-weight:400; color:var(--muted); }
.recipient:has(input:disabled) { opacity:.6; }
#personal-login-panel .btn { display:flex; justify-content:center; text-decoration:none; }
#personal-login-status { margin-top:14px; font-size:12px; color:var(--muted); }
#account-login { margin-left:auto; font-size:11px; color:#b9c0b6; }
.workflow-plan { margin-top:12px; padding:12px; border:1px solid var(--line); border-radius:10px; }
.workflow-plan>small { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
/* Every field reads top to bottom: label, then its own input. Fixed columns
   keep rows aligned; longer notes remain together below the metrics. */
.editor-page .editor-data-sections { display:block; }
.editor-page .editor-data-sections>.editor-subgroup { min-width:0; }
.editor-page .editor-metrics-grid>.form-field {
  display:flex; flex-direction:column; align-items:flex-start; align-self:end;
  gap:6px; max-width:220px;
}
.editor-page .editor-metrics-grid .field-title {
  align-items:flex-end; align-content:flex-end;
  min-height:18px; height:auto; line-height:18px;
}
.editor-page .editor-metrics-grid>.form-field>input,
.editor-page .editor-metrics-grid>.form-field>select {
  width:100%; max-width:220px; min-height:36px; height:36px;
  padding:7px 9px; border-radius:7px; font-size:12px;
}
.editor-page .editor-metrics-grid>.form-field>select { padding-right:28px; }
.editor-page .editor-metrics-grid.basic-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.editor-page .basic-grid>.field-long { grid-column:auto; max-width:220px; }
.editor-page .basic-grid>.field-long>input { width:100%; max-width:220px; }
.editor-page .editor-notes-grid {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px;
  min-width:0; align-items:end;
}
.editor-page .has-metrics>.editor-notes-grid {
  margin-top:24px; padding-top:0; border-top:0;
}
.editor-page .editor-notes-grid>.form-field { display:flex; flex-direction:column; align-self:end; gap:6px; grid-column:auto; }
.editor-page .editor-notes-grid .field-title { min-height:18px; height:auto; align-items:flex-end; align-content:flex-end; line-height:18px; }
.editor-page .editor-notes-grid textarea { width:100%; max-width:none; height:64px; min-height:64px; padding:8px 10px; border-radius:7px; font-size:12px; }
/* Selected review groups keep all their fields together in template order. */
.editor-page .editor-inline-grid[data-inline-cols="7"] { --editor-inline-cols:7; }
.editor-page .editor-inline-grid[data-inline-cols="8"] { --editor-inline-cols:8; }
.editor-page .editor-inline-grid>.form-field,
.editor-page .editor-inline-grid>.form-field>input,
.editor-page .editor-inline-grid>.form-field>select { max-width:none; }
.editor-page .editor-inline-grid>.field-prose { grid-column:auto; max-width:none; }
.editor-page .editor-inline-grid>.field-prose>textarea {
  width:100%; max-width:none; height:36px; min-height:36px;
  padding:8px 9px; border-radius:7px; font-size:12px; line-height:18px;
  resize:vertical;
}
.editor-page #editor-status,
.editor-page .form-field select {
  appearance:none; -webkit-appearance:none; padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23818a80' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;
}
@media(max-width:1200px) {
  .editor-page { padding-inline:24px; }
}
@container (min-width:1200px) {
  .editor-page .editor-inline-grid {
    grid-template-columns:repeat(var(--editor-inline-cols,6),minmax(0,1fr));
  }
  .editor-page .editor-inline-grid[data-inline-cols="7"] {
    grid-template-columns:repeat(5,minmax(0,1fr)) repeat(2,minmax(0,1.7fr));
  }
  .editor-page [data-editor-group="推广与人群"] .editor-inline-grid[data-inline-cols="6"] {
    grid-template-columns:repeat(4,minmax(0,1fr)) repeat(2,minmax(0,1.7fr));
  }
  .editor-page .editor-inline-grid.inline-fill-note {
    grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,3.4fr);
  }
  .editor-page .editor-inline-grid.inline-fill-note>.field-prose { grid-column:auto; }
}
@container (max-width:1199px) {
  .editor-page .editor-metrics-grid,
  .editor-page .editor-metrics-grid.basic-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@container (max-width:899px) {
  .editor-page .editor-metrics-grid,
  .editor-page .editor-metrics-grid.basic-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@container (max-width:559px) {
  .editor-page .editor-metrics-grid,
  .editor-page .editor-metrics-grid.basic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .editor-page .editor-notes-grid { grid-template-columns:minmax(0,1fr); }
}
@container (max-width:359px) {
  .editor-page .editor-metrics-grid,
  .editor-page .editor-metrics-grid.basic-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:760px) {
  .editor-page-head { gap:14px; flex-wrap:wrap; }
  .editor-page-actions { margin-left:auto; }
  .editor-heading h1 { font-size:24px; }
  .editor-card-content { padding:22px; }
  .editor-card-heading { padding:22px 22px 0; }
  .editor-card>summary { padding:22px; }
}
@media(max-width:600px) {
  .editor-page { padding:0 14px 22px; }
  .editor-page-head { padding:18px 0 16px; gap:14px; }
  .editor-heading { width:100%; }
  .editor-back { margin-bottom:10px; }
  .editor-heading h1 { font-size:23px; }
  .editor-heading p { margin-top:6px; }
  .editor-page-actions { width:100%; justify-content:flex-end; gap:8px; }
  .editor-page-actions .btn { min-height:36px; padding:8px 16px; font-size:12px; }
  .editor-page-body { padding-top:16px; }
  .editor-card { margin-bottom:14px; border-radius:14px; }
  .editor-card-heading { padding:18px 17px 0; gap:12px; }
  .editor-card h2,.editor-card>summary strong { font-size:14px; }
  .editor-card-content { padding:20px 17px; }
  .editor-page .editor-metrics-grid,
  .editor-page .editor-metrics-grid.basic-grid,
  .editor-page .editor-notes-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .editor-page .editor-metrics-grid>.form-field,
  .editor-page .editor-metrics-grid>.form-field>input,
  .editor-page .editor-metrics-grid>.form-field>select { max-width:100%; }
  .editor-page .form-field.wide { grid-column:auto; }
  .editor-card>summary { min-height:68px; padding:20px 17px; gap:10px; }
  .editor-card>summary>span { font-size:10.5px; max-width:170px; }
  .editor-page .editor-type-control { gap:5px; font-size:10px; }
  .editor-type-control select { max-width:110px; padding-left:8px; font-size:11px; }
  .editor-card-heading:has(.editor-heading-controls>[data-action="refresh-operators"]) { flex-wrap:wrap; }
  .editor-heading-controls:has(>[data-action="refresh-operators"]) {
    flex-wrap:nowrap; min-width:0; max-width:100%; margin-left:auto; gap:10px;
  }
  .editor-heading-controls:has(>[data-action="refresh-operators"])>.editor-type-control { min-width:0; flex-shrink:1; }
  .editor-heading-controls:has(>[data-action="refresh-operators"])>.editor-type-control select { min-width:0; max-width:min(110px,100%); }
  .editor-heading-controls>[data-action="refresh-operators"] { font-size:11px; }
  .editor-page .bi-inputs { display:flex; flex-wrap:wrap; }
  .editor-page .bi-inputs>label { flex:1 1 100%; min-width:0; }
  .editor-page .bi-heading { display:block; }
  .editor-page .read-only-tag { display:none; }
  .editor-page .note-entry { flex-direction:column; align-items:stretch; }
  .editor-page .note-entry textarea { width:100%; }
  .editor-page .note-entry button { align-self:flex-end; }
}

/* Shared outer breathing room: 15px more above/below every review card. */
.editor-page .editor-card-heading { padding-top:var(--editor-card-edge); align-items:flex-start; }
.editor-page .editor-card-content { padding-bottom:var(--editor-card-edge); }
.editor-page .editor-card>summary { padding-top:var(--editor-card-edge); }
.editor-page .editor-card:not([open])>summary { padding-bottom:var(--editor-card-edge); }
@media (max-width:900px) {
  .editor-page .editor-card-heading:has(.editor-assignment) { flex-wrap:wrap; }
  .editor-page .editor-heading-controls:has(.editor-assignment) { flex:1 1 100%; }
  .editor-assignment { width:100%; }
}
@media (max-width:600px) {
  .editor-page { --editor-card-edge:35px; }
  .editor-assignment-row { justify-content:flex-start; }
  .editor-assignment-row .editor-type-control { min-width:0; flex:1 1 100%; }
  .editor-assignment-row .editor-type-control select { max-width:100%; }
  .assignment-feedback { justify-content:flex-start; }
  .assignment-help { text-align:left; }
}

.mapping-entry { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 18px; color:var(--muted); font-size:12px; }
.mapping-tabs { display:flex; gap:8px; margin:0 0 14px; }
.mapping-version { color:var(--muted); font-size:11px; margin-bottom:14px; }
.mapping-config-table { max-height:55vh; overflow:auto; border:1px solid var(--line); border-radius:10px; }
.mapping-config-table table { width:100%; min-width:620px; border-collapse:collapse; table-layout:fixed; }
.mapping-config-table th,.mapping-config-table td { white-space:normal; text-align:left; padding:12px; border-bottom:1px solid var(--line); font-size:12px; vertical-align:top; }
.mapping-config-table th { position:sticky; top:0; z-index:1; background:#fff; }
.mapping-config-table th:nth-child(1) { width:22%; }
.mapping-config-table th:nth-child(2) { width:43%; }
.mapping-config-table th:nth-child(3) { width:19%; }
.mapping-config-table small { display:block; color:var(--tertiary); font-size:10.5px; margin-top:5px; overflow-wrap:anywhere; }
.mapping-config-table select { width:100%; min-width:0; min-height:34px; font-size:12px; background-color:#fff; }
.mapping-toggle { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.mapping-toggle input { width:14px; min-height:14px; accent-color:#17251d; }
.modal:has(.mapping-config-table) { width:min(1000px,100%); }
.mapping-tabs .filter-tab.active { background:#15221a; border-color:#15221a; color:#fff; }
