/* Final desktop workbench layer; business templates stay unchanged. */
:root {
  --primary: #28649b;
  --primary-dark: #1d507e;
  --primary-light: #eef5fb;
  --success: #167b6c;
  --success-dark: #116657;
  --danger: #bd4141;
  --danger-dark: #a33333;
  --warning: #a66a15;
  --warning-dark: #875511;
  --light-border: #e7ebef;
}
:root { --background: #f5f6f8; --text: #242b36; --text-secondary: #485362; --muted: #657180; --border: #dce1e7; }
body { background: var(--background); letter-spacing: 0; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { letter-spacing: 0; }
button, a, input, textarea, select { scroll-margin: 20px; }
button:focus-visible, a:focus-visible { outline: 3px solid #238577; outline-offset: 3px; }
.topbar { background: #fff; color: #242b36; border-bottom: 1px solid #dce1e7; box-shadow: none; gap: 16px; padding: 16px 28px; }
.topbar-title { min-width: 290px; }
.topbar-title h1 { font-size: 21px; line-height: 1.4; text-shadow: none; }
.topbar-title span { color: #657180; line-height: 1.7; }
.topbar-title span::before { display: none; }
#sessionRemainingText { color: #657180; border-left-color: #dce1e7; }
#sessionRemainingText.session-remaining-warning { color: #a35600; }
.topbar-actions { gap: 8px; flex-shrink: 0; }
.topbar .button-top, .topbar-actions .button-top:last-child { color: #485362; background: #fff; border-color: #dce1e7; border-radius: 6px; }
.topbar .button-top:hover:not(:disabled) { background: #f1f4f7; border-color: #aeb9c7; transform: none; }
.topbar .button-warning { background: #167b6c; border-color: #167b6c; border-radius: 6px; box-shadow: none; }
.topbar .button-warning:hover:not(:disabled) { background: #116657; box-shadow: none; transform: none; }
.main-container { width: calc(100% - 48px); margin-top: 16px; }
.toolbar { background: transparent; border: 0; border-bottom: 1px solid #dce1e7; border-radius: 0; box-shadow: none; padding: 0 0 16px; gap: 12px; flex-wrap: wrap; }
.toolbar-left { min-width: 0; gap: 8px; }
.search-input { width: 320px; background: #fff; }
.overall-summary { background: transparent; border: 0; padding: 0; gap: 3px; flex-wrap: wrap; line-height: 1.8; }
.overall-summary strong { color: #334c6b; font-size: 17px; }
.summary-divider { margin: 0 7px; }
.news-section { border: 0; border-radius: 0; background: #fff; box-shadow: none; margin-bottom: 28px; }
.news-section:hover { box-shadow: none; }
.section-header, .section-header.unscheduled, .section-header:not(.unscheduled) { color: #242b36; background: #edf1f5; border-top: 2px solid #7692b0; border-bottom: 1px solid #dce1e7; min-height: 60px; padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
.section-header.unscheduled { background: #edf5f2; border-top-color: #388b78; }
.section-title { min-width: 190px; gap: 10px; }
.section-title h2 { font-size: 17px; }
.weekday { background: transparent; border: 0; color: #657180; padding: 0; font-size: 12px; }
.section-meta { gap: 8px; flex-wrap: wrap; }
.stat-badge { background: transparent; color: #657180; border: 0; border-radius: 0; padding: 4px 8px; min-width: 70px; }
.stat-badge strong { color: #334c6b; font-size: 18px; }
.date-group-actions { display: flex; align-items: center; gap: 16px; }
.copy-button { color: #225985; background: #fff; border: 1px solid #cbd8e5; border-radius: 6px; box-shadow: none; }
.copy-button:hover:not(:disabled) { background: #eef5fc; box-shadow: none; transform: none; }
.date-group-actions .group-delete-button { margin-left: 0; color: #a54949; background: transparent; border: 1px solid transparent; border-radius: 6px; font-weight: 400; box-shadow: none; }
.group-delete-button:hover:not(:disabled) { color: #9d3030; background: #fff0f0; border-color: #e7bcbc; box-shadow: none; transform: none; }
.news-section > table { width: 100% !important; }
.news-section > table th:nth-child(1), .news-section > table td:nth-child(1) { width: 100px !important; }
.news-section > table th:nth-child(2), .news-section > table td:nth-child(2) { width: 84px !important; }
.news-section > table th:nth-child(3), .news-section > table td:nth-child(3) { width: auto !important; }
.news-section > table th:nth-child(4), .news-section > table td:nth-child(4) { width: 150px !important; }
.news-section > table th:nth-child(5), .news-section > table td:nth-child(5) { width: 70px !important; }
.news-section > table th:nth-child(6), .news-section > table td:nth-child(6) { width: 245px !important; }
.news-section th { background: #fafbfc; color: #657180; height: 42px; }
.news-section > table th.col-actions { font-size: 13px; }
.news-section td { height: 58px; border-bottom-color: #edf0f3; }
.news-section > table .col-word-count strong { background: #eef4fb !important; box-shadow: none !important; border: 0 !important; color: #345a81 !important; font-size: 14px !important; border-radius: 5px !important; letter-spacing: 0 !important; }
.news-section > table tr.priority-row .col-word-count strong { background: #eef4fb !important; }
.news-section tbody tr:hover { background: #f3f7fb; }
.news-section tbody tr.priority-row { background: #fffbef; box-shadow: 3px 0 0 #d4a435 inset; }
.news-section tbody tr.priority-row:hover { background: #fff5d9; }
.news-title-link, .news-title-no-text { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.news-title-link { color: #235c93; }
.normal-label { color: #74808d; }
.priority-label { border-radius: 4px; color: #965800; border-color: #e6ca8c; background: #fff3d5; letter-spacing: 0; }
.news-section > table .col-actions .small-action { border-radius: 5px !important; }
.news-section > table .col-actions .delete-action { margin-left: 12px !important; padding-left: 12px !important; border-radius: 0 !important; }
.modal { border-radius: 8px; box-shadow: 0 16px 64px rgba(25,35,45,.2); }
.modal-header { background: #fff; border-bottom: 1px solid #e2e7ec; }
.modal-header h2 { font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
.modal-footer { background: #fafbfc; }
.form-control { border-radius: 6px; }
.original-display { color: #26323e; font-size: 16px; line-height: 1.9; }
.login-page { background: #eef2f5; }
.login-card { border-radius: 8px; border: 1px solid #dce1e7; box-shadow: 0 12px 40px rgba(30,45,60,.08); }
.login-logo h1, .login-logo h2 { color: #294a68; letter-spacing: 0; }
@media (max-width: 1260px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-actions { flex-wrap: wrap; }
  .news-section > table th:nth-child(4), .news-section > table td:nth-child(4) { width: 125px !important; }
}
/* Shared controls and all modal surfaces. */
body { font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif; }
button { font-weight: 600; }
.button { border-radius: 6px; box-shadow: none; line-height: 1.4; }
.button-primary, .button-success, .button-danger, .button-warning { box-shadow: none; }
.button:hover:not(:disabled), .button:active:not(:disabled) { transform: none; }
.button-primary { background: var(--primary); }
.button-primary:hover:not(:disabled) { background: var(--primary-dark); }
.button-success { background: var(--success); }
.button-danger { background: var(--danger); }
.button-danger:hover:not(:disabled) { background: var(--danger-dark); }
button:disabled { opacity: .5; }
input::placeholder, textarea::placeholder { color: #7a8592; opacity: 1; }
.form-control { color: var(--text); border-color: #cfd7df; box-shadow: none; font-size: 14px; }
.form-control:focus { border-color: #4a89bb; box-shadow: 0 0 0 3px rgba(40,100,155,.12); }
.form-group > label { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.checkbox-row input { accent-color: var(--primary); }
.field-help { color: #657180; line-height: 1.65; }
.toolbar-left::before { display: none; }
.search-input { padding-left: 12px; }
.summary-divider { background: #dce1e7; border: 0; height: 14px; }
.news-section > table .col-sort { padding-left: 10px !important; }
.news-section > table .sort-index { font-weight: 600 !important; box-shadow: none; }
.news-section > table .arrow-button { box-shadow: none; border-color: #d2deea; background: #f2f6fa; color: #28649b; }
.news-section > table .arrow-button:hover:not(:disabled) { background: #28649b; border-color: #28649b; color: #fff; transform: none; box-shadow: none; }
.news-section > table .col-actions .small-action { font-weight: 600; box-shadow: none; }
.news-section > table .col-actions .delete-action { background: transparent; border-top: 0; border-bottom: 0; border-right: 0; color: #ac4141; }
.news-section > table .col-actions .delete-action:hover:not(:disabled) { background: #fff0f0; }
.news-title-link::after { display: none; }
.news-title-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.empty-row { color: #657180; background: #fff; }
.modal-overlay { background: rgba(25,34,44,.48); backdrop-filter: none; padding: 20px; }
.modal { max-width: calc(100vw - 40px); max-height: calc(100dvh - 40px); border: 1px solid #dce1e7; }
.modal-header { min-height: 68px; padding: 18px 24px; }
.modal-header h2 { color: var(--text); font-weight: 600; }
.modal-subtitle { line-height: 1.65; }
.modal-body { min-height: 0; padding: 24px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.modal-footer { padding: 14px 24px; }
.close-modal { width: 32px; height: 32px; border-radius: 6px; font-size: 23px; background: #f5f7f9; }
.close-modal:hover { color: #344454; background: #e9edf1; transform: none; }
.item-modal { width: 730px; }
.modal-large { width: 1160px; }
.modal-original { width: 1000px; }
.modal-original .modal-header h2 { max-height: 88px; overflow: auto; }
.recount-box { border: 0; border-top: 1px solid #e7ebef; border-radius: 0; background: transparent; margin-top: 0; padding: 14px 0 0; gap: 12px; font-size: 13px; }
.original-text-area { min-height: 180px !important; }
.original-meta { padding: 0 0 16px; border: 0; border-bottom: 1px solid #e7ebef; border-radius: 0; background: transparent; line-height: 1.7; }
.original-display { min-height: 220px; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; max-height: 58vh; font-size: 16px; line-height: 1.9; }
.import-rule-tip { padding: 12px 14px; border: 0; border-left: 3px solid #75a3c9; border-radius: 0; color: #405b73; background: #f1f6fa; font-size: 13px; }
.import-rule-tip code { color: #345c7e; background: transparent; padding: 0 2px; border-radius: 0; }
.import-textarea { min-height: 230px !important; padding: 12px; font-size: 14px; line-height: 1.8; }
.import-actions { flex-wrap: wrap; gap: 10px; }
.recognition-summary { font-weight: 500; font-size: 13px; }
.warning-box { border: 0; border-left: 3px solid #c59642; border-radius: 0; color: #78551b; background: #fffaef; font-size: 13px; }
.preview-heading { flex-wrap: wrap; }
.preview-heading h3 { font-size: 15px; font-weight: 600; }
.preview-wrapper { border-radius: 6px; box-shadow: none; max-height: 340px; }
.preview-table { min-width: 0; }
.preview-table th { height: 40px; font-size: 12px; color: #657180; background: #f8fafb; }
.preview-table td { height: 54px; padding: 8px; background: #fff; }
.preview-table input { height: 36px; font-size: 13px; border-radius: 5px; }
.preview-table input:focus { border-color: #4a89bb; box-shadow: 0 0 0 2px rgba(40,100,155,.12); }
.preview-table .preview-word { background: #f4f6f8; color: #405b73; border-color: transparent; text-align: center; font-variant-numeric: tabular-nums; }
.preview-number-column { width: 52px; }
.preview-word-column { width: 85px; }
.preview-reporter-column { width: 180px; }
.preview-remove-column { width: 64px; }
.preview-remove { border-radius: 5px; color: #ac4141; font-size: 13px; }
.preview-remove:hover { background: #fff0f0; text-decoration: none; }
.preview-row-invalid td { background: #fff7f7; }
.quick-schedule-modal > #quickScheduleForm { flex: 1 1 auto; overflow: hidden; }
.quick-schedule-modal .modal-body { flex: 1 1 auto; min-height: 0; }
.quick-schedule-footer { flex: 0 0 auto; padding: 14px 24px; background: #fafbfc; }
.quick-schedule-item-title { border: 0; border-left: 3px solid #75a3c9; border-radius: 0; background: #f4f7fa; font-weight: 500; line-height: 1.7; }
.quick-schedule-option { border-radius: 6px; min-height: 100px; box-shadow: none; }
.quick-schedule-option:hover { border-color: #75a3c9; background: #f1f6fa; box-shadow: none; transform: none; }
.quick-schedule-option.is-today { background: #28649b; border-color: #28649b; box-shadow: none; }
.quick-schedule-option.is-today:hover { background: #1d507e; border-color: #1d507e; box-shadow: none; }
.quick-schedule-option-name { font-size: 16px; font-weight: 600; }
.quick-schedule-option-date { font-weight: 500; }
.quick-schedule-option.is-today .quick-schedule-option-summary { color: #f0f5fa; }
.delete-warning-icon, .delete-group-warning-icon { width: 44px; height: 44px; font-size: 24px; color: #ac4141; background: #fff0f0; border: 1px solid #edcccc; box-shadow: none; }
.delete-warning-text { font-size: 15px; line-height: 1.7; font-weight: 600; }
.delete-item-title { background: #f7f9fa; border-radius: 6px; font-weight: 500; overflow-wrap: anywhere; }
.delete-group-summary { border: 0; border-bottom: 1px solid #e7ebef; border-radius: 0; padding: 0 0 16px; background: transparent; box-shadow: none; }
.delete-group-summary strong { font-size: 17px; font-weight: 600; }
.delete-group-items { padding: 0 0 16px; border: 0; border-bottom: 1px solid #e7ebef; border-radius: 0; background: transparent; }
.delete-group-items li { overflow-wrap: anywhere; line-height: 1.65; }
.delete-group-danger-note { border: 0; border-left: 3px solid #d09090; border-radius: 0; color: #894343; background: #fff5f5; }
.delete-group-danger-note strong { color: #894343; font-weight: 600; }
.delete-warning-detail { line-height: 1.7; color: #ac4141; }
.login-page::before, .login-page::after { display: none; }
.login-card { width: 440px; padding: 36px 40px 30px; }
.login-logo h1 { font-size: 29px; font-weight: 700; }
.login-logo h2 { font-size: 21px; font-weight: 500; }
.login-logo p { color: #657180; }
.login-button { border-radius: 6px; background: #28649b; box-shadow: none; font-size: 15px; }
.login-button:hover:not(:disabled) { background: #1d507e; box-shadow: none; transform: none; }
.toast { top: auto; bottom: 24px; left: auto; right: 24px; transform: none; min-width: 260px; max-width: min(480px, calc(100vw - 40px)); border-radius: 6px; font-size: 14px; font-weight: 500; box-shadow: 0 6px 24px rgba(25,34,44,.15); backdrop-filter: none; overflow-wrap: anywhere; }
.toast-success { background: #167b6c; }
.toast-error { background: #b43e3e; }
.toast-warning { background: #93631b; }
.loading-mask { background: rgba(25,34,44,.3); backdrop-filter: none; }
.loading-card { min-width: 260px; max-width: calc(100vw - 40px); border: 1px solid #dce1e7; border-radius: 8px; background: #fff; color: #405365; box-shadow: 0 10px 40px rgba(25,34,44,.16); font-size: 14px; font-weight: 500; }
.loading-spinner { flex: 0 0 auto; border-color: #dce5ed; border-top-color: #28649b; }
@media (max-height: 760px) {
  .modal-overlay { padding: 12px; }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-header { padding: 14px 20px; min-height: 60px; }
  .modal-body { padding: 18px 20px; }
  .modal-footer, .quick-schedule-footer { padding: 12px 20px; }
  .import-textarea { min-height: 180px !important; }
}
@media print {
  body { overflow: visible; background: #fff; }
  .toolbar, .date-group-actions, .topbar-actions { display: none !important; }
  .section-header, .section-header.unscheduled, .section-header:not(.unscheduled) { background: #fff !important; color: #222; }
}
