/* 知时 · 日常提醒 — 「纸面墨水」主题：米白纸面 / 墨蓝主色 / 琥珀强调 / 顶部导航 / 衬线标题 */
:root {
  --brand: #1f3a5f;
  --brand-dark: #16293f;
  --brand-soft: #eef2f7;
  --accent: #b45309;
  --accent-soft: #fdf3e7;
  --bg: #f7f5f0;
  --surface: #fffdf8;
  --text: #23282e;
  --muted: #7a7468;
  --line: #e3ded2;
  --success: #2f6b3c;
  --warning: #b45309;
  --danger: #a93226;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 6px 20px rgba(60, 52, 34, .07);
  --shadow-hover: 0 10px 26px rgba(31, 58, 95, .13);
  --serif: "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-width: 1080px;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ============ 顶部导航骨架（知时唯一无侧栏形态） ============ */
.app-shell.shell-topnav { display: flex; flex-direction: column; min-height: 100vh; }
.app-topnav {
  position: sticky; top: 0; z-index: 20;
  height: 64px; flex: 0 0 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 #fff inset, var(--shadow);
  display: flex; align-items: center; gap: 34px;
  padding: 0 36px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 8px;
  background: var(--brand);
  color: #f5efdf;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 20px; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(245, 239, 223, .35), 0 4px 10px rgba(31, 58, 95, .28);
}
.brand-title { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 2px; color: var(--brand-dark); }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: 2.5px; }
.topnav-nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.topnav-link {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  border-radius: 8px;
  color: #55606b; font-size: 14px;
  position: relative;
  transition: color .16s ease, background .16s ease;
}
.topnav-link i { font-size: 15px; }
.topnav-link:hover { color: var(--brand-dark); background: var(--brand-soft); }
.topnav-link.is-active { color: var(--brand-dark); font-weight: 650; background: transparent; }
.topnav-link.is-active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -13px;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.topnav-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; flex: 0 0 auto; }
.topnav-user { font-weight: 600; color: var(--text); }

.app-content { flex: 1; padding: 26px 0 52px; overflow-y: auto; }
.page-inner { max-width: 1240px; margin: 0 auto; padding: 0 36px; }
.page-strip {
  display: flex; align-items: center;
  margin-bottom: 20px;
}
.page-strip-title {
  font-family: var(--serif);
  font-size: 14px; letter-spacing: 3px;
  color: var(--muted);
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

/* ============ 撕页日历 ============ */
.day-hero { display: flex; align-items: center; gap: 34px; margin-bottom: 22px; }
.paper-cal {
  position: relative;
  width: 148px; flex: 0 0 148px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  box-shadow: var(--shadow);
  padding: 14px 0 18px;
  text-align: center;
}
.paper-cal::before {
  content: '';
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 16px;
  background: linear-gradient(180deg, #d97706, #b45309);
  border-radius: 0 0 4px 4px;
}
.paper-cal .pc-rings {
  position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 22px;
}
.paper-cal .pc-rings i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid #8a6a2f;
}
.paper-cal::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background:
    linear-gradient(-45deg, transparent 6px, var(--surface) 0) 0 0 / 12px 8px repeat-x,
    linear-gradient(45deg, transparent 6px, var(--surface) 0) 0 0 / 12px 8px repeat-x;
}
.pc-month { font-size: 12px; letter-spacing: 4px; color: var(--accent); margin-top: 10px; }
.pc-day {
  font-family: var(--serif);
  font-size: 52px; font-weight: 800; line-height: 1.15;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}
.pc-week { font-size: 12px; color: var(--muted); letter-spacing: 3px; }
.day-hero-text { flex: 1; min-width: 0; }
.day-hero-title {
  font-family: var(--serif);
  font-size: 24px; font-weight: 750; letter-spacing: 1px;
}
.day-hero-sub { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.8; }

/* ============ 页面通用 ============ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title { font-family: var(--serif); font-size: 23px; font-weight: 750; letter-spacing: 1px; }
.page-desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; margin-bottom: 20px;
}
.card.tight { padding: 18px 20px; }
.card-title { font-family: var(--serif); font-size: 15.5px; font-weight: 700; margin-bottom: 4px; letter-spacing: .5px; }
.card-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.section-title { font-family: var(--serif); font-size: 15.5px; font-weight: 700; margin: 4px 0 16px; display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.section-title::before {
  content: '';
  width: 9px; height: 9px; border-radius: 50%;
  background: transparent;
  border: 2.5px solid var(--accent);
}

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 28px; font-weight: 750; margin-top: 12px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat-accent { color: var(--brand); }
.stat-success { color: var(--success); }
.stat-warn { color: var(--warning); }
.stat-danger { color: var(--danger); }

/* ============ 工具类 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-spacer { flex: 1; }
.muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.gap-10 { gap: 10px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }
.pager { display: flex; justify-content: flex-end; margin-top: 18px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty::before { content: '❏'; display: block; font-size: 20px; color: #c9bfa8; margin-bottom: 8px; }
.chart-box { height: 320px; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; }
.form-grid .span-2 { grid-column: span 2; }

.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hover-card { transition: transform .18s ease, box-shadow .18s ease; cursor: pointer; }
.hover-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

code { font-family: Consolas, Monaco, monospace; font-size: 12.5px; background: #f1ede2; color: var(--brand-dark); padding: 2px 6px; border-radius: 5px; border: 1px dashed #d8d0bd; }

/* ============ 通知时间轴 / 配置行 ============ */
.timeline { padding-left: 4px; }
.timeline-item { position: relative; padding: 10px 0 14px 22px; margin-left: 6px; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute; left: -5px; top: 15px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.timeline-item:first-child .timeline-dot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.config-line { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.config-line span { color: var(--muted); }

/* ============ 表格 / 徽标 / 按钮 ============ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  letter-spacing: 1px;
}
.data-table td { padding: 12px; border-bottom: 1px dashed #e7e2d6; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f4f1e9; }
.data-table .note-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; line-height: 1.4; border: 1px solid transparent; white-space: nowrap;
}
.badge.b-primary { color: var(--brand-dark); background: var(--brand-soft); border-color: #cfd9e5; }
.badge.b-success { color: var(--success); background: #ecf3ec; border-color: #cfe0cf; }
.badge.b-info { color: #5d5f66; background: #f0efe9; border-color: #ddd9cb; }
.badge.b-warning { color: var(--accent); background: var(--accent-soft); border-color: #ecd3b0; }
.badge.b-danger { color: var(--danger); background: #f9ece9; border-color: #eccfc8; }

.link-btn { color: var(--brand); font-size: 13px; cursor: pointer; }
.link-btn.success { color: var(--success); }
.link-btn.warning { color: var(--warning); }
.link-btn.danger { color: var(--danger); }
.link-btn:hover { opacity: .8; }

/* layui 控件配色对齐墨蓝 */
.layui-btn { background-color: var(--brand); border-radius: var(--radius-sm); }
.layui-btn:hover { background-color: var(--brand-dark); opacity: 1; }
.layui-btn-primary { background: transparent; color: var(--text); border-color: #cfc9b8; }
.layui-btn-primary:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.layui-btn-normal { background-color: var(--accent); }
.layui-btn-danger { background-color: var(--danger); }
.layui-btn-warm { background-color: var(--warning); }
input.layui-input, select.layui-input, textarea.layui-textarea { border-radius: var(--radius-sm); background: #fffef9; }
input.layui-input:focus, select.layui-input:focus, textarea.layui-textarea:focus { border-color: var(--brand) !important; box-shadow: 0 0 0 3px rgba(31, 58, 95, .1); }
.layui-form-radio > i:hover, .layui-form-radioed > i { color: var(--brand) !important; }
.layui-form-checkbox[lay-skin="primary"] > i:hover, .layui-form-checked[lay-skin="primary"] > i { background-color: var(--brand) !important; border-color: var(--brand) !important; }
.layui-form-switch { border-radius: 999px; }
.layui-form-onswitch { background-color: var(--brand) !important; border-color: var(--brand) !important; }
.layui-laypage .layui-laypage-curr .layui-laypage-em { background-color: var(--brand) !important; border-radius: 6px; }
.layui-laypage a, .layui-laypage span { border-radius: 6px; margin: 0 3px; }
.layui-layer-btn0 { background-color: var(--brand) !important; border-color: var(--brand) !important; border-radius: 6px !important; }
.layui-layer-title { border-radius: 10px 10px 0 0 !important; font-family: var(--serif); letter-spacing: 1px; }
.layui-layer { border-radius: 10px !important; }

@media (max-width: 1180px) {
  .grid-cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ 登录/注册（纸面墨水主题） ============ */
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--bg);
}
.auth-visual {
  background: linear-gradient(160deg, #16293f 0%, #1f3a5f 55%, #3c5a86 130%);
  color: #f5efdf; padding: 64px 68px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual .brand-mark { background: #f5efdf; color: var(--brand-dark); box-shadow: none; }
.auth-panel { display: grid; place-items: center; padding: 48px; background: linear-gradient(180deg, #fffdf8, #f7f5f0); }
.auth-card { width: 400px; }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.auth-field .layui-input { height: 46px; border-radius: var(--radius-sm); }
.auth-submit { height: 46px; border-radius: var(--radius-sm); font-size: 15px; letter-spacing: 4px; }
.auth-visual h1 { font-family: var(--serif); letter-spacing: 2px; }
