:root {
  --bg: #f7f3ef;
  --card: #ffffff;
  --text: #2d2926;
  --muted: #716963;
  --line: #e7ddd5;
  --primary: #4d3f38;
  --primary-soft: #efe6df;
  --danger: #a53535;
  --ok: #2f7a47;
  --warn: #a66a00;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; gap: 18px; backdrop-filter: blur(12px); }
.brand { font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.nav a:hover { background: var(--primary-soft); color: var(--text); }
.container { width: min(1180px, calc(100% - 32px)); margin: 24px auto 44px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: stretch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 10px 30px rgba(45,41,38,.06); }
.card h1, .card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.stat .number { font-size: 32px; font-weight: 800; }
.stat .label { color: var(--muted); font-size: 14px; }
form { display: grid; gap: 12px; }
label { font-size: 14px; color: var(--muted); display: grid; gap: 6px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: inherit; background: #fff; color: var(--text); }
textarea { min-height: 96px; resize: vertical; }
button, .button { border: 0; border-radius: 12px; padding: 11px 14px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .button:hover { filter: brightness(.95); }
button.secondary, .button.secondary { background: var(--primary-soft); color: var(--text); }
button.danger, .button.danger { background: var(--danger); }
button:disabled, .button.disabled { background: #ddd; color: #777; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 700; background: #faf7f4; }
tr:last-child td { border-bottom: 0; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--line); background: #fff; }
.alert-success { border-color: #b9dfc5; color: var(--ok); background: #f0fbf3; }
.alert-error { border-color: #e7b9b9; color: var(--danger); background: #fff1f1; }
.alert-info { border-color: #d8cabc; color: var(--primary); background: #fffaf6; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eee; color: #555; white-space: nowrap; }
.badge-ok { background: #e8f6ed; color: var(--ok); }
.badge-danger { background: #fff0f0; color: var(--danger); }
.badge-warn { background: #fff4df; color: var(--warn); }
.badge-neutral { background: #eee8e2; color: #5d544e; }
.session-card { display: grid; gap: 10px; }
.session-card.full { opacity: .76; }
.session-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.small { color: var(--muted); font-size: 13px; }
.login { min-height: calc(100vh - 100px); display: grid; place-items: center; }
.login .card { width: min(440px, 100%); }
.month-controls { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.mobile-list { display: grid; gap: 12px; }
.notice-list { display: grid; gap: 8px; }
.notice { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
@media (max-width: 900px) {
  .hero, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .container { width: min(100% - 20px, 1180px); margin-top: 14px; }
  .card { padding: 16px; }
  .nav { justify-content: flex-start; }
  .nav a { background: var(--primary-soft); color: var(--text); }
  table { min-width: 660px; }
}
@media (max-width: 560px) {
  .actions { flex-direction: column; align-items: stretch; }
  button, .button { width: 100%; }
  .session-title { flex-direction: column; }
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
