:root { --ink:#19242f; --muted:#6c7884; --line:#dce2e6; --paper:#fff; --wash:#f5f7f6; --accent:#176b70; --accent-soft:#e5f2f0; --warm:#cb704d; --danger:#b84d45; --shadow:0 15px 35px rgba(25,36,47,.08); }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
html { min-height:100%; background:var(--wash); }
body { min-height:100vh; margin:0; background:var(--wash); color:var(--ink); font:15px/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:wait; opacity:.68; }
.app-shell { width:min(1160px,100%); margin:0 auto; padding:0 24px 64px; }
.brand-lockup { display:flex; align-items:center; gap:10px; font-weight:800; }
.brand-mark { display:grid; place-items:center; width:36px; height:36px; border-radius:8px; color:#fff; background:var(--accent); font-size:18px; }
.eyebrow { margin:0; color:var(--warm); font-size:11px; font-weight:800; letter-spacing:.12em; }
.login-page { overflow:hidden; }
.login-shell { min-height:100vh; padding:24px; }
.login-panel { width:min(340px,100%); padding:22px; background:var(--paper); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); }
.login-eyebrow { margin-top:22px; }
.login-panel h1 { margin:14px 0 4px; font-size:22px; line-height:1.2; }
.intro { margin:0 0 14px; color:var(--muted); font-size:13px; }
.field { display:block; margin:11px 0; color:var(--muted); font-size:13px; font-weight:650; }
.field input,.field textarea { display:block; width:100%; margin-top:7px; padding:11px 12px; color:var(--ink); background:#fbfcfc; border:1px solid var(--line); border-radius:6px; outline:none; }
.field input:focus,.field textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(23,107,112,.12); }
.field textarea { min-height:150px; resize:vertical; }
.hint { display:block; margin-top:5px; color:var(--muted); font-size:12px; font-weight:400; }
.error { min-height:1.65em; margin:9px 0; color:var(--danger); font-size:13px; }
.primary,.secondary,.danger-button,.icon-button { border:1px solid transparent; border-radius:6px; font-weight:750; }
.primary { padding:11px 17px; color:#fff; background:var(--accent); }
.primary:hover { background:#12585c; }
.full-button { width:100%; }
.secondary { padding:10px 14px; color:var(--ink); background:var(--paper); border-color:var(--line); }
.danger-button { padding:8px 10px; color:var(--danger); background:transparent; }
.icon-button { padding:7px 9px; color:var(--muted); background:transparent; font-size:13px; }
.app-header { display:flex; align-items:center; justify-content:space-between; min-height:76px; gap:16px; border-bottom:1px solid var(--line); }
.header-actions { display:flex; align-items:center; gap:10px; }
.user-label { color:var(--muted); font-size:13px; }
.logout-button { border:0; color:var(--muted); background:transparent; font-size:13px; }
.workspace-head { display:flex; align-items:end; justify-content:space-between; gap:24px; padding:47px 0 27px; }
.workspace-head h1 { margin:9px 0 7px; font-size:clamp(30px,5vw,47px); line-height:1.08; }
.lead { max-width:570px; margin:0; color:var(--muted); }
.total-stat { min-width:114px; padding:14px 18px; background:var(--paper); border:1px solid var(--line); border-radius:8px; text-align:center; }
.total-stat strong { display:block; font-size:28px; line-height:1; }
.total-stat span { color:var(--muted); font-size:12px; }
.toolbar { display:flex; align-items:center; gap:10px; margin-bottom:23px; }
.search-wrap { position:relative; flex:1; }
.search-wrap input { width:100%; padding:12px 15px 12px 40px; background:var(--paper); border:1px solid var(--line); border-radius:6px; outline:none; }
.search-symbol { position:absolute; top:50%; left:14px; color:var(--muted); transform:translateY(-50%); }
.tag-filter { min-width:150px; padding:11px 12px; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:6px; }
.card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.note-card { display:flex; min-height:255px; flex-direction:column; padding:19px; background:var(--paper); border:1px solid var(--line); border-radius:8px; box-shadow:0 5px 16px rgba(25,36,47,.04); }
.card-top { display:flex; align-items:start; justify-content:space-between; gap:15px; }
.card-number { display:flex; align-items:baseline; gap:8px; min-width:0; }
.card-number span { color:var(--accent); font-size:11px; font-weight:800; }
.card-number strong { overflow-wrap:anywhere; color:var(--warm); font-size:29px; line-height:1.1; }
.card-actions { display:flex; flex:0 0 auto; gap:2px; }
.note-card h2 { margin:23px 0 8px; font-size:19px; line-height:1.35; }
.description { display:-webkit-box; overflow:hidden; margin:0; color:var(--muted); -webkit-box-orient:vertical; -webkit-line-clamp:4; }
.card-footer { display:flex; align-items:end; justify-content:space-between; gap:10px; margin-top:auto; padding-top:19px; }
.tags { display:flex; flex-wrap:wrap; gap:5px; }
.tag { padding:3px 8px; color:var(--accent); background:var(--accent-soft); border-radius:999px; font-size:12px; }
.date { flex:0 0 auto; color:#8a959d; font-size:11px; }
.empty-state { grid-column:1/-1; padding:62px 20px; color:var(--muted); background:var(--paper); border:1px dashed #bec8cd; border-radius:8px; text-align:center; }
.empty-state strong { display:block; margin-bottom:5px; color:var(--ink); font-size:17px; }
.modal-backdrop { position:fixed; z-index:5; inset:0; display:grid; place-items:center; padding:20px; background:rgba(25,36,47,.38); }
.modal-panel { width:min(620px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:27px; background:var(--paper); border-radius:8px; box-shadow:0 25px 70px rgba(25,36,47,.25); }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.modal-head h2 { margin:0; font-size:23px; }
.close-button { width:32px; height:32px; border:0; color:var(--muted); background:transparent; font-size:21px; }
.modal-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; }
.toast { position:fixed; z-index:10; right:24px; bottom:24px; max-width:min(360px,calc(100vw - 48px)); padding:11px 15px; color:#fff; background:var(--ink); border-radius:6px; box-shadow:var(--shadow); }
@media (max-width:860px) { .card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) {
  .login-shell { padding:16px; }
  .login-panel { width:100%; }
  .app-shell { padding:0 16px 45px; }
  .app-header { align-items:flex-start; flex-direction:column; padding:16px 0; }
  .header-actions { width:100%; justify-content:space-between; }
  .workspace-head { align-items:flex-start; flex-direction:column; padding:34px 0 22px; }
  .toolbar { align-items:stretch; flex-direction:column; }
  .tag-filter { width:100%; }
  .card-grid { grid-template-columns:1fr; }
  .modal-panel { padding:22px 18px; }
}
