
:root {
  --bg: #0b0f14;
  --card: #131a22;
  --text: #e7eef7;
  --muted: rgba(231,238,247,0.65);
  --line: rgba(231,238,247,0.12);
  --btn: #243141;
  --danger: #c0392b;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

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

.brand { font-weight: 700; letter-spacing: 0.3px; }
.clock { font-variant-numeric: tabular-nums; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.link { padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; opacity: 0.9; }



.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  min-height: calc(100vh - 76px);
  overflow: hidden;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}

.muted { color: var(--muted); margin-bottom: 8px; }
.small { font-size: 12px; line-height: 1.35; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

.btn {
  background: var(--btn);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover { opacity: 0.9; }
.btn.block { width: 100%; }
.btn.danger { background: rgba(192,57,43,0.2); border-color: rgba(192,57,43,0.5); }

.input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}
.form-row .btn { grid-column: span 2; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.item-left { display: flex; align-items: flex-start; gap: 10px; }
.check {
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(231,238,247,0.35);
  cursor: pointer;
  flex: 0 0 auto;
  margin-top: 2px;
}
.check.done { background: rgba(46, 204, 113, 0.25); border-color: rgba(46, 204, 113, 0.7); }
.item-title { font-weight: 650; line-height: 1.25; }
.item-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.item-actions { display: flex; gap: 6px; }
.pill {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.fold summary { cursor: pointer; margin: 8px 0 10px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
}

.tile-title { font-weight: 700; }
.tile-days { margin-top: 6px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-sub { margin-top: 4px; color: var(--muted); font-size: 12px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.modal.hidden { display: none; }
.modal-card {
  width: min(580px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.modal-card.wide { width: min(860px, 100%); }
.modal-title { font-weight: 800; margin-bottom: 10px; }
.modal-text { font-size: 16px; line-height: 1.5; margin-bottom: 12px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tab {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.tab.active { color: var(--text); background: rgba(255,255,255,0.06); }
.tab-pane.hidden { display: none; }

.login-body { display:flex; align-items:center; justify-content:center; padding: 20px; }
.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.flash {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(192,57,43,0.6);
  border-radius: 12px;
  background: rgba(192,57,43,0.15);
  color: rgba(255,255,255,0.95);
}


}


.full-width { margin: 14px; }
.layout-2{
  padding: 0 14px 14px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.full-row{ grid-column: 1 / span 2; }
.row-actions{ display:flex; gap:8px; align-items:center; }

/* iPad/电脑强制两列；只有更小屏幕才单列 */
/* 只有手机才单列，iPad 永远两列 */
@media (max-width: 520px) {
  .layout-2{ grid-template-columns: 1fr; }
  .full-row{ grid-column: auto; }
}


/* 让卡片高度更紧凑，减少浪费空间 */
.card{ min-height: auto !important; }

/* 倒数日高亮 */
.cd-tile.urgent{
  border-color: rgba(255, 210, 64, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 210, 64, 0.18) inset;
}
