/* 基于离线版样式 + 小增改 */
:root{
  --bg:#0b1020;
  --card:#121a33;
  --muted:#9aa7c7;
  --text:#e7ecff;
  --line:rgba(255,255,255,.10);
  --primary:#5b7cfa;
  --danger:#ff5c7a;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --radius:16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC","Noto Sans CJK SC","Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(91,124,250,.20), transparent 60%),
              radial-gradient(1000px 700px at 80% 0%, rgba(255,92,122,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}

.topbar{
  position: sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(11,16,32,.55);
}

.brand{ display:flex; gap:12px; align-items:center; }
.logo{
  width:42px; height:42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.08);
  border:1px solid var(--line);
}
.title{ font-weight:700; letter-spacing:.4px; }
.subtitle{ font-size:12px; color:var(--muted); margin-top:2px; }

.actions{ display:flex; gap:10px; align-items:center; flex-wrap: wrap; justify-content:flex-end; }
.who{
  font-size: 12px;
  color: rgba(231,236,255,.85);
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
}

.container{ max-width: 980px; margin: 18px auto; padding: 0 14px; }
.panel{
  background: rgba(18,26,51,.70);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.toolbar{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items:center;
}

.input, .select, .textarea{
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
.input::placeholder, .textarea::placeholder{ color: rgba(231,236,255,.55); }
.input:focus, .select:focus, .textarea:focus{
  border-color: rgba(91,124,250,.55);
  box-shadow: 0 0 0 3px rgba(91,124,250,.12);
}

.select{ padding: 10px 10px; }
.textarea{ width:100%; resize: vertical; }

.btn{
  cursor:pointer;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: rgba(91,124,250,.22);
  border-color: rgba(91,124,250,.38);
}
.btn.primary:hover{ background: rgba(91,124,250,.30); }

.btn.danger{
  background: rgba(255,92,122,.18);
  border-color: rgba(255,92,122,.35);
}
.btn.danger:hover{ background: rgba(255,92,122,.26); }

.btn.file{ position:relative; overflow:hidden; }
.btn.file input{
  position:absolute; inset:0;
  opacity:0; cursor:pointer;
}

.stats{
  margin: 12px 2px 8px;
  font-size: 13px;
  color: var(--muted);
}

.list{ display:flex; flex-direction:column; gap:10px; padding: 6px 0 2px; }

.card{
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  padding: 12px 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.card:hover{ background: rgba(255,255,255,.07); }

.left{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top: 2px;
}
.chk{ width: 18px; height: 18px; cursor:pointer; }

.content{ flex:1; min-width: 0; }
.cardTitle{
  display:flex; gap:8px; align-items:center;
  font-weight: 650;
  overflow:hidden;
}
.cardTitle .t{
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.badge{
  font-size:12px;
  padding: 2px 8px;
  border-radius: 999px;
  border:1px solid var(--line);
  color: var(--muted);
}
.badge.pin{ color: rgba(231,236,255,.9); background: rgba(91,124,250,.14); border-color: rgba(91,124,250,.28); }

.cardBody{
  margin-top: 6px;
  color: rgba(231,236,255,.86);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 8.8em;
  overflow:hidden;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.meta{
  margin-top: 8px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items:center;
  color: var(--muted);
  font-size: 12px;
}
.tags{ display:flex; gap:6px; flex-wrap: wrap; }
.tag{
  border:1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}

.right{ display:flex; flex-direction:column; gap:8px; }
.iconBtn{
  cursor:pointer;
  width: 36px; height: 36px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.iconBtn:hover{ background: rgba(255,255,255,.10); }
.iconBtn:active{ transform: translateY(1px); }

.empty{
  padding: 30px 12px 26px;
  text-align:center;
  color: var(--muted);
}
.emptyTitle{ font-size: 16px; color: rgba(231,236,255,.88); font-weight: 650; }
.emptyHint{ margin-top: 8px; font-size: 13px; }

.hidden{ display:none !important; }

/* modal */
.mask{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 20;
}
.modal{
  position:fixed;
  z-index: 21;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: min(860px, calc(100vw - 24px));
  background: rgba(18,26,51,.92);
  border:1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.modalHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  border-bottom:1px solid var(--line);
}
.modalTitle{ font-weight: 700; }
.modalBody{ padding: 12px; display:flex; flex-direction:column; gap:12px; }
.field .label{ font-size: 12px; color: var(--muted); margin: 0 0 6px 2px; }
.row{ display:flex; gap:10px; align-items:center; flex-wrap: wrap; }
.check{ display:flex; gap:8px; align-items:center; color: rgba(231,236,255,.85); }
.modalFooter{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px;
  border-top:1px solid var(--line);
}
.spacer{ flex: 1; }

.divider{
  height:1px;
  width:100%;
  background: var(--line);
  margin: 4px 0;
}

.smallmuted{ color: var(--muted); font-size: 12px; line-height: 1.4; }
.hint{
  border:1px dashed rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.03);
}
.hintTitle{ font-weight: 650; }
.hintText{ margin-top:6px; color: var(--muted); font-size: 12px; }

.users{ display:flex; flex-direction:column; gap:10px; }
.userRow{
  display:flex; gap:10px; align-items:center; flex-wrap: wrap;
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.04);
}
.userRow .u{ font-weight: 650; }
.userRow .pill{
  font-size:12px;
  padding: 2px 8px;
  border-radius: 999px;
  border:1px solid var(--line);
  color: var(--muted);
}


/* ---- Admin tabs & notes list ---- */
.tabs{
  display:flex;
  gap:8px;
  margin: 6px 0 12px;
}
.tab{
  padding:8px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: inherit;
  cursor:pointer;
}
.tab.active{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.18);
}

.notesAdmin{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.noteAdminCard{
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius:16px;
  padding:12px 12px;
}
.noteAdminTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.noteAdminTitle{
  font-weight:700;
}
.noteAdminMeta{
  font-size:12px;
  opacity:.8;
}
.noteAdminBody{
  margin-top:8px;
  white-space:pre-wrap;
  opacity:.9;
  font-size:13px;
}
