* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1d2433;
  background: #eef2f6;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.app { display: flex; height: 100%; min-height: 100%; background: #f3f6fb; }
aside {
  width: 84px;
  flex: none;
  background: #2f7cf6;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.brand {
  width: 32px;
  height: 32px;
  margin: 10px auto 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 12px; overflow: auto; }
nav button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 5px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  line-height: 1.15;
}
nav button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav button.on { background: rgba(255, 255, 255, 0.22); color: #fff; }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
header {
  flex: none;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #e6edf5;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions #toast { white-space: nowrap; }
.header-actions .ghost { background: #f3f6fb; padding: 6px 12px; }
#who { color: #667085; font-size: 14px; }
main { flex: 1; min-width: 0; overflow: auto; padding: 16px 20px 36px; }
.gate { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.gate-card { width: 380px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05); padding: 28px 24px 24px; }
.gate-card h1 { font-size: 22px; }
.gate-error { min-height: 22px; margin: 8px 0 0; color: #c2414d; }
.gate[hidden], #shell[hidden], #pass-box[hidden] { display: none !important; }
h1 { margin: 0; font-size: 16px; font-weight: 600; }
#toast { margin: 0; color: #2f6fed; min-height: 22px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.stat, .card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}
.stat { padding: 22px 22px 18px; text-align: left; border: 0; }
.stat b { display: block; font-size: 34px; line-height: 1; }
.stat span { display: block; margin-top: 8px; color: #667085; }
.card { padding: 20px 22px; margin-top: 16px; }
.card h2 { margin: 0 0 10px; font-size: 16px; }
.card p, .muted { color: #667085; line-height: 1.7; }
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-top: 18px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 8px; }
.sheet {
  margin-top: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
  overflow: hidden;
}
.sheet-scroll { max-height: 560px; overflow: auto; }
.sheet-scroll table { margin-top: 0; border-radius: 0; border-collapse: separate; border-spacing: 0; }
.sheet-scroll th { position: sticky; top: 0; z-index: 1; }
.clip { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.lab { display: block; margin-top: 10px; color: #667085; font-size: 13px; }
.lab .field { margin-top: 4px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.pager .muted { margin: 0; }
tr.group td { background: #f4f7fb; color: #475467; font-weight: 700; font-size: 13px; }
tr.lock td { color: #98a2b3; }
.person, .q, .notice {
  width: 100%;
  text-align: left;
  border: 1px solid #e6ebf2;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
}
.person.on, .q.on { border-color: #2f6fed; box-shadow: inset 0 0 0 1px #2f6fed; }
.person b, .q b, .notice b, .notice span { display: block; }
.person span, .q span, .notice span { color: #667085; font-size: 13px; }
.notice span { margin-top: 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.field, .search, select.field, textarea.field {
  width: 100%;
  border: 1px solid #d9e0ea;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  margin-top: 8px;
}
textarea.field { min-height: 88px; resize: vertical; }
.btn, .ghost, .danger {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: #1d2433;
  color: #fff;
  white-space: nowrap;
}
.ghost { background: #eef3f8; color: #1d2433; }
.danger { background: #fff; color: #c2414d; border: 1px solid #f0d0d4; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  border: 1px solid #d9e0ea;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
}
.chip.on { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.toolbar .search { margin-top: 0; flex: 1; width: auto; min-width: 180px; }
table { width: 100%; border-collapse: collapse; margin-top: 14px; background: #fff; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
th { color: #667085; font-weight: 600; font-size: 13px; background: #f8fafc; }
.stem { max-width: 520px; }
.actions { white-space: nowrap; }
.actions button { margin-right: 6px; }
.empty { padding: 28px 8px; color: #98a2b3; }
.file { display: inline-flex; align-items: center; }
.preview { display: block; width: 160px; max-height: 120px; object-fit: cover; border-radius: 8px; margin: 8px 0; background: #f2f4f7; }
.files { margin: 8px 0 0; padding-left: 18px; color: #667085; font-size: 13px; word-break: break-all; }
.desk { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr); gap: 14px; }
.banner {
  min-height: 188px;
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.28), transparent 26%),
    radial-gradient(circle at 12% 80%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(105deg, #0d4ea8 0%, #2f7cf6 58%, #49b7ff 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 22px 26px;
}
.banner b { display: block; font-size: 28px; line-height: 1.25; }
.banner span, .banner em { display: block; margin-top: 8px; font-style: normal; color: rgba(255, 255, 255, 0.88); }
.board {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8eef5;
  padding: 14px 16px 8px;
  min-height: 188px;
}
.board-h { display: flex; align-items: center; justify-content: space-between; }
.board-h b { font-size: 16px; }
.board-h button { border: 0; background: transparent; color: #2f7cf6; padding: 0; }
.board-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-bottom: 1px solid #f2f5f9;
  text-align: left;
}
.board-row span { color: #98a2b3; font-size: 12px; white-space: nowrap; }
.desk-title { margin: 18px 0 10px; font-size: 16px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cats button {
  border: 0;
  background: transparent;
  color: #667085;
  border-radius: 6px;
  padding: 6px 12px;
}
.cats button.on { background: #e8f2ff; color: #2f7cf6; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-top: 14px; }
.app-tile {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 4px;
  border-radius: 8px;
}
.app-tile:hover { background: rgba(255, 255, 255, 0.7); }
.app-tile i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.app-tile svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-tile b, .app-tile span { display: block; }
.app-tile b { margin-top: 8px; font-size: 14px; font-weight: 600; }
.app-tile span { margin-top: 2px; color: #98a2b3; font-size: 12px; }
@media (max-width: 960px) {
  .app { display: block; height: auto; }
  aside { width: 100%; height: auto; position: sticky; z-index: 2; }
  nav { flex-direction: row; }
  .workspace, main { height: auto; }
  .desk, .stats, .layout, .form-grid { grid-template-columns: 1fr; }
}
