:root {
  color-scheme: light;
  font-family: "Plus Jakarta Sans", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8ff;
  color: #0b1730;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100dvh; margin: 0; background: #f7f8ff; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(79, 70, 229, .3); outline-offset: 2px; }
.app { max-width: 760px; min-height: 100dvh; margin: auto; padding: env(safe-area-inset-top) 16px calc(92px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; margin: 0 -16px 8px; padding: 0 16px; background: rgba(247,248,255,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 8; }
.brand, .row, .nav, .title-row, .alert-row, .metadata, .header-actions { display: flex; align-items: center; }
.brand { gap: 10px; text-decoration: none; color: inherit; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 7px 16px rgba(67,56,217,.2); }
.brand strong { display: block; font-size: 1.45rem; letter-spacing: -.05em; line-height: 1; }
.brand small { color: #59627b; font-size: .72rem; font-weight: 700; }
.icon-button, .back-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #4b556d; display: grid; place-items: center; font-size: 1.35rem; }
.icon-button:hover, .back-button:hover { background: #e8edfc; color: #171b37; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: linear-gradient(135deg,#f6c8ad,#71463b); color: white; display: grid; place-items: center; font-size: .76rem; font-weight: 800; }
.segmented { display: flex; gap: 3px; padding: 5px; border-radius: 999px; background: #e4eafb; box-shadow: inset 0 1px 2px rgba(70,75,130,.06); }
.segmented button { min-height: 42px; flex: 1; border: 0; border-radius: 999px; padding: 0 14px; background: transparent; color: #59627b; font-weight: 700; }
.segmented button.active { background: #fff; color: #4338d9; box-shadow: 0 2px 8px rgba(29,37,82,.08); }
.search-row { display: flex; gap: 10px; margin: 20px 0 14px; }
.search { flex: 1; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border-radius: 15px; background: #edf1fc; color: #65708a; }
.search input { width: 100%; border: 0; background: transparent; color: #0b1730; outline: 0; }
.filter-button { width: 52px; border: 0; border-radius: 15px; background: #edf1fc; color: #202947; font-size: 1.25rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chip { white-space: nowrap; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #edf1fc; color: #576079; font-weight: 700; }
.chip.active { background: #102038; color: #fff; box-shadow: 0 5px 12px rgba(16,32,56,.16); }
.chip .count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 4px; padding: 0 5px; border-radius: 99px; background: rgba(255,255,255,.18); font-size: .66rem; }
.section { margin: 19px 0 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 11px; color: #3d4660; font-size: .83rem; font-weight: 800; letter-spacing: .075em; }
.section-count { padding: 4px 10px; border-radius: 99px; background: #e4eafb; color: #59627b; font-size: .7rem; letter-spacing: 0; }
.event-card { position: relative; overflow: hidden; margin-bottom: 12px; padding: 18px 16px 17px 24px; border-radius: 17px; background: #fff; box-shadow: 0 4px 17px rgba(26,37,75,.06); }
.event-card::before { position: absolute; content: ""; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent, #4f46e5); }
.event-card.high { --accent: #e11d48; }
.event-card.finance { --accent: #64748b; }
.event-card .card-top { display: flex; align-items: flex-start; gap: 12px; }
.complete-ring { flex: 0 0 auto; width: 35px; height: 35px; padding: 0; border: 0; border-radius: 50%; background: #dce8ff; color: transparent; font-weight: 900; }
.complete-ring.done { background: #4f46e5; color: white; }
.card-main { min-width: 0; flex: 1; }
.badges { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 22px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 99px; background: #e8edfd; color: #4338d9; font-size: .67rem; font-weight: 800; }
.badge.high { background: #ffe0e0; color: #b4232b; }
.badge.personal { background: #ffe1e6; color: #a21639; }
.badge.finance { background: #dfe6f8; color: #263754; }
.event-card h3 { max-width: 270px; margin: 6px 0 8px; overflow: hidden; color: #07142b; font-size: 1.24rem; line-height: 1.22; letter-spacing: -.042em; text-overflow: ellipsis; white-space: nowrap; }
.metadata { flex-wrap: wrap; gap: 8px 16px; color: #647089; font-size: .9rem; }
.metadata strong { color: #111b33; }
.edit-icon-button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid #dce3f6; border-radius: 10px; background: #f8f9ff; color: #4338d9; font-size: 1.15rem; font-weight: 800; line-height: 1; }
.edit-icon-button:hover { border-color: #b8c4ff; background: #ecefff; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0 47px; }
.alert-chip { padding: 7px 9px; border-radius: 10px; background: #eff3fd; color: #53607b; font-size: .7rem; font-weight: 700; }
.alert-chip.active { background: #dce6ff; color: #382ac9; }
.alert-list { display: grid; gap: 10px; }
.alert-list-item { display: flex; align-items: stretch; gap: 13px; padding: 14px; border-radius: 17px; border-left: 5px solid #4f46e5; background: #fff; box-shadow: 0 4px 17px rgba(26,37,75,.06); }
.alert-list-item.high { border-left-color: #e11d48; }
.alert-list-time { flex: 0 0 66px; display: grid; align-content: center; gap: 3px; padding-right: 12px; border-right: 1px solid #e7ebf6; color: #5d6881; font-size: .7rem; text-align: center; }
.alert-list-time strong { color: #101a32; font-size: 1rem; letter-spacing: -.03em; }
.alert-list-body { min-width: 0; flex: 1; }
.alert-list-body h3 { margin: 6px 0 4px; overflow: hidden; color: #0b1730; font-size: 1rem; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.alert-list-body p { margin: 0; color: #69748a; font-size: .74rem; line-height: 1.35; }
.alert-offset { padding: 4px 8px; border-radius: 99px; background: #edf1fc; color: #4d5a76; font-size: .66rem; font-weight: 800; }
.alert-view { align-self: center; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #eef2ff; color: #4030da; font-size: 1.5rem; font-weight: 800; text-decoration: none; }
.fab { position: fixed; right: max(23px, calc((100vw - 760px) / 2 + 22px)); bottom: calc(83px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border: 0; border-radius: 50%; background: #3929dc; color: #fff; box-shadow: 0 12px 25px rgba(57,41,220,.35); font-size: 2rem; line-height: 1; }
.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 8; display: flex; justify-content: center; padding: 5px max(8px, calc((100vw - 760px) / 2)) env(safe-area-inset-bottom); background: rgba(250,251,255,.92); box-shadow: 0 -2px 14px rgba(43,52,88,.04); backdrop-filter: blur(18px); }
.bottom-nav nav { width: min(760px, 100%); display: flex; justify-content: space-around; }
.nav-link { min-width: 61px; min-height: 59px; border: 0; background: transparent; color: #4d5870; display: grid; place-items: center; gap: 1px; font-size: .65rem; font-weight: 700; }
.nav-link .nav-icon { font-size: 1.55rem; line-height: 1; }
.nav-link.active { color: #3828db; }
.calendar { margin-top: 16px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 4px 17px rgba(26,37,75,.06); }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 800; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday, .calendar-day { display: grid; min-height: 37px; place-items: center; font-size: .76rem; }
.weekday { min-height: 24px; color: #788199; font-weight: 800; }
.calendar-day { position: relative; border: 0; border-radius: 50%; background: transparent; color: #19233a; }
.calendar-day.today { background: #4338d9; color: #fff; font-weight: 800; }
.calendar-day.has-event::after { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: #f43f5e; content: ""; }
.calendar-day.today::after { background: #fff; }
.page-title { margin: 15px 0 21px; font-size: 1.6rem; letter-spacing: -.05em; }
.form-card, .settings-card { margin: 14px 0; padding: 17px; border-radius: 18px; background: #fff; box-shadow: 0 3px 14px rgba(26,37,75,.05); }
.form-label { display: block; margin: 0 0 7px 2px; color: #525d74; font-size: .67rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.field { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid transparent; border-radius: 13px; background: #eef2fd; color: #111b33; font-size: 1rem; }
.field:focus { border-color: #4f46e5; }
textarea.field { min-height: 98px; resize: vertical; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.category-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.category-option { padding: 9px 14px; border: 0; border-radius: 999px; background: #edf1fc; color: #34405a; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.category-option.selected { background: #102038; color: #fff; }
.schedule-card { margin: 15px 0; padding: 17px; border-radius: 18px; background: linear-gradient(140deg,#e4eaff,#eef2ff); box-shadow: 0 4px 16px rgba(51,65,130,.09); }
.schedule-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; }
.schedule-heading strong { font-size: .87rem; letter-spacing: .035em; text-transform: uppercase; }
.schedule-heading small { display: block; margin-top: 3px; color: #59647d; }
.alert-editor { display: flex; gap: 9px; align-items: center; margin: 8px 0; padding: 10px; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(48,58,118,.08); }
.alert-editor .accent { width: 5px; height: 40px; border-radius: 10px; background: #4f46e5; }
.alert-editor:nth-child(3n) .accent { background: #e11d48; }
.alert-editor select { min-width: 0; flex: 1; border: 0; background: transparent; color: #19243d; font-size: .82rem; font-weight: 700; outline: 0; }
.alert-editor small { color: #5e6881; font-size: .67rem; }
.remove-alert { width: 33px; height: 33px; border: 0; border-radius: 9px; background: transparent; color: #e11d48; font-size: 1.1rem; }
.add-alert { width: 100%; min-height: 47px; margin-top: 9px; border: 0; border-radius: 13px; background: #fff; color: #4030da; font-weight: 800; }
.preset-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.preset { border: 1px solid #dce4fb; border-radius: 99px; background: #fff; color: #37425e; padding: 7px 10px; font-size: .7rem; font-weight: 700; }
.primary-button, .secondary-button, .danger-button { min-height: 52px; border: 0; border-radius: 13px; padding: 0 17px; font-weight: 800; }
.primary-button { width: 100%; background: #3d2cdb; color: #fff; box-shadow: 0 8px 16px rgba(61,44,219,.22); }
.secondary-button { background: #e8edfc; color: #2b3970; }
.danger-button { background: #ffe5e6; color: #bc2630; }
.editor-actions { display: flex; gap: 10px; margin-top: 20px; }
.editor-actions .primary-button { flex: 1; }
.detail-hero { padding: 6px 7px 21px; text-align: center; }
.detail-icon { width: 66px; height: 66px; margin: 8px auto 15px; border-radius: 23px; display: grid; place-items: center; background: #e7edff; color: #3e2dde; font-size: 2rem; }
.detail-hero h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.06em; }
.detail-hero p { color: #69748a; }
.timeline { position: relative; margin: 8px 0; padding: 0 0 0 30px; }
.timeline::before { position: absolute; top: 16px; bottom: 18px; left: 9px; width: 2px; background: #dbe3fa; content: ""; }
.timeline-item { position: relative; margin: 12px 0; padding: 14px; border-radius: 14px; background: #eef2fd; }
.timeline-item::before { position: absolute; left: -26px; top: 18px; width: 12px; height: 12px; border: 4px solid #f7f8ff; border-radius: 50%; background: #4f46e5; content: ""; }
.timeline-item.sent::before { background: #8b99ad; }
.timeline-item strong { display: block; font-size: .88rem; }
.timeline-item small { color: #69748a; }
.empty { padding: 44px 22px; border-radius: 18px; background: #fff; color: #647089; text-align: center; box-shadow: 0 3px 14px rgba(26,37,75,.05); }
.empty .empty-icon { display: block; margin-bottom: 10px; font-size: 2rem; }
.history-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef1f8; }
.history-item:last-child { border: 0; }
.history-item .history-state { width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; background: #e6edff; color: #4534da; font-size: .85rem; }
.history-item strong, .history-item small { display: block; }
.history-item small { margin-top: 2px; color: #717b91; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 92px; width: max-content; max-width: calc(100% - 34px); padding: 12px 15px; border-radius: 12px; background: #122039; color: #fff; box-shadow: 0 10px 25px rgba(10,18,37,.22); opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .2s ease; font-size: .82rem; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.muted { color: #6d7890; }
.install-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; padding: 11px 13px; border-radius: 13px; background: #e5eaff; color: #34415f; font-size: .75rem; font-weight: 700; }
.install-banner button { border: 0; border-radius: 9px; background: #4338d9; color: #fff; padding: 8px 10px; font-weight: 800; }
.auth-page { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 86% 7%, #dfe7ff 0, transparent 31%), #f7f8ff; }
.auth-card { width: min(100%, 410px); padding: 32px 24px 25px; border: 1px solid rgba(224,230,249,.8); border-radius: 25px; background: rgba(255,255,255,.9); box-shadow: 0 20px 50px rgba(41,48,106,.11); }
.auth-mark { display: block; width: 60px; height: 60px; margin: 0 auto 19px; border-radius: 19px; box-shadow: 0 10px 20px rgba(67,56,217,.21); }
.auth-card h1 { margin: 5px 0 8px; color: #0a1730; font-size: 1.8rem; line-height: 1.1; letter-spacing: -.06em; text-align: center; }
.auth-card > .muted { margin: 0 0 23px; text-align: center; font-size: .84rem; line-height: 1.55; }
.eyebrow { margin: 0; color: #4f46e5; font-size: .69rem; font-weight: 800; letter-spacing: .12em; text-align: center; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border: 1px solid #dce3f6; border-radius: 13px; background: #fff; color: #1e2b45; font-weight: 800; }
.google-button:hover { background: #f7f9ff; }
.google-button span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: conic-gradient(from 35deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0); font-size: .67rem; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.auth-divider { display: flex; align-items: center; gap: 11px; margin: 20px 0; color: #8490a7; font-size: .68rem; font-weight: 700; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: #e7ebf6; content: ""; }
.auth-switch { display: flex; justify-content: center; gap: 7px; margin: 20px 0 0; color: #6e7890; font-size: .74rem; }
.auth-switch button { border: 0; padding: 0; background: transparent; color: #4338d9; font-weight: 800; }
.auth-loading { display: grid; place-items: center; min-height: 210px; color: #68738b; font-size: .85rem; font-weight: 700; }
@media (min-width: 700px) {
  .app { padding-right: 28px; padding-left: 28px; }
  .topbar { margin-right: -28px; margin-left: -28px; padding-right: 28px; padding-left: 28px; }
  .event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .event-card { margin-bottom: 0; }
  .event-card h3 { max-width: 100%; }
  .form-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .form-layout > .span-all { grid-column: 1 / -1; }
}
