* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6fa; color: #2d3436; }

/* ===== 登录页 ===== */
#app[hidden] { display: none; }
.login-mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px;
  background-color: #f6efe3;
  background-image: radial-gradient(rgba(193, 122, 60, .10) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
  font-family: -apple-system, "PingFang SC", "Songti SC", "STSong", "Microsoft YaHei", sans-serif;
}
.login-mask[hidden] { display: none; }
.login-card { width: 100%; max-width: 330px; text-align: center; }
.login-week { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 6px 16px; margin-bottom: 22px;
  border-bottom: 2px solid #2e2a26; }
.login-week span { font-size: 17px; font-weight: 600; color: #2e2a26; line-height: 1; }
.login-week span.wk { color: #c17a3c; }
.login-week span.dot { position: relative; }
.login-week span.dot::after { content: ""; position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #c17a3c; }
.login-title { font-size: 40px; font-weight: 800; letter-spacing: 6px; color: #2e2a26; margin: 4px 0 8px; padding-left: 6px; }
.login-sub { font-size: 13px; color: #8a7d6b; letter-spacing: 1px; margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { width: 100%; padding: 15px 16px; font-size: 16px; color: #2e2a26;
  background: #fffdf8; border: 1.5px solid #e0d3bd; border-radius: 12px; text-align: center; letter-spacing: 2px; }
.login-form input::placeholder { color: #b6a890; letter-spacing: 1px; }
.login-form input:focus { outline: none; border-color: #c17a3c; background: #fff; }
.login-form button { width: 100%; padding: 15px; font-size: 16px; font-weight: 600; letter-spacing: 4px; padding-left: 4px;
  border: none; border-radius: 12px; background: #2e2a26; color: #f6efe3; cursor: pointer; transition: transform .08s ease; }
.login-form button:active { transform: scale(.98); background: #c17a3c; }
.login-err { margin-top: 14px; color: #c0563f; font-size: 13px; letter-spacing: 1px; }
@media (prefers-reduced-motion: reduce) { .login-form button { transition: none; } }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid #e1e4e8; flex-wrap: wrap; gap: 8px; }
.topbar button { padding: 6px 12px; margin: 0 2px; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; }
.topbar button:hover { background: #f0f3f6; }
.title h1 { font-size: 18px; }
.stats { font-size: 13px; color: #636e72; margin-top: 4px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 12px; overflow-x: auto; min-height: 70vh; }
.day-col { background: #fff; border-radius: 8px; padding: 8px; min-width: 130px; display: flex; flex-direction: column; }
.day-head { font-weight: 600; text-align: center; padding-bottom: 8px; border-bottom: 1px solid #eee; margin-bottom: 8px; }
.day-head .date { font-weight: 400; font-size: 12px; color: #95a5a6; display: block; }
.day-col.today .day-head { color: #0984e3; }
.card { border-radius: 6px; padding: 8px; margin-bottom: 6px; color: #fff; cursor: pointer; font-size: 13px; line-height: 1.4; }
.card .time { font-weight: 700; }
.card .meta { font-size: 12px; opacity: .92; }
.card.st-done { opacity: .55; }
.card.st-done::after { content: " ✓"; }
.card.st-leave, .card.st-cancel { opacity: .5; text-decoration: line-through; }
.add-btn { margin-top: auto; padding: 6px; border: 1px dashed #b2bec3; border-radius: 6px; background: none; color: #636e72; cursor: pointer; }
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal-mask[hidden] { display: none; }
.modal { background: #fff; border-radius: 10px; padding: 20px; width: 340px; max-height: 85vh; overflow-y: auto; }
.modal.wide { width: 460px; }
.modal h3 { margin-bottom: 12px; }
.modal h4 { margin: 14px 0 8px; }
.modal label { display: block; margin-bottom: 8px; font-size: 14px; }
.modal label input, .modal label select { width: 100%; padding: 6px; margin-top: 4px; border: 1px solid #d0d7de; border-radius: 6px; }
.modal-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.modal-actions button { padding: 7px 14px; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; cursor: pointer; }
.modal-actions .danger { border-color: #e17055; color: #d63031; }
.row-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.row-item button { padding: 3px 8px; font-size: 12px; margin-left: 4px; }

/* ===== 手机自适应 ===== */
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px; }
  .topbar .nav, .topbar .manage { display: flex; justify-content: space-between; }
  .topbar .title { text-align: center; order: -1; }
  .topbar button { flex: 1; padding: 10px 4px; font-size: 15px; }
  .title h1 { font-size: 17px; }
  .stats { font-size: 13px; }

  /* 7 列改为纵向单日列表 */
  .grid { display: flex; flex-direction: column; gap: 10px; padding: 10px; min-height: 0; }
  .day-col { min-width: 0; }
  .day-head { display: flex; justify-content: space-between; align-items: baseline; text-align: left; }
  .day-head .date { display: inline; margin-left: 6px; }
  .day-col.today { box-shadow: 0 0 0 2px #0984e3 inset; }
  .card { font-size: 14px; padding: 10px; }

  .modal { width: calc(100vw - 24px); max-width: 460px; padding: 16px; }
  .modal-actions button { flex: 1; padding: 11px 8px; font-size: 15px; }
}
