/**
 * theme.css
 * 创建日期：2026-10-28
 * 作者：林小雨
 * 用途：PROYORA 设计系统 —— 办公协作系统主题皮肤
 * 来源：D:\design\yuan-yao\DESIGN.md v1.0
 * 最后修改：2026-10-28
 *
 * 核心约束（不可让渡）：
 *   1. 深空黑 #05070A 底 + 星白 #F0F0FA 字
 *   2. 全站唯一彩色：曜蓝 #1C69D4，仅用于交互与强调
 *   3. 大标题 weight 300
 *   4. 圆角 0–2px，禁止胶囊形
 *   5. 无阴影、无渐变（Hero 星云光晕除外）
 *   6. 间距 8px 网格
 *   7. 明暗区块交替
 */

:root {
  /* --- 暗面 --- */
  --void: #05070A;
  --void-2: #0B0F15;
  --void-3: #0E141B;

  /* --- 亮面 --- */
  --surface: #FFFFFF;
  --ash: #F4F4F4;

  /* --- 品牌（唯一彩色） --- */
  --brand: #1C69D4;
  --brand-deep: #0B4CA8;
  --brand-glass: rgba(28, 105, 212, 0.10);
  --brand-glow: rgba(28, 105, 212, 0.16);

  /* --- 文字 --- */
  --star: #F0F0FA;
  --ink: #101418;
  --graphite: #5C6066;
  --pewter: #8C9096;

  /* --- 线条 --- */
  --line-dark: rgba(240, 240, 250, 0.14);
  --line-light: #E4E6EA;
  --ghost-border: rgba(240, 240, 250, 0.28);

  /* --- 字级 --- */
  --f-display: clamp(40px, 6vw, 76px);
  --f-h1: clamp(30px, 3.4vw, 44px);
  --f-h2: 26px;
  --f-h3: 19px;

  /* --- 字体 --- */
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--star);
  font-family: var(--font-cn), var(--font-en);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 全大写工业标签 ---------- */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--brand);
}
.label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pewter);
}
.micro {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 1.15px;
  color: var(--pewter);
}
.mono { font-family: var(--font-mono); }

/* ---------- 标题 ---------- */
h1, .h1 {
  font-size: var(--f-h1);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.3px;
  color: var(--star);
  margin: 0;
}
h2, .h2 {
  font-size: var(--f-h2);
  font-weight: 300;
  line-height: 1.3;
  color: var(--star);
  margin: 0;
}
h3, .h3 {
  font-size: var(--f-h3);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.2px;
  color: var(--star);
  margin: 0;
}
.display {
  font-size: var(--f-display);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.6px;
}

/* 亮面区块：整块切换文字色 */
.light {
  background: var(--surface);
  color: var(--ink);
}
.light h1, .light h2, .light h3, .light .h1, .light .h2, .light .h3 { color: var(--ink); }
.light .label, .light .micro { color: var(--pewter); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 13px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-family: var(--font-cn);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
  background: none;
  /* 默认按钮：深底浅字。不会出现浏览器默认黑字在深色背景上看不见的情况 */
  color: var(--star);
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  background: rgba(240, 240, 250, 0.04);
  border-color: var(--ghost-border);
  color: var(--star);
}
.btn-ghost:hover { background: rgba(240, 240, 250, 0.10); border-color: rgba(240, 240, 250, 0.55); }

/* ---------- 文字按钮 ---------- */
.link-btn {
  display: inline-block;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--graphite);
  cursor: pointer;
  transition: color .14s;
}
.link-btn:hover { color: var(--star); }
.link-btn:disabled { opacity: .45; cursor: not-allowed; }

.light .btn-ghost {
  background: transparent;
  border-color: var(--line-light);
  color: var(--ink);
}
.light .btn-ghost:hover { background: var(--ash); }

.btn-sm { min-height: 34px; padding: 8px 16px; font-size: 10px; letter-spacing: 1.2px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > .label { display: block; margin-bottom: 8px; }

input[type="text"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--void-2);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  color: var(--star);
  font-family: var(--font-cn);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color .16s, box-shadow .16s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glass);
}
input::placeholder, textarea::placeholder { color: var(--pewter); }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--pewter) 50%),
                    linear-gradient(135deg, var(--pewter) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
select option { background: var(--void-2); color: var(--star); }

.light input, .light select, .light textarea {
  background: var(--surface);
  border-color: var(--line-light);
  color: var(--ink);
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 22px clamp(24px, 5vw, 72px);
  background: rgba(5, 7, 10, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--star);
}
.nav-logo .dot { color: var(--brand); }
.nav-links { display: flex; gap: 34px; align-items: stretch; }
.nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pewter);
  padding: 0;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color .16s, border-color .16s;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.nav-link:hover { color: var(--star); }
.nav-link.active { color: var(--star); border-bottom-color: var(--brand); }

/* ---------- 导航：设置下拉 ---------- */
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}
.nav-left { gap: 40px; }
.nav-right { gap: 20px; font-size: 13px; color: var(--graphite); }

.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-drop-btn {
  height: 22px;
  max-height: 22px;
  line-height: 22px;
  padding: 0 12px 0 0;
  box-sizing: border-box;
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
  border: none;
  border-bottom: 1px solid transparent;
  background: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.nav-drop-btn .caret {
  position: absolute;
  right: 0;
  top: 50%;
  margin: 0;
  font-size: 9px;
  line-height: 9px;
  height: 9px;
  width: 9px;
  display: block;
  transform: translateY(-45%);
  transition: transform .16s;
}
.nav-drop-btn[aria-expanded="true"] .caret { transform: translateY(-45%) rotate(180deg); }

.nav-sub {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 150px;
  padding: 6px 0;
  background: var(--void-2);
  border: 1px solid var(--line-dark);
  display: none;
  z-index: 40;
}
.nav-sub.open { display: block; }

.nav-sub-link {
  display: block;
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: .5px;
  color: var(--graphite);
  white-space: nowrap;
  transition: color .14s, background .14s;
}
.nav-sub-link:hover { color: var(--star); background: var(--void); }
.nav-sub-link.active { color: var(--star); box-shadow: inset 2px 0 0 var(--brand); }

/* ---------- 网格分隔线卡片（替代卡片边框） ---------- */
.grid-lines {
  display: grid;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}
.grid-lines > * {
  background: var(--void);
  padding: 38px 32px 44px;
  transition: background .16s;
}
.grid-lines > *:hover { background: var(--void-3); }

.light .grid-lines { background: var(--line-light); border-color: var(--line-light); }
.light .grid-lines > * { background: var(--surface); }
.light .grid-lines > *:hover { background: var(--ash); }

/* ---------- 状态点 ---------- */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.dot-normal { background: var(--brand); }
.dot-problem { background: var(--star); }
.dot-done { background: var(--pewter); }

/* 状态标签：不用彩色底，只用线条 + 文字 */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 1.15px;
  text-transform: uppercase;
  color: var(--pewter);
}
.status-tag.is-normal { color: var(--brand); border-color: rgba(28, 105, 212, 0.45); }
.status-tag.is-problem { color: var(--star); border-color: var(--ghost-border); }
.status-tag.is-done { color: var(--pewter); border-color: var(--line-dark); }

/* ---------- 浮层遮罩 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(2px);
  z-index: 40;
}

/* ---------- 侧滑面板 ---------- */
.panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 460px;
  background: var(--void-2);
  border-left: 1px solid var(--line-dark);
  z-index: 50;
  overflow-y: auto;
}
.panel-head {
  padding: 24px 32px;
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-body { padding: 32px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-box {
  background: var(--void-2);
  border: 1px solid var(--line-dark);
  border-radius: 0;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 表格 ---------- */
table { border-collapse: collapse; width: 100%; }
th {
  text-align: left;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pewter);
  border-bottom: 1px solid var(--line-dark);
  background: var(--void-2);
}
td {
  padding: 16px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
  color: var(--star);
}
tbody tr:hover { background: var(--void-3); }

/* ---------- 提示条 ---------- */
.notice {
  padding: 14px 18px;
  border: 1px solid var(--line-dark);
  border-left: 2px solid var(--brand);
  background: var(--brand-glass);
  font-size: 13px;
  line-height: 1.7;
  color: var(--star);
}

/* ---------- 错误提示 ---------- */
.err {
  padding: 11px 14px;
  border: 1px solid rgba(240, 240, 250, 0.28);
  border-left: 2px solid var(--star);
  background: rgba(240, 240, 250, 0.04);
  color: var(--star);
  font-size: 13px;
}

/* ---------- 甘特图 ---------- */
/* ---------- 甘特图 ---------- */
/* 说明：具体尺寸由 index.html 与 responsive.css 控制，这里只保留基础类 */
.gantt-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  background: var(--void-2);
}
.gantt-inner { min-width: 860px; width: max-content; }
.gantt-row {
  display: grid;
  grid-template-columns: 220px minmax(0, max-content);
  border-bottom: 1px solid rgba(240, 240, 250, 0.08);
  height: 36px;
}
.gantt-row:last-child { border-bottom: none; }
.gantt-name {
  padding: 0 10px;
  font-size: 11px;
  color: var(--star);
  border-right: 1px solid rgba(240, 240, 250, 0.12);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.gantt-track { position: relative; }
.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 14px;
  background: var(--brand);
  cursor: pointer;
  transition: background 0.16s;
  border-radius: 1px;
}
.gantt-bar:hover { background: var(--brand-deep); }
.gantt-bar.bar-problem {
  background: repeating-linear-gradient(45deg, var(--star) 0 3px, transparent 3px 7px);
  border: 1px solid var(--star);
}
.gantt-bar.bar-done { background: var(--pewter); }
.gantt-bar.bar-blocked { opacity: 0.45; }
.gantt-head {
  display: grid;
  grid-template-columns: 220px minmax(0, max-content);
  border-bottom: 1px solid var(--ghost-border);
  background: var(--void);
  position: sticky;
  top: 0;
  z-index: 2;
}
.gantt-head-name {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pewter);
  border-right: 1px solid rgba(240, 240, 250, 0.12);
}
.gantt-days { display: flex; position: relative; flex: none; }
.gantt-day {
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 10px 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--pewter);
  overflow: hidden;
  white-space: nowrap;
}
.gantt-day.is-today { color: var(--brand); font-weight: 700; }
.gantt-day.is-month { color: var(--star); font-weight: 700; }
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

/* ---------- 统计栏 ---------- */
.stat {
  padding: 24px 20px;
  border-right: 1px solid var(--line-dark);
}
.stat:last-child { border-right: none; }
.stat-value {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.4px;
  color: var(--star);
}
.stat-label {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pewter);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #1d2530; }
::-webkit-scrollbar-thumb:hover { background: #2a3441; }

/* ---------- 工具类 ---------- */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.text-pewter { color: var(--pewter); }
.text-graphite { color: var(--graphite); }
.text-brand { color: var(--brand); }
.text-star { color: var(--star); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
