:root {
  color-scheme: light;
  --paper: #fff;
  --bg: #f7f8fb;
  --ink: #192238;
  --muted: #505d73;
  --line: #dfe4ee;
  --accent: #293d82;
  --accent-strong: #1c2d66;
  --pale: #e9eefb;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #5269b6; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .52; }
a { color: var(--accent); text-underline-offset: .2em; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.035em; line-height: 1.25; }
h2 { font-size: 17px; line-height: 1.4; }
small { font-size: 12px; }
.muted { color: var(--muted); line-height: 1.6; }
.error { color: #9b3126; line-height: 1.5; margin-bottom: 13px; }
.eyeline { margin: 0 0 11px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 16px; letter-spacing: -.035em; font-weight: 750; }
.brand small { margin-left: 3px; color: var(--muted); font-weight: 550; }
.mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: white; background: var(--accent); font-family: Georgia, serif; font-size: 23px; font-weight: 700; }
.gate { display: grid; min-height: 100svh; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 0, #e8eefb, transparent 65%), var(--bg); }
.gate-paper { background: var(--paper); border: 1px solid var(--line); border-radius: 19px; width: min(100%, 452px); padding: clamp(23px, 6vw, 42px); box-shadow: 0 20px 50px #293d8210; }
.gate-paper .brand { margin-bottom: 36px; }
.gate-paper h1 { margin-bottom: 10px; }
.gate-paper p { margin-bottom: 17px; }
.gate-paper form { display: grid; gap: 15px; }
.gate-paper .button.primary { width: 100%; }
.workspace { min-height: 100svh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; gap: 34px; height: 100svh; padding: 25px 17px 17px; background: var(--paper); border-right: 1px solid var(--line); }
.sidebar .brand { padding-inline: 7px; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; width: 100%; border: 0; background: none; text-align: left; border-radius: 8px; color: var(--muted); padding: 11px 13px; font-weight: 590; white-space: nowrap; }
.nav button:hover, .plain:hover { background: var(--bg); color: var(--ink); }
.nav button[aria-current="page"] { background: var(--pale); color: var(--accent-strong); font-weight: 700; }
.profile { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.profile-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.profile-copy small { color: var(--muted); }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--pale); color: var(--accent); font-weight: 700; }
.screen { width: min(100%, 1440px); margin-inline: auto; padding: 39px clamp(19px, 4vw, 55px) 40px; }
.screen-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 27px; }
.screen-header .muted { margin-top: 7px; }
.button, .plain { min-height: 37px; border: 1px solid var(--line); padding: 7px 13px; border-radius: 8px; color: var(--ink); background: var(--paper); font-weight: 650; white-space: nowrap; }
.button:hover { background: #eff3fa; }
.button.primary { border-color: var(--accent); color: white; background: var(--accent); }
.button.primary:hover { background: var(--accent-strong); }
.plain { min-height: 32px; padding: 4px 7px; border: 0; background: none; color: var(--accent); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { display: grid; gap: 7px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.stat span { color: var(--muted); font-size: 12px; font-weight: 590; }
.stat strong { font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.04em; }
.panel { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); margin-bottom: 16px; }
.panel-title { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 13px 15px; }
.filters label { flex: 1; min-width: 118px; }
.filters .button { min-height: 40px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span:first-child { font-weight: 650; font-size: 12px; }
.field > small { color: var(--muted); line-height: 1.5; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; min-height: 40px; border: 1px solid #cdd5e5; background: var(--paper); border-radius: 8px; color: var(--ink); padding: 8px 10px; min-width: 0; }
textarea { resize: vertical; }
input:read-only:not([type="checkbox"]) { background: var(--bg); }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); vertical-align: middle; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f2f5fa; color: #43506a; font-size: 12px; font-weight: 680; white-space: nowrap; }
th, td { padding: 11px 13px; vertical-align: top; border-bottom: 1px solid #e8ecf4; }
tr:last-child td { border-bottom: 0; }
td { font-size: 13px; line-height: 1.55; }
td strong { display: block; }
td .detail { display: block; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.date { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; }
.project-info { min-width: 174px; width: 40%; overflow-wrap: anywhere; }
.report-record .project-info { width: 62%; }
.status { color: #735214; background: #fff2d7; display: inline-block; border-radius: 100px; padding: 2px 8px; white-space: nowrap; font-size: 11px; font-weight: 680; }
.status.done { color: #24543d; background: #e7f4eb; }
.record-notes { margin-top: 5px; }
.record-notes summary { cursor: pointer; color: var(--accent); }
.record-notes .detail { margin-top: 5px; }
.record-notes ul { margin: 6px 0 0; padding-left: 17px; }
.record-notes a { overflow-wrap: anywhere; }
.empty { text-align: center; padding: 38px 17px; }
.empty p { margin-top: 6px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 11px 15px; border-top: 1px solid var(--line); }
.pagination button:disabled { cursor: default; }
.selection-summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-history, .team-list { list-style: none; padding: 0; margin: 0; }
.report-history li, .team-list li { padding: 12px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.report-history li:last-of-type, .team-list li:last-of-type { border-bottom: 0; }
.report-history li > div:first-child, .team-list li > div:first-child { flex: 1; }
.report-history strong, .team-list strong { display: block; }
#invite-result { background: var(--pale); padding: 15px; border-radius: 8px; margin: 0 15px 13px; }
#invite-result input { margin: 7px 0; }
.dialog { width: min(640px, calc(100% - 26px)); max-height: 94svh; border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); box-shadow: 0 30px 70px #131b3944; }
.dialog::backdrop { background: #1522467d; }
.dialog-inner { display: grid; gap: 15px; padding: 21px; }
.dialog-header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.dialog-actions { justify-content: flex-end; padding-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.notice { position: fixed; bottom: 20px; right: 20px; z-index: 10; padding: 11px 15px; border-radius: 9px; background: var(--ink); color: white; max-width: min(440px, calc(100% - 40px)); box-shadow: 0 6px 22px #15224631; }
.notice:empty { display: none; }
@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { height: auto; z-index: 2; display: grid; align-items: center; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 9px 13px 0; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .nav { grid-row: 2; grid-column: 1 / -1; display: flex; overflow-x: auto; }
  .nav button { width: auto; }
  .profile { margin: 0; padding: 0; border: 0; }
  .profile-copy { max-width: 90px; }
  .profile-copy small { display: none; }
  .screen { padding-top: 26px; }
}
@media (max-width: 625px) {
  .screen { padding-inline: 13px; }
  .screen-header { align-items: flex-start; margin-bottom: 20px; }
  .stat { padding: 11px; }
  .stats { gap: 7px; }
  .filters { padding: 11px; }
  .filters label { min-width: min(135px, 100%); }
  .table-scroll { padding: 5px 11px; }
  .table-scroll table, .table-scroll tbody, .table-scroll tr { display: block; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .table-scroll tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table-scroll tr:last-child { border-bottom: 0; }
  .table-scroll td { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; width: auto; padding: 4px 0; border: 0; }
  .table-scroll td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .table-scroll td > * { justify-self: start; }
  .table-scroll td.project-info { display: block; padding-bottom: 7px; }
  .table-scroll td.project-info::before { content: none; }
  .table-scroll td:empty { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .dialog-inner { padding: 16px; }
  input:not([type="checkbox"]), select, textarea { font-size: 16px; }
}
