/* ============================================================
   周报收集与汇总系统 —— 共享样式
   零依赖、零构建。
   设计规范：依据《鲁信环境VI视觉识别系统》
     企业标准色  #003591（深蓝）      企业辅助色 #C9965F（金棕）
     辅助色      #BD1A21 红 / #80B051 绿 / #9E4B98 紫（仅作功能色参考）
     企业字体    阿里巴巴普惠体（已安装时优先，缺失回退系统字体）
   风格取向：腾讯系扁平——大量留白、浅色底、圆角卡片、轻阴影、无重边框
   ============================================================ */

:root {
  /* —— 品牌色（VI 标准色）—— */
  --brand: #003591;
  --brand-dark: #002870;
  --brand-bright: #1156c9;
  --brand-soft: #e9effb;
  --brand-line: #ccd9f2;
  --accent: #c9965f;          /* VI 金棕，用于点缀与强调 */
  --accent-soft: #f8f1e7;

  --ink: #1c2330;
  --ink-2: #4e586b;
  --ink-3: #8a93a6;

  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #e8ecf3;
  --line-strong: #d4dae6;

  --danger: #bd1a21;          /* VI 辅助红 */
  --danger-soft: #fdeded;
  --warn: #a9772f;
  --warn-soft: #faf3e6;
  --ok: #3f7a2e;              /* VI 辅助绿加深，保证对比度 */
  --ok-soft: #eef6e8;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(28, 41, 90, .04), 0 6px 20px rgba(28, 41, 90, .06);
  --shadow-lg: 0 2px 8px rgba(28, 41, 90, .06), 0 16px 44px rgba(28, 41, 90, .10);

  --font: "Alibaba PuHuiTi 3.0", "Alibaba PuHuiTi 2.0", "Alibaba PuHuiTi",
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6f9bf0;
    --brand-dark: #8fb4f5;
    --brand-bright: #5c8ce8;
    --brand-soft: #14213d;
    --brand-line: #27406e;
    --accent: #d8ab77;
    --accent-soft: #2b2318;

    --ink: #e9edf5;
    --ink-2: #b8c1d4;
    --ink-3: #7e889e;

    --bg: #10131a;
    --surface: #181c26;
    --surface-2: #1e2330;
    --line: #282f3f;
    --line-strong: #3a4356;

    --danger: #f08a8e;
    --danger-soft: #301b1d;
    --warn: #d8ab77;
    --warn-soft: #2b2418;
    --ok: #8cc36f;
    --ok-soft: #17250f;

    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .3);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, .4), 0 16px 44px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 布局 ---------------- */

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.brand .txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand .txt b { font-size: 15px; letter-spacing: .2px; }
.brand .txt i { font-style: normal; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.brand .dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.spacer { flex: 1; }
.nav-link { color: var(--ink-2); font-size: 14px; padding: 7px 13px; border-radius: 8px; transition: background .12s, color .12s; }
.nav-link:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-link.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

footer.site-footer {
  margin-top: 56px;
  padding: 26px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}

/* ---------------- 通用组件 ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card + .card { margin-top: 16px; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 10px; }
h1 { font-size: 25px; font-weight: 700; letter-spacing: -.2px; }
h2 { font-size: 18px; font-weight: 700; position: relative; padding-left: 11px; }
h2::before {
  content: ""; position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 3.5px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-bright));
}
h3 { font-size: 15px; font-weight: 700; }

.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s, transform .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 53, 145, .22);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #b5854f; border-color: #b5854f; }
.btn-danger { color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-tight { display: flex; gap: 8px; align-items: center; }

label.field { display: block; margin-bottom: 14px; }
label.field > .lbl {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}

input[type=text], input[type=password], input[type=date],
input[type=datetime-local], input[type=number], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 9px 12px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .75; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.alert {
  padding: 11px 14px; border-radius: var(--radius);
  font-size: 13.5px; margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

.hr { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th, table.tbl td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.tbl th { font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
table.tbl th:first-child { border-radius: 8px 0 0 0; }
table.tbl th:last-child { border-radius: 0 8px 0 0; }

.empty {
  padding: 30px 16px; text-align: center;
  color: var(--ink-3); font-size: 14px;
}

/* ---------------- 门户首页 ---------------- */

/* 深蓝 hero：VI 标准色渐变 + 流线装饰（呼应 VI 象征图形的曲线语言） */
.hero {
  position: relative;
  margin: 0 0 26px;
  padding: 58px 0 62px;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(201, 150, 95, .28), transparent 60%),
    radial-gradient(900px 460px at -10% 110%, rgba(17, 86, 201, .55), transparent 62%),
    linear-gradient(135deg, #002870 0%, #003591 48%, #0a4bb8 100%);
  color: #fff;
  overflow: hidden;
}
.hero .deco { position: absolute; inset: 0; pointer-events: none; }
.hero .deco svg { position: absolute; width: 100%; height: 100%; }
.hero-inner { position: relative; }
.hero .hero-logo { height: 52px; width: auto; display: block; margin-bottom: 22px; opacity: .96; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 2px;
  color: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 16px;
}
.hero h1 { font-size: 34px; letter-spacing: 1px; margin: 0 0 12px; }
.hero h1 b { color: var(--accent); font-weight: 700; }
.hero p.lead {
  font-size: 15.5px; color: rgba(255, 255, 255, .85);
  max-width: 640px; margin: 0 0 26px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-hero {
  background: #fff; color: var(--brand); border-color: #fff;
  font-weight: 700; padding: 11px 26px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.hero .btn-hero:hover { background: #eef3fd; border-color: #eef3fd; text-decoration: none; }
.hero .btn-hero-ghost {
  background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55);
  padding: 11px 26px; border-radius: 10px; font-weight: 600;
}
.hero .btn-hero-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; text-decoration: none; }

/* 周期状态条：贴在 hero 下沿的悬浮卡 */
.period-float {
  margin-top: -46px;
  position: relative;
  z-index: 5;
}
.period-float .card { padding: 18px 22px; }

.entry-grid {
  display: grid; gap: 16px; margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.entry {
  display: block; padding: 26px 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.entry:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-lg); border-color: var(--brand-line);
}
.entry .ic {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-bright));
  color: #fff;
  display: grid; place-items: center; margin-bottom: 15px;
  box-shadow: 0 6px 16px rgba(0, 53, 145, .25);
}
.entry h3 { font-size: 16.5px; margin-bottom: 6px; }
.entry p { margin: 0; font-size: 13.5px; color: var(--ink-3); }

.flow { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 8px; }
.flow .step { position: relative; padding-left: 38px; }
.flow .step .n {
  position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
}
.flow .step strong { display: block; font-size: 14px; margin-bottom: 3px; }
.flow .step span { font-size: 13px; color: var(--ink-3); }

.countdown { font-variant-numeric: tabular-nums; font-weight: 700; }

/* 五个方面速览小卡 */
.cat-chip {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2);
}
.cat-chip .t { font-size: 13.5px; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 7px; }
.cat-chip .t::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ---------------- 提交页 ---------------- */

.section-block { margin-top: 24px; }
.section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0 10px; border-bottom: 2px solid var(--brand-line);
  margin-bottom: 16px;
}
.section-head .tag {
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-bright));
  padding: 3px 10px; border-radius: 6px;
}
.section-head h2 { margin: 0; font-size: 17px; }

.q { margin-bottom: 18px; }
.q .q-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.q .q-no { font-size: 12px; font-weight: 700; color: var(--brand); flex: none; }
.q .q-name { font-size: 14px; font-weight: 700; }
.q .q-hint { font-size: 12.5px; color: var(--ink-3); display: block; margin-bottom: 6px; }
.q .q-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; display: flex; justify-content: space-between; }
.q.filled .q-no { color: var(--ok); }
.q.filled textarea { border-color: var(--ok); }

.progress-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-bright)); width: 0; transition: width .25s; }

.sticky-actions {
  position: sticky; bottom: 0; z-index: 15;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  margin: 24px -20px -0; padding: 13px 20px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -4px 16px rgba(28, 41, 90, .07);
}

/* ---------------- 后台 ---------------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab {
  appearance: none; border: 0; background: transparent; font: inherit; font-size: 14px;
  font-weight: 600; color: var(--ink-3); padding: 10px 15px; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.page-head { display: flex; align-items: center; gap: 14px; margin: 24px 0 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

/* 覆盖度矩阵 */
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.matrix th { background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-size: 12.5px; }
.matrix td.num { text-align: center; font-variant-numeric: tabular-nums; width: 62px; }
.matrix td.num.zero { color: var(--ink-3); background: var(--surface-2); }
.matrix td.num.has { color: var(--ok); font-weight: 700; background: var(--ok-soft); }

/* 周报预览：模仿 A4 纸张 */
.paper {
  background: #fff; color: #1f2329;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 42px 46px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-serif);
  max-width: 760px;
  margin: 0 auto;
}
.paper .p-title { font-family: "方正小标宋简体", var(--font-serif); font-size: 22pt; text-align: center; margin: 0 0 6px; letter-spacing: 1px; }
.paper .p-sub { font-size: 16pt; text-align: center; margin: 0 0 4px; }
.paper .p-h { font-family: "Microsoft YaHei", var(--font); font-size: 16pt; font-weight: 700; color: #1f2329; margin: 18px 0 8px; text-indent: 2em; }
.paper .p-body { font-size: 16pt; line-height: 1.6; text-indent: 2em; margin: 0 0 2px; }
.paper .p-note { font-size: 16pt; font-weight: 700; text-indent: 2em; margin-top: 16px; }
.paper .p-body .item {
  cursor: default; border-radius: 3px; padding: 1px 2px; margin: 0 -2px;
  transition: background .12s;
}
.paper.editable .p-body .item:hover { background: #fff8d8; }
.paper .p-body .item.dropped { text-decoration: line-through; opacity: .45; }
.paper-tools { font-family: var(--font); }

/* 登录卡 */
.login-card { max-width: 420px; margin: 60px auto; }
.login-card .login-brand { text-align: center; margin-bottom: 18px; }
.login-card .login-brand img { height: 44px; width: auto; }

@media (max-width: 640px) {
  .paper { padding: 24px 20px; }
  .paper .p-title { font-size: 19pt; }
  .paper .p-h, .paper .p-body, .paper .p-note { font-size: 14pt; }
  .wrap, .wrap-narrow { padding: 0 14px; }
  .sticky-actions { margin: 20px -14px 0; padding: 12px 14px; }
  h1 { font-size: 22px; }
  .hero { padding: 42px 0 54px; }
  .hero h1 { font-size: 26px; }
  .hero .hero-logo { height: 42px; }
  .brand .txt i { display: none; }
  .period-float { margin-top: -38px; }
}

@media print {
  .site-header, .site-footer, .no-print, .paper-tools, .tabs, .page-head .btn { display: none !important; }
  .paper { box-shadow: none; border: 0; max-width: none; padding: 0; }
  body { background: #fff; }
}
