/*
 * =========================================================
 * 《翠屏新闻》稿件编排管理
 * 现代化视觉主题
 *
 * 本文件只改变页面外观，不改变任何业务功能。
 * 必须放在 styles.css 之后加载。
 * =========================================================
 */

/* ---------------------------------------------------------
   现代化颜色和尺寸变量
   --------------------------------------------------------- */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #153e75;
  --primary-light: #eff6ff;

  --success: #059669;
  --success-dark: #047857;

  --danger: #dc2626;
  --danger-dark: #b91c1c;

  --warning: #ea580c;
  --warning-dark: #c2410c;

  --text: #172033;
  --text-secondary: #344054;
  --muted: #667085;
  --light-muted: #98a2b3;

  --border: #dce3ee;
  --light-border: #e9edf4;

  --background: #f3f6fb;
  --white: #ffffff;

  --modern-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 8px 24px rgba(35, 55, 80, 0.07);

  --modern-shadow-hover:
    0 2px 5px rgba(16, 24, 40, 0.05),
    0 15px 35px rgba(35, 55, 80, 0.11);
}

/* ---------------------------------------------------------
   页面整体
   --------------------------------------------------------- */

html {
  background: var(--background);
}

body {
  min-width: 1160px;
  color: var(--text);
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(37, 99, 235, 0.055),
      transparent 28%
    ),
    linear-gradient(180deg, #f7f9fc 0, #f3f6fb 420px);
  font-size: 15px;
  letter-spacing: 0.01em;
}

/* 让按钮、输入框的文字显示更加清晰 */
button,
input,
textarea,
select {
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------
   顶部导航栏
   --------------------------------------------------------- */

.topbar {
  position: relative;
  min-height: 82px;
  padding: 12px 34px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(
      circle at 82% 20%,
      rgba(96, 165, 250, 0.28),
      transparent 30%
    ),
    linear-gradient(105deg, #133b67 0%, #174d91 42%, #1d5ed2 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 8px 26px rgba(15, 42, 75, 0.18);
}

/* 顶部背景装饰 */
.topbar::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: -62px;
  width: 260px;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.topbar-title {
  position: relative;
  z-index: 1;
}

.topbar-title h1 {
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.topbar-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.topbar-title span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.14);
}

.topbar-actions {
  position: relative;
  z-index: 1;
  gap: 9px;
}

/* 顶部普通按钮 */
.button-top {
  min-height: 41px;
  padding: 9px 16px;
  border-color: rgba(255, 255, 255, 0.25);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
}

.button-top:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.19);
  transform: translateY(-1px);
}

/* 智能导入按钮使用更醒目的橙色 */
.topbar .button-warning {
  min-height: 43px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow:
    0 6px 16px rgba(194, 65, 12, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.topbar .button-warning:hover:not(:disabled) {
  background: linear-gradient(135deg, #fb7c20, #d94d08);
  box-shadow:
    0 9px 22px rgba(194, 65, 12, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   主内容区域
   --------------------------------------------------------- */

.main-container {
  width: calc(100% - 64px);
  max-width: 1860px;
  margin: 27px auto 60px;
}

/* ---------------------------------------------------------
   搜索和总体统计工具栏
   --------------------------------------------------------- */

.toolbar {
  position: relative;
  min-height: 76px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(214, 222, 234, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--modern-shadow);
  backdrop-filter: blur(10px);
}

.toolbar-left {
  gap: 9px;
}

.search-input {
  width: 360px;
  height: 42px;
  padding-left: 39px;
  border-color: #d5ddea;
  border-radius: 9px;
  background:
    linear-gradient(90deg, transparent 0, transparent 100%),
    #fbfcfe;
}

/* 使用简单放大镜作为搜索框装饰 */
.toolbar-left {
  position: relative;
}

.toolbar-left::before {
  content: "⌕";
  position: absolute;
  z-index: 1;
  left: 13px;
  top: 50%;
  color: #8492a6;
  font-size: 21px;
  line-height: 1;
  transform: translateY(-52%);
  pointer-events: none;
}

.search-input:focus {
  border-color: #86aefb;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.1),
    0 2px 4px rgba(16, 24, 40, 0.04);
}

.overall-summary {
  padding: 9px 13px;
  border-radius: 9px;
  color: #5c687a;
  background: #f7f9fc;
  font-size: 14px;
}

.overall-summary strong {
  margin: 0 3px;
  color: #1d5fd1;
  font-size: 21px;
  font-weight: 800;
}

/* ---------------------------------------------------------
   通用按钮
   --------------------------------------------------------- */

.button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #3478f6, #1d5ed2);
  box-shadow: 0 5px 13px rgba(37, 99, 235, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #194fac);
  box-shadow: 0 7px 17px rgba(37, 99, 235, 0.26);
}

.button-success {
  background: linear-gradient(135deg, #10a674, #05855e);
  box-shadow: 0 5px 13px rgba(5, 150, 105, 0.16);
}

.button-danger {
  background: linear-gradient(135deg, #e23b3b, #c52222);
}

.button-white {
  border-color: #d5ddea;
  color: #415068;
  background: linear-gradient(180deg, #ffffff, #fafbfd);
}

.button-white:hover:not(:disabled) {
  border-color: #9fb0c8;
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(35, 55, 80, 0.08);
}

/* ---------------------------------------------------------
   日期和未定日期区块
   --------------------------------------------------------- */

.news-section {
  margin-bottom: 25px;
  overflow: hidden;
  border: 1px solid #dbe2ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--modern-shadow);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.news-section:hover {
  box-shadow: var(--modern-shadow-hover);
}

.section-header {
  position: relative;
  min-height: 70px;
  padding: 13px 20px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(147, 197, 253, 0.28),
      transparent 29%
    ),
    linear-gradient(100deg, #174b7c 0%, #1c62ad 56%, #2878ce 100%);
}

/* 未设置日期区块采用现代深灰蓝 */
.section-header.unscheduled {
  background:
    radial-gradient(
      circle at 83% 20%,
      rgba(148, 163, 184, 0.18),
      transparent 30%
    ),
    linear-gradient(100deg, #2c3a50 0%, #3c4d67 56%, #53657e 100%);
}

.section-header::after {
  content: "";
  position: absolute;
  right: 30%;
  bottom: -50px;
  width: 190px;
  height: 95px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.section-title,
.section-meta {
  position: relative;
  z-index: 1;
}

.section-title {
  gap: 14px;
}

.section-title h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.weekday {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.83);
  background: rgba(255, 255, 255, 0.09);
  font-size: 12px;
}

.section-meta {
  gap: 9px;
}

.stat-badge {
  min-width: 120px;
  padding: 8px 14px;
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(4px);
}

.stat-badge strong {
  margin: 0 2px;
  font-size: 23px;
  font-weight: 800;
}

.copy-button {
  min-height: 42px;
  margin-left: 4px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 9px;
  color: #174b7c;
  background: #ffffff;
  box-shadow:
    0 4px 12px rgba(15, 42, 75, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.copy-button:hover:not(:disabled) {
  color: #1d4ed8;
  background: #f0f7ff;
  box-shadow:
    0 7px 17px rgba(15, 42, 75, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   表格
   --------------------------------------------------------- */

table {
  font-size: 15px;
}

th {
  height: 47px;
  padding: 12px 13px;
  border-bottom: 1px solid #e2e8f0;
  color: #58667b;
  background: linear-gradient(180deg, #fbfcfe, #f7f9fc);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

td {
  height: 58px;
  padding: 13px;
  border-bottom-color: #edf0f5;
  color: #28364a;
}

tbody tr {
  position: relative;
}

tbody tr:nth-child(even):not(.priority-row) {
  background: #fcfdff;
}

tbody tr:hover {
  background: #f1f7ff;
}

tbody tr.priority-row {
  background:
    linear-gradient(
      90deg,
      rgba(255, 247, 225, 0.95),
      rgba(255, 251, 239, 0.72)
    );
  box-shadow: 4px 0 0 #f59e0b inset;
}

tbody tr.priority-row:hover {
  background:
    linear-gradient(
      90deg,
      rgba(255, 241, 200, 0.98),
      rgba(255, 249, 231, 0.85)
    );
}

.col-sort {
  width: 100px;
}

.col-word-count {
  width: 115px;
}

.col-reporter {
  width: 205px;
}

.col-priority {
  width: 120px;
}

.col-date {
  width: 145px;
}

.col-actions {
  width: 160px;
}

.col-word-count strong {
  color: #172033;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* 新闻标题 */
.news-title-link {
  color: #1761c9;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.72;
  text-decoration: none;
  transition: color 0.15s ease;
}

.news-title-link:hover {
  color: #0c4da2;
  text-decoration: none;
}

.news-title-link::after {
  content: "  ↗";
  color: transparent;
  font-size: 12px;
  transition: color 0.15s ease;
}

.news-title-link:hover::after {
  color: #7a9ac7;
}

.news-title-no-text {
  color: #344054;
  font-size: 15px;
  line-height: 1.72;
}

/* 优先标记 */
.priority-label {
  padding: 5px 11px;
  border: 1px solid #fed7aa;
  color: #c2410c;
  background: #fff7ed;
  box-shadow: 0 1px 2px rgba(194, 65, 12, 0.06);
}

.normal-label {
  color: #98a2b3;
}

/* 排序箭头 */
.sort-buttons {
  gap: 6px;
}

.arrow-button {
  width: 34px;
  height: 34px;
  border-color: #cbdaf1;
  border-radius: 8px;
  color: #2563eb;
  background: #f3f7ff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.arrow-button:hover:not(:disabled) {
  border-color: #2563eb;
  background: linear-gradient(135deg, #3478f6, #1d5ed2);
  box-shadow: 0 5px 11px rgba(37, 99, 235, 0.19);
  transform: translateY(-1px);
}

.arrow-button:disabled {
  border-color: #e6eaf0;
  color: #c0c7d2;
  background: #f8f9fb;
}

/* 编辑和删除 */
.small-action {
  margin: 0 2px;
  padding: 6px 9px;
  border-radius: 6px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.edit-action {
  color: #2563eb;
}

.edit-action:hover {
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}

.delete-action {
  color: #e23b3b;
}

.delete-action:hover {
  color: #b91c1c;
  background: #fff1f1;
  text-decoration: none;
}

.empty-row {
  height: 110px;
  color: #98a2b3;
  background: #fbfcfe;
  font-size: 14px;
}

/* ---------------------------------------------------------
   输入框和表单
   --------------------------------------------------------- */

.form-group > label {
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
}

.form-control {
  height: 44px;
  padding: 9px 12px;
  border-color: #d7dee9;
  border-radius: 9px;
  color: #172033;
  background: #ffffff;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.form-control:hover {
  border-color: #aebbcf;
}

.form-control:focus {
  border-color: #7ba6f7;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.1),
    0 2px 5px rgba(16, 24, 40, 0.035);
}

.checkbox-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
}

/* ---------------------------------------------------------
   弹窗
   --------------------------------------------------------- */

.modal-overlay {
  padding: 32px;
  background: rgba(19, 31, 50, 0.67);
  backdrop-filter: blur(5px);
}

.modal {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow:
    0 30px 90px rgba(15, 28, 48, 0.35),
    0 2px 7px rgba(15, 28, 48, 0.15);
}

.modal-header {
  min-height: 72px;
  padding: 18px 23px;
  background:
    linear-gradient(180deg, #ffffff, #fcfdff);
}

.modal-header h2 {
  color: #1c2940;
  font-size: 20px;
  font-weight: 800;
}

.modal-subtitle {
  margin-top: 6px;
  font-size: 13px;
}

.close-modal {
  width: 37px;
  height: 37px;
  border: 1px solid #e5e9ef;
  border-radius: 9px;
  background: #f7f8fa;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.close-modal:hover {
  color: #b42318;
  background: #fff1f1;
  transform: rotate(3deg);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 23px;
  background: #f8fafc;
}

/* 原文显示 */
.original-meta {
  padding: 13px 16px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #f7f9fc;
}

.original-display {
  padding: 22px;
  border-color: #dce3ed;
  border-radius: 11px;
  color: #27364c;
  background:
    linear-gradient(180deg, #ffffff, #fcfdff);
  font-size: 16px;
  line-height: 1.95;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.035) inset;
}

/* 重新统计区域 */
.recount-box {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #f7f9fc;
}

/* 智能导入提示 */
.import-rule-tip {
  padding: 13px 16px;
  border-color: #bdd3fb;
  border-radius: 10px;
  color: #1849a9;
  background:
    linear-gradient(135deg, #f2f7ff, #eaf3ff);
}

.import-rule-tip code {
  padding: 3px 6px;
  border-radius: 5px;
  background: #dbeafe;
}

.import-textarea {
  min-height: 320px !important;
  padding: 15px;
  line-height: 1.8;
}

.preview-wrapper {
  border-color: #dbe2ec;
  border-radius: 11px;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.035);
}

.preview-table th {
  background: #f6f8fb;
}

.preview-table input {
  height: 38px;
  border-color: #d7dee9;
  border-radius: 7px;
}

/* ---------------------------------------------------------
   删除确认弹窗
   --------------------------------------------------------- */

.delete-warning-icon {
  width: 60px;
  height: 60px;
  background:
    linear-gradient(135deg, #fff1f1, #fee2e2);
  box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.045);
}

.delete-item-title {
  padding: 14px 16px;
  border-radius: 9px;
  background: #f8fafc;
}

/* ---------------------------------------------------------
   登录页面
   --------------------------------------------------------- */

.login-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 22% 18%,
      rgba(96, 165, 250, 0.34),
      transparent 25%
    ),
    radial-gradient(
      circle at 83% 78%,
      rgba(37, 99, 235, 0.3),
      transparent 28%
    ),
    linear-gradient(135deg, #102f52 0%, #164b8a 50%, #1d5fd3 100%);
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.login-page::before {
  width: 460px;
  height: 460px;
  left: -160px;
  top: -190px;
}

.login-page::after {
  width: 600px;
  height: 600px;
  right: -230px;
  bottom: -310px;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 455px;
  padding: 43px 45px 39px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  box-shadow:
    0 30px 90px rgba(5, 20, 43, 0.33),
    0 2px 6px rgba(5, 20, 43, 0.1);
}

.login-logo {
  margin-bottom: 32px;
}

.login-logo h1 {
  color: #174678;
  font-size: 31px;
  font-weight: 850;
}

.login-logo h2 {
  margin-top: 3px;
  color: #244d78;
  font-size: 22px;
}

.login-logo p {
  margin-top: 14px;
  color: #7a8799;
}

.login-button {
  height: 48px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3478f6, #1d5ed2);
  box-shadow: 0 8px 19px rgba(37, 99, 235, 0.24);
}

.login-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #194fac);
  box-shadow: 0 10px 23px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   消息提示和加载动画
   --------------------------------------------------------- */

.toast {
  top: 26px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow:
    0 14px 38px rgba(15, 28, 48, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.11) inset;
  backdrop-filter: blur(7px);
}

.loading-mask {
  background: rgba(18, 30, 49, 0.56);
  backdrop-filter: blur(4px);
}

.loading-card {
  min-width: 275px;
  padding: 20px 25px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
}

/* ---------------------------------------------------------
   较窄电脑屏幕的调整
   --------------------------------------------------------- */

@media (max-width: 1320px) {
  .main-container {
    width: calc(100% - 38px);
  }

  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .topbar-title h1 {
    font-size: 22px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .topbar .button {
    padding-right: 12px;
    padding-left: 12px;
  }

  .search-input {
    width: 310px;
  }

  .col-reporter {
    width: 170px;
  }

  .col-actions {
    width: 145px;
  }
}

/* ---------------------------------------------------------
   打印时关闭视觉阴影
   --------------------------------------------------------- */

@media print {
  body {
    background: #ffffff;
  }

  .news-section,
  .toolbar {
    border-color: #cfd6df;
    box-shadow: none;
  }

  .section-header,
  .section-header.unscheduled {
    background: #455468 !important;
  }
}
/* =========================================================
   弹窗高度自适应修复

   作用：
   1. 弹窗不超过浏览器可视区域；
   2. 标题栏和底部按钮始终完整显示；
   3. 内容过多时，只滚动弹窗中间的表单内容；
   4. 兼容浏览器 100% 缩放和高度较小的电脑屏幕。
   ========================================================= */

/* 弹窗四周保留安全距离 */
.modal-overlay {
  padding: 16px;
}

/* 使用浏览器可视高度限制弹窗 */
.modal {
  max-height: calc(100vh - 32px);
}

/* 新版浏览器优先使用动态可视高度 */
@supports (height: 100dvh) {
  .modal {
    max-height: calc(100dvh - 32px);
  }
}

/* 弹窗标题栏不能被压缩 */
.modal-header {
  flex: 0 0 auto;
}

/*
 * 编辑和手动新增弹窗中的表单必须使用纵向弹性布局。
 * 原来的按钮显示不全，主要就是因为这里缺少可收缩布局。
 */
.item-modal > #itemForm {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 中间表单内容根据剩余高度自动收缩并允许滚动 */
.item-modal > #itemForm > .modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 取消和保存按钮始终固定在弹窗底部 */
.item-modal > #itemForm > .modal-footer {
  flex: 0 0 auto;
}

/* 其他弹窗的底部按钮同样不允许被压缩 */
.modal-footer {
  flex-shrink: 0;
}

/*
 * 对高度较小的电脑屏幕适当压缩上下留白，
 * 给表单内容留出更多空间。
 */
@media (max-height: 800px) {
  .modal-overlay {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
  }

  @supports (height: 100dvh) {
    .modal {
      max-height: calc(100dvh - 20px);
    }
  }
}
/* =========================================================
   主界面信息展示优化
   ========================================================= */

/* 顶部总体统计改为横向分项显示 */
.overall-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.summary-item {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.overall-summary .summary-item strong {
  margin: 0 2px;
}

/* 各项统计之间的细分隔线 */
.summary-divider {
  width: 1px;
  height: 19px;
  flex: 0 0 auto;
  background: #dfe5ee;
}

/*
 * 排序列同时显示“当天序号、上移、下移”。
 * 原来100px宽度不足，因此适当加宽。
 */
.col-sort {
  width: 142px;
}

.sort-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 当天第几条的数字标记 */
.sort-index {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  color: #46566d;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* 编辑和删除按钮增加轻微边框，减少误点 */
.small-action {
  min-height: 32px;
  margin: 0 3px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.edit-action {
  border-color: #d7e5ff;
  background: #f5f8ff;
}

.edit-action:hover {
  border-color: #a9c6fb;
  background: #eaf2ff;
}

.delete-action {
  border-color: #fee2e2;
  background: #fff8f8;
}

.delete-action:hover {
  border-color: #fecaca;
  background: #fff0f0;
}

/* 删除日期列后，操作列可以略微收窄 */
.col-actions {
  width: 150px;
}

/* 较窄电脑屏幕上的轻度调整 */
@media (max-width: 1320px) {
  .col-sort {
    width: 136px;
  }

  .overall-summary {
    gap: 7px;
  }

  .summary-divider {
    height: 17px;
  }
}
/* =========================================================
   快速安排播出日期
   ========================================================= */

/*
 * 待排期稿件包含“安排日期、编辑、删除”三个按钮，
 * 操作列需要保留足够宽度。
 */
.col-actions {
  width: 238px;
  white-space: nowrap;
}

/* “安排日期”按钮 */
.schedule-action {
  border-color: #b9e3d7;
  color: #047857;
  background: #ecfdf7;
  font-weight: 700;
}

.schedule-action:hover {
  border-color: #78c8b2;
  color: #03664b;
  background: #dff8ef;
  box-shadow: 0 3px 10px rgba(4, 120, 87, 0.12);
}

/* 快速安排窗口 */
.quick-schedule-modal {
  width: min(620px, calc(100vw - 40px));
  overflow: hidden;
}

/* 窗口中的表单使用纵向布局 */
.quick-schedule-modal > #quickScheduleForm {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* 标题和说明 */
.quick-schedule-heading {
  min-width: 0;
}

.quick-schedule-heading h2 {
  margin: 0;
}

.quick-schedule-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

/* 窗口内容区域 */
.quick-schedule-modal .modal-body {
  padding: 22px 24px 20px;
}

/* 当前稿件区域 */
.quick-schedule-current {
  margin-bottom: 20px;
}

.quick-schedule-current-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* 当前稿件标题 */
.quick-schedule-item-title {
  min-height: 52px;
  max-height: 82px;
  padding: 12px 14px;
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid #d8e1ee;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  color: #24324a;
  background: #f7f9fc;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

/* 快捷选择区域标题 */
.quick-schedule-section-title {
  margin-bottom: 11px;
}

.quick-schedule-section-title > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.quick-schedule-section-title strong {
  color: var(--text);
  font-size: 14px;
}

.quick-schedule-section-title span {
  color: var(--muted);
  font-size: 12px;
}

/* 今天、明天、后天、大后天 */
.quick-schedule-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* 单个快捷日期按钮 */
.quick-schedule-option {
  min-width: 0;
  min-height: 104px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.quick-schedule-option:hover {
  border-color: #8fb3f4;
  background: #f5f8ff;
  box-shadow:
    0 2px 4px rgba(16, 24, 40, 0.05),
    0 8px 18px rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.quick-schedule-option:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
  border-color: #2563eb;
}

/* “今天”采用更醒目的主色 */
.quick-schedule-option.is-today {
  border-color: #2563eb;
  color: #ffffff;
  background: #2563eb;
  box-shadow:
    0 2px 4px rgba(29, 78, 216, 0.15),
    0 9px 20px rgba(37, 99, 235, 0.2);
}

.quick-schedule-option.is-today:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  box-shadow:
    0 3px 6px rgba(29, 78, 216, 0.18),
    0 12px 24px rgba(37, 99, 235, 0.24);
}

/* 快捷日期内部文字 */
.quick-schedule-option-name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.quick-schedule-option-date {
  display: block;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.quick-schedule-option-summary {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.quick-schedule-option.is-today
.quick-schedule-option-date {
  color: rgba(255, 255, 255, 0.94);
}

.quick-schedule-option.is-today
.quick-schedule-option-summary {
  color: rgba(255, 255, 255, 0.78);
}

/* 保存过程中避免重复点击 */
#quickScheduleForm[aria-busy="true"]
.quick-schedule-options {
  opacity: 0.68;
}

.quick-schedule-option:disabled {
  cursor: wait;
  transform: none;
}

/* “或者”分隔线 */
.quick-schedule-divider {
  margin: 20px 0 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--light-muted);
  font-size: 12px;
}

.quick-schedule-divider::before,
.quick-schedule-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--light-border);
}

/* 选择其他日期 */
.quick-schedule-other label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.quick-schedule-other-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

#quickScheduleDate {
  min-height: 42px;
}

#confirmQuickScheduleButton {
  min-width: 148px;
  min-height: 42px;
}

/* 窗口底部 */
.quick-schedule-footer {
  min-height: 66px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--light-border);
  background: #f8fafc;
}

.quick-schedule-footer > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.quick-schedule-footer .button {
  flex: 0 0 auto;
}

/* 较窄电脑屏幕上的轻度调整 */
@media (max-width: 1320px) {
  .col-actions {
    width: 226px;
  }

  .small-action {
    margin-left: 2px;
    margin-right: 2px;
    padding-left: 8px;
    padding-right: 8px;
  }
}
/* =========================================================
   已播稿件：删除指定日期的整组稿件
   ========================================================= */

/*
 * 日期标题右侧的操作按钮容器。
 *
 * “复制当天编排”和“删除整组”并列显示，
 * 与左侧的篇数、字数统计保持适当距离。
 */
.date-group-actions {
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/*
 * 按钮放入统一容器后，
 * 不再单独使用原来复制按钮的左外边距。
 */
.date-group-actions .copy-button {
  margin-left: 0;
}

/*
 * “删除整组”按钮。
 *
 * 默认使用清晰的浅红色警示样式，
 * 与白色的复制按钮形成明显区别，
 * 但不会在整个页面中过分刺眼。
 */
.group-delete-button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(254, 202, 202, 0.96);
  border-radius: 9px;
  color: #b42318;
  background: rgba(255, 247, 247, 0.97);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow:
    0 4px 12px rgba(127, 29, 29, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.group-delete-button:hover:not(:disabled) {
  border-color: #fca5a5;
  color: #ffffff;
  background: #dc2626;
  box-shadow:
    0 7px 17px rgba(153, 27, 27, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
  transform: translateY(-1px);
}

.group-delete-button:focus-visible {
  outline: 3px solid rgba(220, 38, 38, 0.24);
  outline-offset: 2px;
  border-color: #dc2626;
}

.group-delete-button:active:not(:disabled) {
  background: #b91c1c;
  box-shadow:
    0 2px 6px rgba(127, 29, 29, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transform: translateY(0);
}

/* ---------------------------------------------------------
   删除整组确认窗口
   --------------------------------------------------------- */

.delete-group-modal {
  width: min(540px, calc(100vw - 40px));
  overflow: hidden;
}

/*
 * 整组删除的警告图标稍大，
 * 强调这是一次会影响多篇稿件的操作。
 */
.delete-group-warning-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  border-radius: 50%;
  color: #b91c1c;
  background:
    radial-gradient(
      circle at 35% 30%,
      #ffffff 0,
      #fff1f2 48%,
      #fee2e2 100%
    );
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 5px 15px rgba(185, 28, 28, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/*
 * 日期和整组统计信息。
 */
.delete-group-summary {
  margin: 17px 0 15px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid #dbe4ef;
  border-left: 4px solid #dc2626;
  border-radius: 9px;
  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f8fafc 100%
    );
  text-align: left;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 5px 14px rgba(35, 55, 80, 0.05);
}

.delete-group-summary strong {
  color: #172033;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.delete-group-summary span {
  color: #526174;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

/*
 * 强调：搜索状态下删除的仍然是整个日期，
 * 而不是屏幕上暂时显示出来的几篇稿件。
 */
.delete-group-danger-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  line-height: 1.65;
  text-align: left;
}

.delete-group-danger-note strong {
  flex: 0 0 auto;
  color: #c2410c;
  font-weight: 800;
}

.delete-group-danger-note span {
  min-width: 0;
}

/*
 * 让最终确认按钮更容易识别，
 * 同时保留与网站现有危险按钮一致的风格。
 */
#confirmDeleteDateGroupButton {
  min-width: 178px;
  font-weight: 750;
}

#confirmDeleteDateGroupButton:disabled {
  cursor: wait;
}

/* 删除整组前展示完整标题，便于最后核对。 */
.delete-group-items {
  margin: 0 0 14px;
  padding: 13px 15px;
  border: 1px solid var(--light-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-secondary);
  text-align: left;
}

.delete-group-items strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.delete-group-items ol {
  max-height: 168px;
  margin: 0;
  padding-left: 24px;
  overflow-y: auto;
}

.delete-group-items li {
  padding: 3px 0;
  line-height: 1.45;
}

/* 导入预览中需要补充标题的稿件。 */
.preview-row-invalid td {
  background: #fff7f7;
}

.preview-row-invalid input[data-preview-field="title"] {
  border-color: var(--danger);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------
   较窄电脑屏幕上的适度调整
   --------------------------------------------------------- */

@media (max-width: 1450px) {
  .section-meta {
    gap: 7px;
  }

  .stat-badge {
    min-width: 105px;
    padding-left: 11px;
    padding-right: 11px;
  }

  .date-group-actions {
    gap: 6px;
  }

  .date-group-actions .copy-button,
  .group-delete-button {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 1260px) {
  .date-group-actions .copy-button,
  .group-delete-button {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }
}

/* ---------------------------------------------------------
   工作台界面精修
   只调整视觉层级，不改变业务功能。
   --------------------------------------------------------- */

:root {
  --background: #eef2f7;
  --border: #d7e0eb;
  --light-border: #e8edf3;
  --text: #18283d;
  --text-secondary: #42536a;
  --muted: #6b7a90;
  --modern-shadow:
    0 1px 2px rgba(20, 36, 58, 0.04),
    0 5px 16px rgba(20, 36, 58, 0.055);
  --modern-shadow-hover:
    0 2px 4px rgba(20, 36, 58, 0.05),
    0 10px 24px rgba(20, 36, 58, 0.085);
}

body {
  background: #eef2f7;
  font-size: 14px;
}

.topbar {
  min-height: 76px;
  padding: 11px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(106deg, #173f6d 0%, #1b579b 62%, #205eb1 100%);
  box-shadow: 0 5px 16px rgba(16, 45, 79, 0.14);
}

.topbar::after,
.section-header::after {
  display: none;
}

.topbar-title h1 {
  margin-bottom: 4px;
  font-size: 22px;
  letter-spacing: 0;
}

.topbar-title span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.topbar-actions {
  gap: 7px;
}

.button-top,
.topbar .button-warning {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 7px;
  box-shadow: none;
}

.button-top {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.09);
}

.topbar .button-warning {
  border-color: rgba(255, 255, 255, 0.2);
  background: #168b83;
  box-shadow: 0 3px 8px rgba(4, 88, 83, 0.2);
}

.topbar .button-warning:hover:not(:disabled) {
  background: #11766f;
  box-shadow: 0 5px 12px rgba(4, 88, 83, 0.26);
}

.main-container {
  width: calc(100% - 48px);
  margin-top: 20px;
}

.toolbar {
  min-height: 62px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-color: #d9e1eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--modern-shadow);
}

.toolbar-left {
  gap: 7px;
}

.search-input {
  width: 330px;
  height: 38px;
  border-radius: 7px;
  background: #fbfcfe;
}

.toolbar-left::before {
  left: 12px;
  font-size: 19px;
}

.toolbar .button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 7px;
}

.overall-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 7px 11px;
  border: 1px solid #e6ebf2;
  border-radius: 7px;
  color: #65748a;
  background: #f8fafc;
  font-size: 13px;
}

.overall-summary strong {
  margin: 0 2px;
  color: #1d5da8;
  font-size: 18px;
}

.summary-divider {
  height: 14px;
  margin: 0 8px;
  border-left-color: #d8e0ea;
}

.news-section {
  margin-bottom: 18px;
  border-color: #d8e1eb;
  border-radius: 10px;
  box-shadow: var(--modern-shadow);
}

.news-section:hover {
  box-shadow: var(--modern-shadow-hover);
}

.section-header,
.section-header.unscheduled {
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 0;
  background: #30435d;
}

.section-header:not(.unscheduled) {
  background: #275783;
}

.section-title {
  gap: 10px;
}

.section-title h2 {
  font-size: 17px;
  letter-spacing: 0;
}

.weekday {
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
}

.section-meta {
  gap: 6px;
}

.stat-badge {
  min-width: 82px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  font-size: 12px;
}

.stat-badge strong {
  font-size: 18px;
}

.copy-button,
.group-delete-button {
  min-height: 36px;
  margin-left: 2px;
  padding: 7px 12px;
  border-radius: 6px;
  box-shadow: none;
}

.copy-button:hover:not(:disabled),
.group-delete-button:hover:not(:disabled) {
  box-shadow: 0 4px 10px rgba(15, 42, 75, 0.14);
}

table {
  font-size: 14px;
}

th {
  height: 40px;
  padding: 10px 12px;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
}

td {
  height: 52px;
  padding: 10px 12px;
}

.col-sort {
  width: 78px;
}

.col-word-count {
  width: 100px;
}

.col-reporter {
  width: 170px;
}

.col-priority {
  width: 92px;
}

.col-actions {
  width: 168px;
  white-space: nowrap;
}

.col-word-count strong {
  font-size: 15px;
}

.news-title-link,
.news-title-no-text {
  font-size: 14px;
  line-height: 1.55;
}

.news-title-link {
  color: #1259ad;
  font-weight: 700;
}

.news-title-link:hover {
  color: #0b4387;
}

.priority-label {
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: none;
  font-size: 12px;
}

.normal-label {
  color: #a0acbb;
  font-size: 12px;
}

.sort-buttons {
  gap: 4px;
}

.arrow-button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.small-action {
  margin: 0 1px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.schedule-action {
  color: #08786b;
  background: #effaf7;
}

.schedule-action:hover {
  color: #056257;
  background: #dff6ef;
}

.edit-action {
  color: #205fb1;
  background: #f1f6ff;
}

.delete-action {
  color: #b94747;
  background: transparent;
}

.delete-action:hover {
  color: #a32929;
  background: #fff1f1;
}

.empty-row {
  height: 92px;
  font-size: 13px;
}

@media (max-width: 1260px) {
  .topbar {
    padding-left: 22px;
    padding-right: 22px;
  }

  .main-container {
    width: calc(100% - 36px);
  }

  .search-input {
    width: 300px;
  }

  .col-reporter {
    width: 145px;
  }
}

/* ---------------------------------------------------------
   工作台界面精修 02
   恢复关键信息的阅读尺度，保持功能和结构不变。
   --------------------------------------------------------- */

.topbar-actions {
  gap: 9px;
}

.topbar-actions .button-top:last-child {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.055);
}

.toolbar {
  min-height: 70px;
  padding: 12px 14px;
}

.search-input {
  width: 360px;
  height: 42px;
  font-size: 14px;
}

.toolbar .button {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 13px;
}

.overall-summary {
  gap: 3px;
  padding: 8px 12px;
}

.overall-summary strong {
  font-size: 19px;
}

.section-header,
.section-header.unscheduled {
  min-height: 62px;
  padding: 11px 16px;
}

.section-title h2 {
  font-size: 18px;
}

.stat-badge {
  min-width: 88px;
  padding: 7px 11px;
  font-size: 13px;
}

.stat-badge strong {
  font-size: 19px;
}

th {
  height: 44px;
  padding: 11px 12px;
  font-size: 13px;
}

td {
  height: 58px;
  padding: 12px 12px;
}

.col-reporter {
  width: 150px;
}

.news-title-link,
.news-title-no-text {
  font-size: 15px;
  line-height: 1.6;
}

.col-word-count strong {
  font-size: 16px;
}

.normal-label {
  color: #718096;
  font-size: 13px;
}

.small-action {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 13px;
}

@media (max-width: 1260px) {
  .search-input {
    width: 330px;
  }
}

/* ---------------------------------------------------------
   窄桌面视口：保证稿件行内操作完整可见
   --------------------------------------------------------- */

@media (max-width: 1400px) {
  .news-section {
    overflow: visible;
  }

  .news-section table {
    width: 100%;
    table-layout: fixed;
  }

  .news-section th,
  .news-section td {
    padding-left: 6px;
    padding-right: 6px;
  }

  .news-section .col-sort {
    width: 46px !important;
  }

  .news-section .col-word-count {
    width: 68px !important;
  }

  .news-section .col-reporter {
    width: 102px !important;
  }

  .news-section .col-priority {
    width: 58px !important;
  }

  /* 三个按钮的确定宽度合计约 145px，避免固定布局把操作列压窄。 */
  .news-section .col-actions {
    width: 172px !important;
    min-width: 172px !important;
    padding-left: 3px;
    padding-right: 3px;
    overflow: visible !important;
    white-space: nowrap;
  }

  .news-section .col-actions .small-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    height: 30px;
    margin: 0 1px;
    padding: 4px 4px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
}

/* 操作列及其内容不允许被表格或区块边界裁掉。 */
.news-section .col-actions {
  box-sizing: border-box;
  overflow: visible;
}

.news-section .col-actions .small-action {
  white-space: nowrap;
}

/* 全屏窄桌面下，操作列按实际可用宽度排布，避免最后一个按钮被裁切。 */
@media (max-width: 1400px) {
  /*
   * index.html 将视口设为 1200px，表格使用 fixed layout。
   * 动态模板中三个按钮之间还有换行空白文本，因此操作列必须按
   * 实际可用宽度计算，不能只相加按钮声明宽度。
   */
  .news-section .col-actions {
    width: 150px !important;
    min-width: 150px !important;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    /* 动态模板中的换行缩进会产生行内空白，不能占用按钮宽度。 */
    font-size: 0;
  }

  /* 新闻列表整体居中，并将标题列压缩到原有可用空间的约三分之二。 */
  .news-section table {
    width: 92%;
    margin-left: auto;
    margin-right: auto;
  }

  .news-section table th:nth-child(3),
  .news-section table td:nth-child(3) {
    width: 40% !important;
  }

  .news-section .col-actions .schedule-action {
    width: 44px;
  }

  .news-section .col-actions .edit-action,
  .news-section .col-actions .delete-action {
    width: 22px;
  }

  .news-section .col-actions .small-action {
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    text-overflow: clip;
    font-size: 11px;
    vertical-align: middle;
  }
}

/* FINAL TABLE LAYOUT OVERRIDE */
@media (max-width: 1400px) {
  .news-section {
    overflow: visible !important;
  }

  .news-section table {
    width: 96% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    table-layout: fixed !important;
  }

  .news-section table th,
  .news-section table td {
    box-sizing: border-box !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .news-section table th:nth-child(1),
  .news-section table td:nth-child(1) { width: 6% !important; }
  .news-section table th:nth-child(2),
  .news-section table td:nth-child(2) { width: 8% !important; }
  .news-section table th:nth-child(3),
  .news-section table td:nth-child(3) { width: 38% !important; }
  .news-section table th:nth-child(4),
  .news-section table td:nth-child(4) { width: 15% !important; }
  .news-section table th:nth-child(5),
  .news-section table td:nth-child(5) { width: 9% !important; }
  .news-section table th:nth-child(6),
  .news-section table td:nth-child(6) {
    width: 24% !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .news-section .col-actions .small-action {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    height: 30px !important;
    margin: 0 2px !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }
}

/* =========================================================
   操作安全性与状态提示（后加，覆盖前面的同名规则）
   ========================================================= */

/* ---------------------------------------------------------
   一、顶部：本次登录的剩余时间
   每次手动登录满 5 小时后网站会自动退出登录。
   --------------------------------------------------------- */

#sessionRemainingText {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.26);
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

/* 这一行不需要左侧的绿色圆点，避免和管理员邮箱混淆。 */
#sessionRemainingText::before {
  display: none;
}

/* 没有内容时完全不占位，避免出现孤立的分隔线。 */
#sessionRemainingText:empty {
  display: none;
}

/* 剩余不足 30 分钟时改为醒目的提示色。 */
#sessionRemainingText.session-remaining-warning {
  color: #fde68a;
  font-weight: 750;
}

/* ---------------------------------------------------------
   二、日期组头：把「删除整组」与「复制当天编排」拉开距离
   删除整组是不可恢复的操作，不能紧贴常用按钮。
   --------------------------------------------------------- */

.date-group-actions {
  gap: 18px;
}

.date-group-actions .group-delete-button {
  /* 与复制按钮之间合计约 28px 间距。 */
  margin-left: 10px;
}

/* ---------------------------------------------------------
   三、优先播出稿件：加强整行的视觉区分
   只靠中间一列的文字提示，快速扫表时容易看漏。
   --------------------------------------------------------- */

tbody tr.priority-row {
  box-shadow: 6px 0 0 #f59e0b inset;
}

.priority-label {
  padding: 3px 9px;
  border: 1px solid #fca5a5;
  border-radius: 999px;
  color: #b42318;
  background: #fee4e2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* 非优先稿件保持低调，让「优先」标签更突出。 */
.normal-label {
  color: #a8b3c1;
  font-size: 12px;
}
