/* yocrest 员工后台 —— 浅色、与数据工作台同一套色板 */
:root {
  --bg: #f4f6f9; --bg2: #fff; --bg3: #eef1f6; --line: #dfe4ec;
  --text: #1c232b; --muted: #66717f; --accent: #d97a2b; --accent-soft: #fbeedd;
  --ok: #2f9e63; --bad: #d9534f; --warn: #b8860b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }

#topbar { display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 56px;
  background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .01em; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
#tabs { display: flex; gap: 4px; }
.tab { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; color: var(--muted);
  font-size: 13.5px; cursor: pointer; }
.tab:hover { background: var(--bg3); color: var(--text); }
.tab.active { background: var(--accent-soft); color: #a85c15; font-weight: 600; }
.right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { font-size: 13px; color: var(--muted); }
.ghost { border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 5px 10px;
  border-radius: 8px; font-size: 12.5px; cursor: pointer; text-decoration: none; }
.ghost:hover { background: var(--bg3); }
.primary { border: 0; background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 9px;
  font-size: 14px; font-weight: 600; cursor: pointer; }
.primary:hover { filter: brightness(.96); }
.primary:disabled { opacity: .55; cursor: default; }

.login-wrap { display: grid; place-items: center; min-height: calc(100vh - 56px); padding: 24px; }
.login-card { width: 380px; padding: 26px 26px 20px; }
.login-card h1 { margin: 0 0 4px; font-size: 21px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card h2 { margin: 0 0 12px; font-size: 15px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 5px; }
.input, input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg2);
  color: var(--text); font-size: 13.5px; font-family: inherit; }
.input:focus, select:focus, input:focus { outline: 2px solid #f2cdab; border-color: #e3b07c; }
.login-card .primary { width: 100%; margin-top: 16px; }
.error { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 10px; }

.view { max-width: 1240px; margin: 0 auto; padding: 22px 22px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head .sub { margin: 0; }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-tools .input { width: 160px; }
.mini { display: inline; margin: 0; font-size: 12px; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); }
.kpi b { font-size: 26px; font-variant-numeric: tabular-nums; }
.kpi i { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 4px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols.wide-left { grid-template-columns: 380px minmax(0, 1fr); }
@media (max-width: 980px) { .cols, .cols.wide-left { grid-template-columns: 1fr; } }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 7px 8px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.table tbody tr:hover { background: #fafbfd; }
.table select, .table input[type=number] { width: auto; min-width: 84px; padding: 4px 6px; font-size: 12.5px; }
.table .num { font-variant-numeric: tabular-nums; }

.bar { height: 6px; border-radius: 999px; background: var(--bg3); overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.pct-cell { display: flex; align-items: center; gap: 8px; }
.pct-cell .pct { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }
.pct-cell .bar { width: 92px; min-width: 0; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--bg3); color: var(--muted); }
.state { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.state.planned { background: #eef1f6; color: #5b6674; }
.state.doing { background: #fbeedd; color: #a85c15; }
.state.done { background: #e7f6ee; color: #1f7a4d; }
.state.blocked { background: #fdeaea; color: #b3382f; }
.chip-ok { color: var(--ok); font-weight: 600; }
.chip-bad { color: var(--bad); font-weight: 600; }

.form { display: grid; gap: 8px; }
.form label { margin-top: 4px; }
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.msg { font-size: 12.5px; min-height: 18px; color: var(--ok); }
.msg.bad { color: var(--bad); }
.detail { font-size: 13px; color: var(--text); line-height: 1.7; }
.actions { margin-top: 14px; display: flex; gap: 10px; }
.select-cell { display: flex; gap: 6px; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1c232b; color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 99; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.toast.bad { background: #b3382f; }
code { background: var(--bg3); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }

.site-list { display: grid; gap: 8px; }
.site-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fcfdff; }
.sc-top { display: flex; align-items: center; gap: 8px; }
.sc-act { margin-left: auto; display: flex; gap: 6px; }
.sc-act .ghost { padding: 3px 9px; font-size: 12px; }
.sc-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9cfd8; }
.sc-dot.on { background: var(--ok); }
.sc-dot.off { background: #c9cfd8; }
.sc-url { margin: 5px 0 0; word-break: break-all; font-size: 12.5px; }
.sc-url .hint { margin-left: 6px; }
.nc-link { margin-top: 7px; display: flex; gap: 10px; align-items: center; }
.nc-link a { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.notice-list { display: grid; gap: 10px; max-height: 520px; overflow: auto; }
.notice-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fcfdff; }
.nc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nc-head button { margin-left: auto; }
.nc-text { font-size: 12.5px; color: var(--text); line-height: 1.65; word-break: break-all; }
.mine-link { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; font-size: 12.5px; }
.mine-link code { word-break: break-all; }
.mini { color: var(--muted); font-size: 12px; }
