:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18243a;
  background: #f4f7fb;
  --blue: #2667e8;
  --blue-dark: #174eb8;
  --line: #dce4f1;
  --muted: #66748b;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #eef4ff 0, #f7f9fc 300px); }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 10px; background: var(--blue); color: white; padding: .72rem 1rem; font-weight: 700; cursor: pointer; }
button:hover { background: var(--blue-dark); }
button.secondary { background: #edf2fb; color: #254066; }
button.danger { background: #fff0ef; color: var(--danger); }
input, select, textarea { width: 100%; margin-top: .38rem; border: 1px solid #bfcce0; border-radius: 10px; padding: .72rem .78rem; background: white; color: #18243a; }
input:focus, select:focus, textarea:focus { outline: 3px solid #cddfff; border-color: var(--blue); }
label { display: block; margin-bottom: 1rem; color: #334661; font-size: .93rem; font-weight: 650; }
h1, h2, h3, p { margin-top: 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.4rem; }
.hidden { display: none !important; }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #e6efff; font-size: 1.8rem; margin: 0 auto 1rem; }
.brand-mark.small { display: inline-grid; width: 34px; height: 34px; border-radius: 10px; margin: 0 .6rem 0 0; font-size: 1.1rem; }
.login-page { display: grid; place-items: center; padding: 1.25rem; }
.login-card { width: min(420px, 100%); background: white; border: 1px solid var(--line); border-radius: 20px; padding: 2rem; box-shadow: 0 20px 55px rgba(34, 70, 126, .13); }
.login-card h1, .login-card > p { text-align: center; }
.topbar { min-height: 68px; padding: .8rem clamp(1rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.topbar > div { display: flex; align-items: center; }
.top-actions { gap: .75rem; }
.sync-state { color: var(--muted); font-size: .85rem; }
.sync-state.online { color: #14733d; }
.layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(420px, 1fr); gap: 1.2rem; width: min(1180px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem; box-shadow: 0 10px 30px rgba(45, 71, 109, .07); }
.editor-panel { position: sticky; top: 88px; }
.account-panel { grid-column: 1; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field-grid.compact { grid-template-columns: 1fr 1fr; }
.check { display: flex; align-items: center; gap: .55rem; }
.check input { width: auto; margin: 0; }
.button-row, .event-actions, .section-heading { display: flex; gap: .6rem; align-items: center; }
.section-heading { justify-content: space-between; }
.section-heading p { margin-bottom: 0; }
.events-list { display: grid; gap: .8rem; }
.event-card { display: flex; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 13px; padding: 1rem; }
.event-card.status-completed { border-left-color: #1f8f50; opacity: .82; }
.event-card.status-cancelled { border-left-color: #a0aabc; opacity: .72; }
.event-card h3 { margin: .18rem 0 .45rem; }
.event-card p { white-space: pre-wrap; color: #4d5f78; }
.event-time { font-weight: 750; color: var(--blue-dark); font-size: .9rem; }
.event-meta { display: flex; gap: .45rem; flex-wrap: wrap; }
.event-meta span { border-radius: 999px; background: #eff4fc; color: #516682; padding: .25rem .55rem; font-size: .78rem; }
.event-actions { align-self: flex-start; }
.event-actions button { padding: .52rem .7rem; }
.empty { border: 2px dashed var(--line); border-radius: 14px; padding: 2rem; text-align: center; color: var(--muted); }
details summary { cursor: pointer; font-weight: 750; }
details form { margin-top: 1rem; }
@media (max-width: 850px) {
  .layout { grid-template-columns: 1fr; }
  .editor-panel { position: static; }
  .account-panel { grid-column: 1; }
  .top-actions #current-user { display: none; }
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .event-card { flex-direction: column; }
  .topbar { align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
}
