/* ── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f4f6fb;
  --surface:   #ffffff;
  --border:    #dde1ea;
  --text:      #1e2433;
  --muted:     #8a93a8;
  --primary:   #4f86c6;
  --primary-h: #3a6fad;
  --danger:    #e05c5c;
  --danger-h:  #c94040;
  --today-bg:  #eef4ff;
  --other-month: #f8f9fc;
  --shadow:    0 4px 20px rgba(0,0,0,.10);
  --radius:    10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── Header ───────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
button { cursor: pointer; font-family: inherit; border: none; transition: background .15s, color .15s; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-h); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 7px;
  font-size: .9rem;
}
.btn-secondary:hover { background: var(--bg); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
}
.btn-danger:hover { background: var(--danger-h); }

/* ── View toggle ──────────────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  background: var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.view-btn {
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  font-size: .85rem;
  font-weight: 600;
}
.view-btn.active {
  background: var(--surface);
  color: var(--primary);
}

/* ── Calendar nav ─────────────────────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.cal-nav button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  width: 36px; height: 36px;
  font-size: 1.4rem;
  color: var(--text);
  line-height: 1;
}
.cal-nav button:hover { background: var(--bg); }

#cal-title {
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 220px;
  text-align: center;
}

/* ── Month grid ───────────────────────────────────────────────────────── */
#calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.day-header {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.day-cell {
  min-height: 100px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: background .1s;
}
.day-cell:nth-child(7n) { border-right: none; }
.day-cell:hover { background: var(--bg); }
.day-cell.other-month { background: var(--other-month); }
.day-cell.today { background: var(--today-bg); }
.day-cell.today .day-num { background: var(--primary); color: #fff; }

.day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 2px;
}

/* ── Week grid ────────────────────────────────────────────────────────── */
.week-grid {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
}

.week-day-header {
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.week-day-header:last-child { border-right: none; }
.week-day-header .wdh-name {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.week-day-header .wdh-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: .95rem;
  font-weight: 700;
  margin-top: 2px;
}
.week-day-header.today .wdh-num {
  background: var(--primary);
  color: #fff;
}

.time-col { border-right: 1px solid var(--border); }
.time-slot {
  height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 3px 6px 0 0;
  font-size: .7rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.week-day-col {
  border-right: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}
.week-day-col:last-child { border-right: none; }
.week-day-col:hover { background: var(--bg); }

.week-hour-row {
  height: 48px;
  border-bottom: 1px solid var(--border);
}

/* ── Event chips ──────────────────────────────────────────────────────── */
.event-chip {
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  margin: 2px 1px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter .1s;
}
.event-chip:hover { filter: brightness(1.15); }

.event-chip-week {
  position: absolute;
  left: 2px; right: 2px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.event-chip-week:hover { filter: brightness(1.15); }

/* ── Modal ────────────────────────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
#modal-overlay.hidden { display: none; }

#modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h3 { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: none;
  font-size: 1.5rem;
  color: var(--muted);
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

/* ── Form ─────────────────────────────────────────────────────────────── */
.form-row { margin-bottom: 14px; }

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.req { color: var(--danger); }

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 11px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
textarea { resize: vertical; }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

/* ── Color picker ─────────────────────────────────────────────────────── */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0;
}
.color-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform .12s, border-color .12s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: var(--text); }

/* ── Interval row ─────────────────────────────────────────────────────── */
.interval-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.interval-row input { width: 70px; }
#rec-unit-label { font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* ── Modal actions ────────────────────────────────────────────────────── */
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-actions-right { display: flex; gap: 8px; }

/* ── Utilities ────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.muted  { color: var(--muted); font-size: .85rem; }

/* ── Login page ───────────────────────────────────────────────────────── */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}
.login-logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  color: var(--text);
}
.login-form { display: flex; flex-direction: column; gap: 4px; }
.btn-block   { width: 100%; margin-top: 8px; padding: 10px; font-size: 1rem; }

/* ── Flash messages ───────────────────────────────────────────────────── */
.flash-msg {
  padding: 11px 16px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.flash-success { background: #d4edda; color: #1a5c2a; border: 1px solid #b8dfc5; }
.flash-error   { background: #fde8e8; color: #7a1c1c; border: 1px solid #f5c6c6; }

/* ── Header user info ─────────────────────────────────────────────────── */
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.user-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.username-label { font-size: .88rem; font-weight: 600; color: var(--text); }
.btn-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.btn-sm:hover { background: var(--bg); }

/* ── Group visibility selector ────────────────────────────────────────── */
.groups-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.group-check { display: flex; align-items: center; cursor: pointer; }
.group-check input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.group-badge-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  background: #ccc;
  background: var(--gc, #ccc);
  border: 2px solid transparent;
  transition: color .12s, border-color .12s;
  user-select: none;
}
.group-check input:checked + .group-badge-pill {
  color: #fff;
  border-color: rgba(0,0,0,.25);
}
.group-check input:not(:checked) + .group-badge-pill { filter: saturate(.35) brightness(1.1); }
.group-check:hover .group-badge-pill { filter: none; color: #fff; }

.form-hint { font-size: .75rem; color: var(--muted); margin-top: 5px; display: block; }

/* ── Admin panel ──────────────────────────────────────────────────────── */
.logo-link { color: inherit; text-decoration: none; }
.logo-link:hover { text-decoration: underline; }
.header-sep { color: var(--muted); margin: 0 4px; font-weight: 300; }

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.admin-tab {
  padding: 10px 22px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .12s, border-color .12s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.admin-form-card,
.admin-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.admin-form-card h3,
.admin-list-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 6px;
}

.form-actions { display: flex; gap: 8px; margin-top: 18px; }
.form-actions a { text-decoration: none; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.color-input { width: 60px; height: 38px; padding: 2px; cursor: pointer; border-radius: 7px; }

/* ── Data table ───────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg); }
.data-table tr.current-row td { background: var(--today-bg); }

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.inline-form  { display: inline; }

.btn-sm-danger {
  background: var(--danger);
  color: #fff;
  border: none;
}
.btn-sm-danger:hover { background: var(--danger-h); }

.group-badge-sm {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.you-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: .68rem;
  color: var(--muted);
  font-weight: 600;
  margin-left: 5px;
  vertical-align: middle;
}
.role-admin { color: var(--danger); font-weight: 700; font-size: .82rem; }

/* ── List view ────────────────────────────────────────────────────────── */
.list-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.list-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}

.list-day { border-bottom: 1px solid var(--border); }
.list-day:last-child { border-bottom: none; }

.list-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.list-day-name {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  min-width: 28px;
}

.list-day-date {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}

.list-day-today .list-day-date {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
}

.list-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid var(--border);
}
.list-event-item:last-child { border-bottom: none; }
.list-event-item:hover { background: var(--bg); }

.list-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.list-event-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.list-event-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-event-time {
  font-size: .78rem;
  color: var(--muted);
}

/* ── Event detail overlay ─────────────────────────────────────────────── */
#detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
#detail-overlay.hidden { display: none; }

#detail-modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 460px;
  padding: 24px;
}

.detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.detail-title-wrap h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#detail-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.detail-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  align-items: flex-start;
}
.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  min-width: 72px;
  padding-top: 2px;
  flex-shrink: 0;
}

.detail-value { color: var(--text); }
.detail-desc .detail-value { white-space: pre-wrap; word-break: break-word; }

/* ── Backup section ───────────────────────────────────────────────────── */
.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.backup-desc {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 11px;
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
}
input[type="file"]:hover { border-color: var(--primary); }

/* ── Batch create modal ───────────────────────────────────────────────── */
#batch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
#batch-overlay.hidden { display: none; }

#batch-modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
}

.batch-color-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform .12s, border-color .12s;
}
.batch-color-dot:hover { transform: scale(1.15); }
.batch-color-dot.selected { border-color: var(--text); }

.batch-mini-cal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.batch-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 700;
}
.batch-cal-nav button {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.batch-cal-nav button:hover { color: var(--primary); }

.batch-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 4px;
  gap: 2px;
}

.batch-day-hdr {
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  padding: 4px 0;
}

.batch-day {
  text-align: center;
  padding: 6px 2px;
  font-size: .82rem;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background .1s;
}
.batch-day:hover:not(.batch-selected) { background: var(--bg); }
.batch-other   { color: var(--muted); }
.batch-today   { font-weight: 700; color: var(--primary); }
.batch-selected {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 700;
}

.batch-selected-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
}

.batch-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 9px;
  background: var(--today-bg);
  border: 1px solid var(--primary);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
}

.batch-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: none;
  border: none;
  font-size: .85rem;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: .7;
  font-family: inherit;
}
.batch-pill-remove:hover { opacity: 1; background: rgba(79,134,198,.15); }

/* ── Past events toggle ───────────────────────────────────────────────── */
.cal-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.btn-toggle-past {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.btn-toggle-past:hover { background: var(--bg); color: var(--text); }
.btn-toggle-past.active { color: var(--primary); border-color: var(--primary); }

.btn-toggle-past-inline {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}
.btn-toggle-past-inline:hover { background: var(--bg); }

.event-chip-past     { opacity: .55; }
.event-chip-week.event-chip-past { opacity: .55; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .backup-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  header h1 { font-size: 1.2rem; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .day-cell { min-height: 70px; }
}
@media (max-width: 767px) {
  #btn-month, #btn-week { display: none; }
}
