/* ===== 全局重置与基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* ===== 头部 ===== */
.app-header {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-header h1 {
    font-size: 20px;
    color: #1890ff;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}
.btn-logout {
    color: #ff4d4f;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 12px;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-logout:hover {
    background: #fff2f0;
}
.nav-settings-link {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 12px;
    border: 1px solid #91d5ff;
    border-radius: 4px;
    transition: all 0.2s;
}
.nav-settings-link:hover {
    background: #e6f7ff;
    text-decoration: none;
}

/* ===== 主体布局 ===== */
.app-main {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== 通用卡片 ===== */
.section-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.section-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* ===== 提醒区 ===== */
.reminders-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.reminder-card {
    flex: 1 1 280px;
    padding: 14px 18px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 14px;
    cursor: pointer;
}
.reminder-card:hover, .reminder-card:focus-visible { filter: brightness(0.97); outline: 2px solid #1a6fb5; outline-offset: 1px; }
/* 关键时间点提醒用虚线左边框与合同截止区分 */
.reminder-card.milestone { border-left-style: dashed; }
.reminder-card.urgent {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}
.reminder-card.warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}
.reminder-card.expired {
    background: #e5e7eb;
    border-left-color: #9ca3af;
    color: #4b5563;
}
.reminder-card.pending_confirmation {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}
.reminder-card .rc-company {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}
.reminder-card .rc-detail {
    font-size: 13px;
    opacity: 0.85;
}
.reminder-card .rc-status {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}
.reminder-card.urgent .rc-status { background: #fca5a5; color: #7f1d1d; }
.reminder-card.warning .rc-status { background: #fcd34d; color: #78350f; }
.reminder-card.expired .rc-status { background: #d1d5db; color: #374151; }
.reminder-card.pending_confirmation .rc-status { background: #fcd34d; color: #78350f; }

/* ===== 上传区 ===== */
.drop-zone {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #1890ff;
    background: #e6f7ff;
}
.drop-zone-content p {
    margin-top: 8px;
    color: #666;
    font-size: 14px;
}
.link-text {
    color: #1890ff;
    cursor: pointer;
    text-decoration: underline;
}
.hint-text {
    color: #999;
    font-size: 13px;
}

/* 上传进度 */
.upload-progress {
    margin-top: 16px;
    text-align: center;
}
.progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: #1890ff;
    border-radius: 3px;
    transition: width 0.3s;
}
.progress-fill.indeterminate {
    width: 30%;
    animation: indeterminate 1.5s infinite ease-in-out;
}
@keyframes indeterminate {
    0% { margin-left: 0; }
    50% { margin-left: 70%; }
    100% { margin-left: 0; }
}
.progress-text {
    font-size: 13px;
    color: #666;
}
.upload-tasks { margin-top: 20px; border-top: 1px solid #e5e7eb; padding-top: 18px; }
.upload-tasks-heading, .upload-task-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-tasks-heading h3 { margin: 0; font-size: 16px; }
.upload-tasks-help, #upload-tasks-status, .upload-task-meta, .upload-task-message { font-size: 13px; line-height: 1.6; }
.upload-tasks-help, .upload-task-meta { color: #626b77; }
.upload-tasks-help { margin: 10px 0 6px; }
#upload-tasks-status { margin: 6px 0 10px; }
.upload-tasks-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.upload-task { padding: 12px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.upload-task-heading strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.upload-task-state { flex-shrink: 0; padding: 2px 7px; border-radius: 4px; font-size: 12px; background: #eef2f6; color: #425166; }
.upload-task-succeeded { color: #166534; background: #edf8ef; }
.upload-task-failed, .upload-task-interrupted, .upload-task-expired { color: #92400e; background: #fff7e5; }
.upload-task-meta, .upload-task-message { margin: 5px 0 0; overflow-wrap: anywhere; }
.upload-task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.upload-task-actions:empty { display: none; }
.upload-task-actions button, .upload-tasks-heading button { min-height: 36px; }
.upload-task-error { color: #b42318; }
.upload-worker-notice { padding: 10px 12px; border: 1px solid #f0d49a; border-radius: 5px; background: #fffbeb; color: #805900; font-size: 13px; }
#upload-submit-retry { margin-left: 8px; }
@media (max-width: 560px) {
    .upload-task-heading { align-items: flex-start; }
    .upload-tasks-list { max-height: 420px; }
    #upload-submit-retry { display: block; margin: 8px auto 0; }
    #upload-submit-retry[hidden] { display: none; }
}

/* 抽取路径标识 */
.extraction-path-indicator {
    margin-bottom: 12px;
}
.path-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}
.path-tag.path-enhanced {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.path-tag.path-fallback {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.path-tag.path-local {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #a5b4fc;
}

/* 角色异常提示 */
.role-anomaly-alert {
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-left: 4px solid #fa8c16;
    color: #ad6800;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* 提取结果表单 */
.extract-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.extract-result h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}
.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}
.btn-save {
    margin-top: 20px;
    padding: 10px 32px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-save:hover { background: #40a9ff; }
.btn-save:disabled { background: #bfbfbf; cursor: not-allowed; }
.contract-save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kingdee-save-status { overflow-wrap: anywhere; white-space: pre-wrap; margin-top: 12px; }
.kingdee-code-dialog { width: min(580px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; border: 1px solid #d9d9d9; border-radius: 8px; padding: 24px; }
.kingdee-code-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.kingdee-code-fields { display: grid; gap: 12px; margin-top: 16px; }
.kingdee-code-fields .form-group { display: flex; flex-direction: column; gap: 6px; }
.kingdee-code-fields select { max-width: 100%; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px; }
.kingdee-code-fields small { color: #666; }

/* ===== 历史表格 ===== */
.table-wrapper {
    overflow-x: auto;
}
.contracts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.contracts-table th {
    background: #fafafa;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
}
.contracts-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.contracts-table tbody tr:nth-child(even) {
    background: #fafafa;
}
.contracts-table tbody tr:hover {
    background: #e6f7ff;
    cursor: pointer;
}
.contracts-table tbody tr.expanded {
    background: #e6f7ff;
}
.contracts-table .detail-row td {
    background: #f6f8fa;
    padding: 16px 20px;
    font-size: 13px;
    color: #555;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 24px;
}
.detail-grid .dg-item {
    display: flex;
    gap: 6px;
}
.detail-grid .dg-label {
    color: #999;
    min-width: 80px;
    flex-shrink: 0;
}
.detail-grid .dg-value {
    color: #333;
    word-break: break-all;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}
.status-tag.urgent { background: #fee2e2; color: #991b1b; }
.status-tag.warning { background: #fef3c7; color: #92400e; }
.status-tag.expired { background: #e5e7eb; color: #4b5563; }
.status-tag.normal { background: #d1fae5; color: #065f46; }
.status-tag.pending-confirmation { background: #fef3c7; color: #92400e; }

/* 分页 */
.pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.pagination button {
    padding: 6px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.pagination button:hover { border-color: #1890ff; color: #1890ff; }
.pagination button.active { background: #1890ff; color: #fff; border-color: #1890ff; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 空提示 */
.empty-hint {
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* Toast 通知 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    animation: toast-in 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast.success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.toast.error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .app-main { padding: 0 8px; }
    .section-card { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .reminder-card { flex: 1 1 100%; }
    .contracts-table { font-size: 13px; }
    .contracts-table th,
    .contracts-table td { padding: 8px 10px; }
}

/* ---- 历史合同展开行：可编辑表单 ---- */
.detail-edit .dg-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-edit .dg-label {
  font-size: 12px;
  color: #6b7280;
}
.detail-edit .dg-input {
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
.detail-edit .dg-input:focus {
  outline: none;
  border-color: #2563eb;
}
.detail-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}
.detail-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
.btn-save-contract,
.btn-delete-contract {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-save-contract {
  background: #2563eb;
  color: #fff;
}
.btn-save-contract:hover { background: #1d4ed8; }
.btn-delete-contract {
  background: #fff;
  color: #dc2626;
  border-color: #fca5a5;
}
.btn-delete-contract:hover { background: #fef2f2; }

/* ===== 设置页：连通性自检按钮与字段提示 ===== */
.btn-test {
    /* 不撑满整格：撑满了看着像输入框，而它是个动作按钮 */
    align-self: flex-start;
    width: auto;
    padding: 6px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}
.btn-test:hover:not(:disabled) { background: #f5f5f5; }
.btn-test:disabled { opacity: .6; cursor: default; }
.field-hint { font-weight: normal; color: #888; font-size: 12px; }

/* ===== 详情区的抽取来源徽标 ===== */
.detail-source {
    margin: 10px 0 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ===== 详情区：左原件、右字段的对照布局 ===== */
.detail-split {
    display: grid;
    grid-template-columns: minmax(320px, 44%) 1fr;
    gap: 16px;
    align-items: start;
}
/* 窄屏放不下两栏就上下堆叠，别把表格挤到横向滚动 */
@media (max-width: 1000px) {
    .detail-split { grid-template-columns: 1fr; }
}
.detail-preview {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}
.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f2f2f2;
    font-size: 13px;
}
.preview-title { font-weight: 600; margin-right: auto; }
.preview-toolbar a { color: #1a6fb5; text-decoration: none; }
.preview-toolbar a:hover { text-decoration: underline; }
.btn-ocr-text,
.btn-history {
    padding: 3px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}
.btn-ocr-text:hover,
.btn-history:hover { background: #f5f5f5; }
.preview-body { max-height: 620px; overflow: auto; background: #fff; }
.preview-pager { color: #666; }
.preview-img { width: 100%; height: auto; display: block; background: #fff; }
/* 未加载完的页也要占位，滚动到才请求；min-height 保证懒加载前就有可见高度 */
.preview-page { width: 100%; height: auto; min-height: 200px; display: block; background: #fff; border-bottom: 1px solid #eee; }
.preview-page-frame { position: relative; min-height: 200px; }
.preview-page-frame[data-state="loaded"] { min-height: 0; }
.preview-page-frame:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.preview-page-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: #666; text-align: center; }
.preview-page-state[hidden], .preview-retry[hidden] { display: none; }
.preview-retry { padding: 8px 14px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #1d4ed8; cursor: pointer; }
.preview-retry:disabled { opacity: .65; cursor: wait; }
.preview-loading,
.preview-unsupported { padding: 24px 12px; color: #666; text-align: center; font-size: 13px; }

/* 自动判类置信度与关键时间点编辑器 */
.schema-confidence { color: #4b5563; }
.schema-confidence.low { color: #b45309; font-weight: 600; }
.milestones-editor { margin-top: 18px; container-name: milestones; container-type: inline-size; }
.ms-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ms-table th, .ms-table td { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: middle; }
.ms-table th { color: #6b7280; font-weight: 600; background: #f9fafb; }
.ms-table select, .ms-table input { width: 100%; padding: 5px 6px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px; }
.ms-table .ms-date { max-width: 160px; }
.ms-status { white-space: nowrap; color: #6b7280; }
.ms-add { margin-top: 8px; }
.ms-remove { padding: 2px 8px; font-size: 12px; }
@container milestones (max-width: 600px) {
    .ms-table, .ms-table tbody { display: block; }
    .ms-table thead {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    }
    .ms-table tbody tr {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
        margin-bottom: 12px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 8px;
    }
    .ms-table td { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
    .ms-table td:nth-child(-n+3) { grid-column: 1 / -1; }
    .ms-table td:nth-child(-n+3)::before, .ms-table td.ms-status::before {
        display: block; margin-bottom: 5px; color: #6b7280; font-size: 12px;
    }
    .ms-table td:nth-child(1)::before { content: "时间点"; }
    .ms-table td:nth-child(2)::before { content: "日期"; }
    .ms-table td:nth-child(3)::before { content: "说明"; }
    /* The status cell exists only with contract reminders on, so target cells by class, not position. */
    .ms-table td.ms-status::before { content: "状态"; }
    .ms-table .ms-row td:last-child { grid-column: 2; align-self: end; justify-self: end; }
    .workbench .ms-table input, .workbench .ms-table select { font-size: 16px; }
    .ms-table .ms-date { max-width: 100%; }
    .ms-table .ms-remove, .milestones-editor .ms-add { min-height: 44px; }
}
.preview-unsupported a { color: #1a6fb5; margin-left: 6px; }
.ocr-text {
    max-height: 320px;
    overflow: auto;
    margin: 0;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}
.detail-fields { min-width: 0; }

/* ===== 历史合同：检索栏与导出 ===== */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.btn-export {
    padding: 6px 14px;
    border: 1px solid #1a6fb5;
    border-radius: 4px;
    background: #fff;
    color: #1a6fb5;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
.btn-export:hover { background: #eef5fb; }
.search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 16px;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fafafa;
}
.search-bar input,
.search-bar select {
    padding: 6px 10px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}
/* 关键词框吃掉多余宽度，其余按内容排 */
.search-bar #s-q { flex: 1 1 220px; min-width: 180px; }
.search-bar input[type="number"] { width: 118px; }
.search-bar input[type="date"] { width: 148px; }
/* 区间的两个输入框和中间的"至"必须整体换行，
   否则会出现"下限 至"留在上一行、"上限"被甩到下一行的断裂 */
.range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.range-sep { color: #999; font-size: 13px; }
.btn-search,
.btn-reset {
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.btn-search { border: 1px solid #1a6fb5; background: #1a6fb5; color: #fff; }
.btn-search:hover { background: #155a94; }
.btn-reset { border: 1px solid #d5d5d5; background: #fff; color: #555; }
.btn-reset:hover { background: #f0f0f0; }

/* ===== 用户管理 ===== */
.forbidden-note {
    padding: 16px 20px;
    border: 1px solid #f0d0a0;
    border-left: 4px solid #e0a030;
    border-radius: 6px;
    background: #fdf6e8;
    color: #8a6520;
}
.hint-text { color: #999; font-size: 12px; }

/* ===== 详情区的修改记录（通栏）===== */
.detail-history-row { margin-top: 14px; }
.edit-history {
    max-height: 320px;
    overflow: auto;
    margin-top: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    padding: 10px;
}
.history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.history-table th,
.history-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: top;
    word-break: break-all;
}
.history-table th { color: #777; font-weight: 600; white-space: nowrap; }
.history-table td.old { color: #b04040; text-decoration: line-through; }
.history-table td.new { color: #2a7a3a; }


/* ===== 设置类页面的共用外壳 =====
   原本内联在 settings.html 里，用户管理页和报表页只引 style.css 拿不到，
   整页会散架。提取到这里，三个页面共用一套。 */
.settings-container { max-width: 800px; margin: 0 auto; padding: 20px; }
.config-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.config-status { margin-top: 18px; }
.config-status .save-status { display: block; margin-left: 0; }
.settings-section { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.settings-section h2 { margin: 0 0 8px; font-size: 18px; color: #333; border-bottom: 2px solid #4a90d9; padding-bottom: 8px; }
.settings-section .section-desc { font-size: 13px; color: #999; margin-bottom: 16px; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; display: flex; flex-direction: column; }
.form-group label { font-size: 14px; color: #555; margin-bottom: 4px; font-weight: 500; }
.form-group .field-hint { font-size: 12px; color: #aaa; margin-top: 2px; }
.form-group input, .form-group select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-group input:focus, .form-group select:focus { border-color: #4a90d9; outline: none; box-shadow: 0 0 0 2px rgba(74,144,217,0.2); }
.btn-save-config { background: #4a90d9; color: #fff; border: none; padding: 10px 32px; border-radius: 4px; font-size: 16px; cursor: pointer; margin-top: 8px; }
.btn-save-config:hover { background: #357abd; }
.save-status { margin-left: 16px; font-size: 14px; }
.save-status.success { color: #27ae60; }
.save-status.error { color: #e74c3c; }
.nav-link { margin-left: 16px; color: #4a90d9; text-decoration: none; }
.nav-link:hover { text-decoration: underline; }
.review-panel { margin-top: 18px; padding: 16px; border: 1px solid #d8e2ec; border-radius: 6px; background: #f5f8fc; }
.review-panel p, .feedback-item p { white-space: pre-wrap; overflow-wrap: anywhere; }
.review-note, #feedback-content, .feedback-item textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #b8c5d4; border-radius: 4px; font: inherit; }
.review-tag { display: inline-block; margin-top: 6px; font-size: 12px; color: #344d69; }
.feedback-item { padding: 20px 0; border-bottom: 1px solid #d8e2ec; }
.feedback-item label { display: block; margin: 10px 0; }
.feedback-conflict { color: #8a4b13; }
.feedback-latest { margin-top: 12px; padding: 14px 16px; border: 1px solid #bdcce2; border-radius: 6px; background: #f5f8fc; }
.feedback-latest h4 { margin: 0 0 10px; }
input[readonly] { background: #f3f5f7; color: #4c5866; }
button:disabled { opacity: .55; cursor: not-allowed; }
.detail-actions { flex-wrap: wrap; gap: 8px; }
.review-panel button, .feedback-item button, #previous, #next {
    padding: 6px 10px; border: 1px solid #bdcce2; border-radius: 4px;
    background: #fff; color: #285cb5; cursor: pointer; font: inherit;
}
.review-panel [data-review="confirmed"] { background: #285cb5; color: #fff; border-color: #285cb5; }
.review-panel [data-review="issue"] { color: #915900; border-color: #dbb665; }
.review-panel button:disabled, button:disabled { opacity: .6; cursor: wait; }
.review-history-button { margin-top: 10px; }
.demo-notice { padding: 12px 16px; margin-bottom: 16px; background: #fff7df; border: 1px solid #e6cb84; border-radius: 6px; color: #76521c; }
.options-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid #f0d49a; border-radius: 6px; background: #fffbeb; color: #805900; }
.options-status[hidden] { display: none; }
.options-status span { flex: 1 1 240px; overflow-wrap: anywhere; }
.review-panel p { overflow-wrap: anywhere; }
.review-checklist { margin: 12px 0 18px; padding: 14px 16px; border: 1px solid #d8e2ec; border-radius: 6px; background: #f8fafc; overflow-wrap: anywhere; }
.review-checklist h4 { margin: 0 0 8px; font-size: 15px; }
.review-checklist p { margin: 6px 0; font-size: 13px; }
.review-checklist-basis { color: #526475; }
.review-checklist-blocking, .review-checklist-dirty { color: #8a4b13; }
.review-checklist ul { margin: 8px 0; padding-left: 20px; max-height: 200px; overflow: auto; }
.review-checklist li { margin: 7px 0; font-size: 13px; }
.review-checklist summary { margin-top: 10px; cursor: pointer; font-size: 13px; }
.review-checklist .review-field-link { padding: 3px 2px; border: 0; background: transparent; color: #285cb5; font: inherit; text-align: left; text-decoration: underline; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
#feedback-form { display: grid; gap: 8px; margin-top: 16px; }
#feedback-form label { font-size: 13px; color: #555; }
#feedback-form input, #feedback-form select { padding: 8px; border: 1px solid #bdcce2; border-radius: 4px; max-width: 360px; }
#feedback-form .btn-save { justify-self: start; margin-top: 8px; }
@media (max-width: 1100px) {
    .app-header { flex-wrap: wrap; gap: 10px; }
    .user-info { flex-wrap: wrap; gap: 8px; }
}
button:focus-visible, a:focus-visible { outline: 3px solid #5792cb; outline-offset: 2px; }
@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 12px; }
    .settings-container { padding: 12px; }
}
