/* 後台版面：白色側邊欄＋淺灰內容區 */
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: #fff; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto;
}
.side .brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px 18px; }
.side .brand .name { font-weight: 600; font-size: 14px; line-height: 1.4; color: var(--ink); text-wrap: balance; }
.side .brand .sub { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.nav-group { font-size: 11.5px; color: var(--muted); padding: 16px 12px 6px; letter-spacing: .12em; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; margin: 1px 0; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; text-decoration: none; transition: background .12s, color .12s;
}
.nav a svg { color: #8a94a6; transition: color .12s; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a:hover svg { color: var(--ink-2); }
.nav a.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav a.on svg { color: var(--brand); }
.nav a .cnt {
  margin-left: auto; background: var(--red-bg); color: var(--red); font-size: 11.5px; font-weight: 600;
  border-radius: 999px; padding: 0 8px; line-height: 20px; min-width: 20px; text-align: center;
}
.side .foot { margin-top: auto; padding: 14px 12px 2px; border-top: 1px solid var(--line-2); font-size: 13px; }
.side .foot a { color: var(--muted); }
.side .foot a:hover { color: var(--brand); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 28px;
  background: rgba(246, 247, 250, .85); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 0 4px 0 6px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 600; border: 1px solid var(--brand-100);
}
.content { padding: 26px 28px 64px; max-width: 1360px; width: 100%; }
.menu-btn { display: none !important; }
.side-mask { display: none; }
a.card { color: inherit; text-decoration: none; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 200px; }
.day-head { display: flex; align-items: baseline; gap: 8px; padding: 11px 18px; background: #fbfcfd; border-bottom: 1px solid var(--line-2); font-weight: 600; font-size: 14px; }
.day-head:first-child { border-radius: 16px 16px 0 0; }
.day-head.today { background: var(--brand-50); color: var(--brand); }
.day-empty { padding: 9px 18px; color: #b3bac6; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.leave-row { display: flex; align-items: center; gap: 6px; padding: 7px 18px; font-size: 13px; color: var(--red); background: #fff8f8; border-bottom: 1px solid var(--line-2); }
.leave-row b { color: var(--ink); font-weight: 600; }
.member-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; max-height: 190px; overflow: auto; background: #fcfdfe; }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .22s ease; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .side-mask { display: block; position: fixed; inset: 0; background: rgba(27, 35, 51, .22); backdrop-filter: blur(2px); z-index: 80; }
  .menu-btn { display: inline-flex !important; }
  .content { padding: 18px 16px 48px; }
  .topbar { padding: 0 12px; }
  .topbar .who span:last-child { display: none; }
}
