/* =========================================================
   Enish Events — warm "sunset" nightlife theme
   ========================================================= */
:root {
  --bg: #fbf5f2;
  --surface: #ffffff;
  --surface-2: #f7eef3;
  --text: #24121f;
  --muted: #7a6271;
  --line: #ecdde5;
  --accent: #c2185b;          /* magenta */
  --accent-ink: #ffffff;
  --plum: #5b1a8a;
  --tangerine: #f0590e;
  --gold: #f7b733;
  --grad: linear-gradient(120deg, #4a1580 0%, #9c1a78 40%, #d81b60 68%, #f26a1b 100%);
  --grad-soft: linear-gradient(120deg, #f3e8ff 0%, #fde2ef 55%, #ffe8d6 100%);
  --grad-text: var(--grad);
  --weekend: color-mix(in srgb, #d81b60 4%, var(--surface));
  --danger: #b3122a;
  --shadow-sm: 0 2px 8px rgba(76, 20, 60, .08);
  --shadow: 0 14px 40px rgba(76, 20, 60, .16);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120a14;
    --surface: #1d111f;
    --surface-2: #29192c;
    --text: #f8ecf5;
    --muted: #b8a0b4;
    --line: #3a2639;
    --accent: #ff4f9a;
    --grad-soft: linear-gradient(120deg, #2a1640 0%, #3a1430 55%, #3d2015 100%);
    --grad-text: linear-gradient(120deg, #d9a6ff 0%, #ff7ab6 55%, #ffb36b 100%);
    --weekend: color-mix(in srgb, #ff4f9a 6%, var(--surface));
    --danger: #ff6b81;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow: 0 14px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 110% -10%, color-mix(in srgb, #f26a1b 10%, transparent), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, color-mix(in srgb, #7b1fa2 9%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 750; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
body:not(.is-admin) .admin-only { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 28px; background: var(--grad); color: #fff;
}
/* soft light blobs for depth */
.topbar::before, .topbar::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px);
}
.topbar::before { width: 340px; height: 340px; right: -80px; top: -200px; background: radial-gradient(circle, rgba(255, 210, 120, .45), transparent 65%); }
.topbar::after { width: 280px; height: 280px; left: 22%; bottom: -220px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); }
.topbar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #ffd27a, #ff8a3d 55%, #ff3d7f);
  color: #3a0b2c; font-weight: 800; font-size: 22px;
  box-shadow: 0 6px 18px rgba(60, 0, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.brand h1 { font-size: 22px; color: #fff; }
.brand .sub { margin: 0; color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 500; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar .btn {
  background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff;
  backdrop-filter: blur(6px);
}
.topbar .btn:hover { background: rgba(255, 255, 255, .26); }
.topbar .btn.primary {
  background: #fff; color: #9c1a78; border-color: #fff; font-weight: 700;
  box-shadow: 0 6px 18px rgba(40, 0, 30, .25);
}
.topbar .btn.primary:hover { background: #fff6fb; filter: none; transform: translateY(-1px); }
.topbar .btn:focus-visible { outline-color: #fff; }

/* ---------- buttons & inputs ---------- */
.btn {
  font: inherit; font-weight: 600; border-radius: 10px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: background-color .15s, transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, #d81b60 30%, transparent); }
.btn.primary:hover { filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.btn.icon { width: 38px; padding: 8px 0; font-size: 18px; line-height: 1; }
.btn.block { width: 100%; padding: 11px; }
.btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible,
.seg button:focus-visible, .pill:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
select, input, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%;
}
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
input[type="color"] { padding: 2px; height: 38px; width: 48px; }
.small-btn { margin-top: 8px; font-size: 13px; padding: 5px 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* ---------- sign-in ---------- */
.signin {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(255, 196, 90, .5), transparent 60%),
    radial-gradient(500px 400px at 10% 90%, rgba(255, 80, 150, .35), transparent 60%),
    var(--grad);
}
.signin-card {
  width: min(400px, 100%); background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 22px;
  padding: 32px; box-shadow: 0 30px 80px rgba(40, 0, 40, .45);
  display: flex; flex-direction: column; gap: 12px; backdrop-filter: blur(10px);
}
.signin-card h1 { font-size: 26px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.signin-card p { margin: 0; }
.signin-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- toolbar ---------- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 28px 10px;
}
.nav { display: flex; align-items: center; gap: 8px; }
.nav h2 {
  font-size: 26px; margin-left: 10px; font-weight: 800;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters select { width: auto; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.seg button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 6px 14px; cursor: pointer; border-radius: 9px; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: var(--shadow-sm); }

/* ---------- category legend ---------- */
.legend {
  display: flex; gap: 8px; padding: 4px 28px 16px; overflow-x: auto; scrollbar-width: none;
}
.legend::-webkit-scrollbar { display: none; }
.pill {
  --c: var(--accent);
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 6px 12px; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 10%, var(--surface));
  color: color-mix(in srgb, var(--c) 75%, var(--text));
  transition: transform .15s, background-color .15s, box-shadow .15s;
}
.pill:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.pill[aria-pressed="true"] { background: var(--c); color: #fff; border-color: var(--c); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.pill:first-child[aria-pressed="true"] { background: var(--grad); border-color: transparent; }

.view { padding: 0 28px 40px; }

/* ---------- month ---------- */
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.month .dow, .month .weeks { display: grid; grid-template-columns: repeat(7, 1fr); }
.month .dow { background: var(--grad-soft); }
.month .dow div { padding: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); }
.month .dow div:nth-child(n+5) { color: var(--accent); }
.month .cell {
  min-height: 120px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  cursor: pointer; position: relative; transition: background-color .15s, box-shadow .15s;
}
.month .weeks > .cell:nth-of-type(7n) { border-right: 0; }
.month .cell.weekend { background: var(--weekend); }
.month .cell.other { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.month .cell.other .num { color: var(--muted); opacity: .7; }
.month .cell.other .chip { opacity: .6; }
.month .cell:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.month .cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.month .num {
  font-size: 13px; font-weight: 700; align-self: flex-start; color: inherit;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center;
  transition: background-color .15s;
}
.month .cell.today .num { background: var(--grad); color: #fff; box-shadow: 0 4px 10px color-mix(in srgb, #d81b60 35%, transparent); }
.month .cell.selected {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 24px color-mix(in srgb, var(--accent) 25%, transparent);
  z-index: 1;
}
.month .cell.selected .num { background: var(--accent); color: #fff; }
.month .more { font-size: 12px; font-weight: 600; color: var(--accent); padding: 0 4px; }

/* event chips */
.chip {
  --c: var(--accent);
  display: flex; gap: 5px; align-items: center; width: 100%; min-width: 0;
  font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer;
  border: 0; border-left: 3px solid var(--c); border-radius: 7px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 24%, var(--surface)), color-mix(in srgb, var(--c) 9%, var(--surface)));
  color: color-mix(in srgb, var(--c) 55%, var(--text));
  padding: 3px 6px;
  transition: transform .12s, filter .12s;
}
.chip:hover { filter: saturate(1.3) brightness(1.02); transform: translateX(1px); }
.chip .e { flex: none; font-size: 12px; line-height: 1; }
.chip .t { color: var(--muted); font-weight: 500; flex: none; font-variant-numeric: tabular-nums; }
.chip .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.cancelled { filter: grayscale(.7); opacity: .65; }
.chip.cancelled .n { text-decoration: line-through; }
.chip.tentative {
  border-left-style: dashed;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0 6px, color-mix(in srgb, var(--c) 6%, var(--surface)) 6px 12px);
}
.month .chip.focused { outline: 2px solid var(--c); outline-offset: 1px; }
.vdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--v); margin-right: 5px; vertical-align: 1px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--v) 25%, transparent); }

/* ---------- expanded day ---------- */
.day-panel {
  grid-column: 1 / -1; position: relative;
  background: var(--grad-soft); border-bottom: 1px solid var(--line);
  padding: 20px 22px 22px; animation: panel-in .22s ease-out;
}
.day-panel::before {
  content: ""; position: absolute; top: -8px; width: 14px; height: 14px; transform: rotate(45deg);
  left: calc((var(--col) + .5) * (100% / 7) - 7px);
  background: var(--accent); border-radius: 3px 0 0 0;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.day-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.day-panel-head h3 { font-size: 20px; }
.day-panel-head p { margin: 2px 0 0; }
.day-panel-actions { display: flex; gap: 8px; }
.day-panel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.day-panel-empty { padding: 8px 0; }

.event-card {
  --c: var(--accent);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line));
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; cursor: auto;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.event-card.focused { box-shadow: 0 0 0 3px var(--c), var(--shadow); }
.card-band {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; color: #fff;
  background: linear-gradient(125deg, var(--c), color-mix(in srgb, var(--c) 72%, #fff));
}
.card-icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.card-head { min-width: 0; }
.card-cat { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.event-card h4 { font-size: 17px; color: #fff; line-height: 1.25; }
.event-card .badge { background: rgba(255, 255, 255, .25); color: #fff; }
.card-time { display: block; font-size: 13px; opacity: .95; margin-top: 2px; }
.card-time .vdot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.event-card.cancelled .card-band { filter: grayscale(.8); }
.event-card.cancelled h4 { text-decoration: line-through; }
.event-card.tentative .card-band { background: repeating-linear-gradient(135deg, var(--c) 0 12px, color-mix(in srgb, var(--c) 82%, #fff) 12px 24px); }
.card-body { padding: 10px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.event-card .detail-row { margin: 4px 0; font-size: 14px; }
.event-card .detail-row .k { width: 76px; }
.event-card .detail-desc { margin-top: 10px; padding-top: 10px; font-size: 14px; }
.event-card p.small { margin: 10px 0 0; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding: 4px 16px 16px; }
.card-actions .btn { padding: 5px 12px; font-size: 13px; }

/* ---------- week ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.week .day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 10px 10px; min-height: 280px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.week .day.weekend { background: var(--weekend); }
.week .day h4 {
  margin: 0 -10px 4px; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 700; background: var(--grad-soft);
}
.week .day h4 b { display: block; color: var(--text); font-size: 24px; letter-spacing: 0; }
.week .day.today { border-color: transparent; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.week .day.today h4 { background: var(--grad); color: rgba(255, 255, 255, .85); }
.week .day.today h4 b { color: #fff; }
.week .chip { display: grid; grid-template-columns: auto 1fr; padding: 7px 9px; gap: 2px 6px; align-items: center; }
.week .chip .e { grid-row: span 2; font-size: 18px; }
.week .chip .t { grid-column: 2; }
.week .chip .n { white-space: normal; grid-column: 2; }
.week .more { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 8px; padding: 6px; cursor: pointer; margin-top: auto; }
.week .more:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---------- list ---------- */
.list { display: flex; flex-direction: column; gap: 14px; max-width: 920px; }
.list-day { display: grid; grid-template-columns: 74px 1fr; gap: 16px; align-items: start; }
.date-tile {
  display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  position: sticky; top: 12px;
}
.dt-dow, .dt-mon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.dt-num { font-size: 28px; font-weight: 800; line-height: 1.1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.list-day.today .date-tile { background: var(--grad); border-color: transparent; }
.list-day.today .date-tile * { color: #fff; -webkit-text-fill-color: #fff; }
.list-items { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.list .item {
  --c: var(--accent);
  display: flex; gap: 14px; align-items: center; width: 100%;
  font: inherit; text-align: left; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.list .item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.item-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #fff));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent);
}
.list .what { min-width: 0; }
.list .what b { font-size: 16px; }
.list .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; margin-top: 3px; align-items: center; }
.list .when { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.list .item.cancelled { opacity: .6; }
.list .item.cancelled b { text-decoration: line-through; }
.cat-tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: color-mix(in srgb, var(--c) 70%, var(--text));
}
.empty {
  text-align: center; color: var(--muted); padding: 60px 20px; background: var(--grad-soft);
  border: 1px dashed color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--radius);
}

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: 2px; text-transform: capitalize; }
.badge.cancelled { background: color-mix(in srgb, var(--danger) 18%, var(--surface)); color: var(--danger); }
.badge.tentative { background: #ffe9a8; color: #6b4a00; }

/* ---------- dialogs ---------- */
.dlg {
  border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--surface); color: var(--text);
  width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(40, 0, 40, .35);
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
}
.dlg[open] { animation: dlg-in .18s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg h3[tabindex="-1"]:focus { outline: none; }
.dlg.wide { width: min(720px, calc(100vw - 32px)); }
.dlg.narrow { width: min(440px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(40, 10, 40, .5); backdrop-filter: blur(3px); }
.dlg h3 { font-size: 20px; margin-bottom: 14px; }
.dlg h4 { margin: 20px 0 6px; font-size: 14px; }
.dlg-actions { display: flex; gap: 8px; margin-top: 18px; align-items: center; }
.spacer { flex: 1; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid label, .dlg label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.grid .full { grid-column: 1 / -1; }
.grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.form-error { color: var(--danger); min-height: 1em; margin: 10px 0 0; font-size: 14px; }
#edit-title { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* event detail popup gets a colour band in its category colour */
#detail-dlg { padding-top: 0; }
.detail-band {
  display: flex; align-items: center; gap: 12px; margin: 0 -24px 16px; padding: 18px 24px; color: #fff;
  background: linear-gradient(125deg, var(--c), color-mix(in srgb, var(--c) 72%, #fff));
}
.detail-title { font-size: 22px; margin-bottom: 6px; }
.detail-row { display: flex; gap: 10px; margin: 8px 0; }
.detail-row .k { width: 92px; color: var(--muted); flex: none; font-size: 13px; font-weight: 600; padding-top: 1px; }
.detail-desc { white-space: pre-wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail-desc:empty { display: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }

.copy-row { display: flex; gap: 8px; }

/* ---------- sync dialog ---------- */
.sync-filter { margin: 14px 0 4px; }
.sync-filter select { width: auto; min-width: 200px; }
.sync-options { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.sync-option {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sync-option:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.sync-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sync-option b { display: block; font-size: 15px; }
.sync-option small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.sync-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--text);
}
.sync-more { margin: 6px 0 12px; }
.sync-more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.sync-more p { margin: 8px 0; }
.sync-notes { border-top: 1px solid var(--line); padding-top: 10px; }
.sync-notes p { margin: 6px 0; }

.check-row { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 15px !important; color: var(--text) !important; cursor: pointer; }
.check-row input { width: 18px; height: 18px; }

/* ---------- sign-in extras ---------- */
.link-btn { font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 2px; cursor: pointer; align-self: center; }
.link-btn:hover { text-decoration: underline; }
.form-ok { color: #15803d; margin: 0; font-size: 14px; }
.form-ok:empty { display: none; }

/* ---------- staff invites ---------- */
.invite-all {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--grad-soft);
}
.invite-all p { margin: 0; flex: 1 1 220px; }
.invite-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.invite-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
.invite-row.ok { background: color-mix(in srgb, #16a34a 8%, var(--surface)); }
.invite-row.manual { background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.invite-row .copy-row { margin-top: 6px; }
.invite-row input { font-size: 12px; padding: 6px 8px; }

/* ---------- venues & staff lists ---------- */
.venue-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.venue-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.venue-list li .grow { flex: 1; min-width: 0; }
.venue-list li .addr { color: var(--muted); font-size: 12px; }
.venue-form { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #2a1030; color: #fff; padding: 11px 18px; border-radius: 12px; opacity: 0; font-weight: 500;
  box-shadow: var(--shadow); border-left: 4px solid #ff4f9a;
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); z-index: 10;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.warn { background: #4a3000; border-left-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .topbar { padding: 16px; }
  .toolbar { padding: 14px 16px 8px; }
  .legend { padding: 2px 16px 12px; }
  .view { padding: 0 16px 28px; }
  .nav h2 { font-size: 20px; margin-left: 4px; }
  .month .cell { min-height: 78px; padding: 3px; }
  .month .chip .t { display: none; }
  .month .chip { font-size: 11px; padding: 2px 4px; }
  .week { grid-template-columns: 1fr; }
  .week .day { min-height: 0; }
  .list-day { grid-template-columns: 58px 1fr; gap: 10px; }
  .dt-num { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .day-panel { padding: 16px 12px 18px; }
  .day-panel-list { grid-template-columns: 1fr; }
  .day-panel-head h3 { font-size: 17px; }
  .day-panel-actions .btn { white-space: nowrap; }
  .month .more { font-size: 10px; padding: 0 2px; white-space: nowrap; }
  .venue-form { grid-template-columns: 1fr auto; }
}
@media (max-width: 520px) {
  .brand h1 { font-size: 19px; }
  .logo { width: 40px; height: 40px; font-size: 19px; }
  .top-actions .btn { padding: 7px 11px; font-size: 14px; }
  .month .dow div { padding: 8px 2px; text-align: center; font-size: 11px; letter-spacing: .02em; }
  .month .num { margin: 0 auto; }
  .month .chip .n, .month .chip .e { display: none; }
  .month .chip { height: 6px; padding: 0; border-left-width: 0; border-radius: 99px; background: var(--c); }
  .month .cell { min-height: 60px; gap: 2px; }
  .month .chip.focused { outline-width: 1px; }
  .month .more-word { display: none; }
  .month .more { text-align: center; }
}
