:root {
  --ink: #242a38;
  --muted: #7c8291;
  --line: #e8e5de;
  --canvas: #e9e5f6;
  --card: #fdfcff;
  --indigo: #5b5bd6;
  --indigo-dark: #4848bd;
  --green: #3a9b72;
  --green-soft: #e1f3ea;
  --red: #dc6570;
  --red-soft: #fae7e8;
  --blue: #4a86d8;
  --blue-soft: #e5eefb;
  --shadow: 0 16px 50px rgba(42, 43, 57, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); background-image: radial-gradient(circle at 82% 4%, rgba(126, 104, 220, .3), transparent 31%), radial-gradient(circle at 38% 88%, rgba(83, 181, 143, .16), transparent 27%), linear-gradient(135deg, #eeeaf9 0%, #e4e0f2 100%); background-attachment: fixed; font-family: "DM Sans", sans-serif; -webkit-font-smoothing: antialiased; }
body[data-theme-style="beachy"] { --indigo: #168c96; --indigo-dark: #0f747d; --canvas: #f4e7cf; background-image: radial-gradient(circle at 82% 4%, rgba(43,174,181,.28), transparent 32%), radial-gradient(circle at 15% 90%, rgba(244,153,103,.22), transparent 28%), linear-gradient(135deg, #fff4df, #dff4ef); }
body[data-theme-style="beachy"] .sidebar { background: linear-gradient(165deg, #176c78, #168c96 55%, #2fa79a); }
body[data-theme-style="beachy"] .calendar-toolbar, body[data-theme-style="beachy"] .mobile-header { background: linear-gradient(100deg, #167a86, #35a99b); }
body[data-theme-style="beachy"] .page-topbar::before { background: linear-gradient(180deg, #168c96, #f2996f); }
body[data-theme-style="lavender"] { --indigo: #8066c9; --indigo-dark: #684daf; --canvas: #eee8f8; background-image: radial-gradient(circle at 80% 5%, rgba(170,133,224,.3), transparent 32%), radial-gradient(circle at 15% 90%, rgba(225,173,214,.2), transparent 27%), linear-gradient(135deg, #f6f0ff, #e7def4); }
body[data-theme-style="lavender"] .sidebar { background: linear-gradient(165deg, #49376f, #7457a7 55%, #9a72b4); }
body[data-theme-style="lavender"] .calendar-toolbar, body[data-theme-style="lavender"] .mobile-header { background: linear-gradient(100deg, #68509d, #9a72c2); }
body[data-theme-style="forest"] { --indigo: #39785a; --indigo-dark: #285e43; --canvas: #e5ecdf; background-image: radial-gradient(circle at 82% 4%, rgba(72,137,92,.26), transparent 32%), radial-gradient(circle at 18% 88%, rgba(178,143,83,.18), transparent 28%), linear-gradient(135deg, #edf2e8, #dce7d7); }
body[data-theme-style="forest"] .sidebar { background: linear-gradient(165deg, #233f35, #35644d 55%, #52795c); }
body[data-theme-style="forest"] .calendar-toolbar, body[data-theme-style="forest"] .mobile-header { background: linear-gradient(100deg, #315f49, #5c8463); }
body[data-theme-style="sunset"] { --indigo: #d26465; --indigo-dark: #b84d54; --canvas: #f5e3dc; background-image: radial-gradient(circle at 82% 3%, rgba(229,127,94,.31), transparent 33%), radial-gradient(circle at 15% 90%, rgba(126,91,169,.18), transparent 28%), linear-gradient(135deg, #fff0e5, #eedbdc); }
body[data-theme-style="sunset"] .sidebar { background: linear-gradient(165deg, #713e5d, #a34f64 53%, #d17368); }
body[data-theme-style="sunset"] .calendar-toolbar, body[data-theme-style="sunset"] .mobile-header { background: linear-gradient(100deg, #a64f61, #df7869); }
body[data-theme-style="minimal"] { --indigo: #45536a; --indigo-dark: #303c50; --canvas: #eceff2; background-image: linear-gradient(135deg, #f4f5f6, #e4e8eb); }
body[data-theme-style="minimal"] .sidebar { background: linear-gradient(165deg, #263140, #3b4859); }
body[data-theme-style="minimal"] .calendar-toolbar, body[data-theme-style="minimal"] .mobile-header { background: linear-gradient(100deg, #374457, #596679); }
body[data-theme-style="minimal"] .calendar-card, body[data-theme-style="minimal"] .event-modal { border-radius: 10px; box-shadow: 0 12px 35px rgba(35,42,52,.11); }
body[data-theme-mode="dark"] { --ink: #edf0f7; --muted: #a2a9b8; --line: #394153; --canvas: #151925; --card: #202634; color-scheme: dark; background-image: radial-gradient(circle at 82% 4%, rgba(87,82,176,.22), transparent 31%), linear-gradient(135deg, #111521, #202536); }
body[data-theme-mode="dark"] .calendar-card, body[data-theme-mode="dark"] .event-modal, body[data-theme-mode="dark"] .auth-card { background: #202634; border-color: #3b4356; }
body[data-theme-mode="dark"] .calendar-day { background: #202634; border-color: #394153; }
body[data-theme-mode="dark"] .calendar-day:nth-child(7n+1), body[data-theme-mode="dark"] .calendar-day:nth-child(7n), body[data-theme-mode="dark"] .calendar-day.other-month { background: #191f2b; }
body[data-theme-mode="dark"] .calendar-day.is-today { background: #2a3047; }
body[data-theme-mode="dark"] .weekday-row { background: #292f40; border-color: #41495c; }
body[data-theme-mode="dark"] .field input, body[data-theme-mode="dark"] .field select, body[data-theme-mode="dark"] .field textarea, body[data-theme-mode="dark"] .custom-reminder input, body[data-theme-mode="dark"] .custom-reminder select { color: var(--ink); background: #171d29; border-color: #3d4557; }
body[data-theme-mode="dark"] .agenda-event, body[data-theme-mode="dark"] .event-type-row, body[data-theme-mode="dark"] .member-row, body[data-theme-mode="dark"] .search-result, body[data-theme-mode="dark"] .missed-reminder-row { color: var(--ink); background: #282f3f; }
body[data-theme-mode="dark"] .custom-reminder, body[data-theme-mode="dark"] .reminder-hint, body[data-theme-mode="dark"] .read-only-note { background: #282e40; border-color: #40485c; }
body[data-theme-mode="dark"][data-theme-style="beachy"] { background-image: radial-gradient(circle at 80% 4%, rgba(35,160,164,.23), transparent 32%), linear-gradient(135deg, #102126, #172f34); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; overflow-y: auto; overscroll-behavior: contain; width: 250px; display: flex; flex-direction: column; padding: 30px 22px 24px; color: #fff; background: linear-gradient(165deg, #34316f 0%, #5045a3 53%, #6655bb 100%); border-right: 0; box-shadow: 12px 0 40px rgba(48, 42, 105, .18); scrollbar-color: rgba(255,255,255,.3) transparent; scrollbar-width: thin; z-index: 20; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 800 20px/1 "Manrope", sans-serif; letter-spacing: -.7px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #4d439d; background: #fff; border-radius: 12px; box-shadow: 0 7px 18px rgba(25,22,72,.25); }
.brand-mark svg { width: 25px; height: 25px; }
.primary-button, .secondary-button, .today-button, .delete-button { border: 0; border-radius: 11px; padding: 12px 18px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--indigo); box-shadow: 0 7px 18px rgba(91,91,214,.2); }
.primary-button:hover { background: var(--indigo-dark); transform: translateY(-1px); }
.primary-button svg { width: 18px; height: 18px; stroke-width: 2.4; }
.add-event-button { width: 100%; margin: 36px 0 25px; }
.main-nav { display: grid; gap: 6px; }
.nav-calendar-row { display: grid; grid-template-columns: minmax(0,1fr) 38px; gap: 6px; }
.calendar-add-button { display: grid; place-items: center; padding: 0; color: rgba(255,255,255,.82); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; font-size: 22px; line-height: 1; cursor: pointer; }
.calendar-add-button:hover { color: #fff; background: rgba(255,255,255,.22); }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 13px; color: rgba(255,255,255,.7); background: none; border: 0; border-radius: 10px; font-weight: 600; text-align: left; cursor: pointer; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.nav-item svg { width: 20px; height: 20px; }
.nav-badge { min-width: 20px; margin-left: auto; padding: 2px 6px; color: #4b3470; background: #fff; border-radius: 999px; font-size: 9px; font-weight: 800; text-align: center; }
.sidebar-section { margin-top: 28px; padding: 22px 11px 0; border-top: 1px solid rgba(255,255,255,.17); }
.sidebar-label, .eyebrow { margin: 0 0 14px; color: #a2a4ae; font-size: 11px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.sidebar-label { color: rgba(255,255,255,.52); }
.type-label { margin-top: 18px; }
.calendar-switcher-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; }
.calendar-switcher-row select { min-width: 0; height: 36px; padding: 0 8px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 11px; outline: none; }
.calendar-switcher-row select option { color: var(--ink); background: #fff; }
.calendar-switcher-row button { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 19px; cursor: pointer; }
.calendar-visibility { display: grid; gap: 2px; margin-top: 8px; }
.visibility-option { display: flex; align-items: center; gap: 7px; padding: 3px 4px; color: rgba(255,255,255,.68); font-size: 10px; cursor: pointer; }
.visibility-option input { width: 13px; height: 13px; accent-color: #b9acf7; }
.visibility-all { color: rgba(255,255,255,.88); font-weight: 700; }
.calendar-filter { display: flex; align-items: center; gap: 8px; margin: 2px 0; padding: 5px 6px; color: rgba(255,255,255,.8); border-radius: 8px; font-size: 11px; cursor: pointer; transition: .2s ease; }
.calendar-filter:hover { color: #fff; background: rgba(255,255,255,.1); }
.calendar-filter input { flex: 0 0 auto; width: 14px; height: 14px; margin: 0; accent-color: #c4b9ff; cursor: pointer; }
.calendar-filter:has(input:not(:checked)) { opacity: .35; }
.category-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.category-dot.vacation { background: var(--green); }
.category-dot.appointment { background: var(--red); }
.category-dot.other { background: var(--blue); }
.notification-card { flex: 0 0 auto; display: flex; gap: 11px; margin-top: auto; padding: 14px; color: #373267; background: linear-gradient(135deg, #f4edff, #fbeaf4); border: 1px solid rgba(255,255,255,.4); border-radius: 13px; box-shadow: 0 12px 28px rgba(29,25,75,.17); }
.notification-icon { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; color: var(--indigo); background: #e8e6f8; border-radius: 9px; }
.notification-icon svg { width: 17px; }
.notification-card strong { font-size: 12px; }
.notification-card p { margin: 3px 0 7px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.notification-card button { padding: 0; color: var(--indigo); background: none; border: 0; font-size: 11px; font-weight: 700; cursor: pointer; }
.user-panel { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; margin-top: 12px; padding: 12px 4px 0; border-top: 1px solid rgba(255,255,255,.16); }
.user-avatar { display: grid; place-items: center; width: 31px; height: 31px; color: #4d439d; background: #fff; border-radius: 9px; font-size: 12px; font-weight: 800; }
.user-panel strong { overflow: hidden; display: block; color: #fff; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-panel div > span { display: block; padding-top: 2px; color: rgba(255,255,255,.55); font-size: 9px; }
.user-panel div button { padding: 2px 0 0; color: rgba(255,255,255,.62); background: none; border: 0; font-size: 9px; cursor: pointer; }
.logout-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: rgba(255,255,255,.65); background: none; border: 0; cursor: pointer; }
.logout-button:hover { color: #fff; }
.logout-button svg { width: 16px; }

.calendar-page { grid-column: 2; min-width: 0; padding: 42px clamp(28px, 4vw, 65px) 70px; }
.mobile-header { display: none; }
.page-topbar { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-left: 12px; }
.page-topbar::before { position: absolute; inset: 2px auto 2px 0; width: 5px; background: linear-gradient(180deg, var(--indigo), #9a7dde); border-radius: 5px; content: ""; }
.page-topbar .eyebrow { margin-bottom: 4px; color: var(--indigo); }
.calendar-title-row { display: flex; align-items: center; gap: 7px; }
.calendar-title-row h1 { line-height: 1.08; }
.calendar-title-row .top-search-button { flex: 0 0 auto; width: 33px; height: 33px; }
h1, h2 { margin: 0; font-family: "Manrope", sans-serif; letter-spacing: -.8px; }
h1 { font-size: clamp(28px, 3vw, 38px); }
h2 { font-size: 22px; }
.topbar-actions { align-self: flex-start; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.view-switcher { display: flex; padding: 4px; background: rgba(70, 60, 133, .14); border: 1px solid rgba(91, 78, 157, .12); border-radius: 11px; }
.view-switcher button { padding: 7px 13px; color: var(--muted); background: none; border: 0; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.view-switcher button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(25,28,37,.08); }
.mobile-view-select { display: none; }
.mobile-view-select { position: relative; }
.mobile-view-select select { height: 38px; min-width: 108px; padding: 0 31px 0 11px; color: #57516f; background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.28); border-radius: 10px; outline: none; appearance: none; font-size: 11px; font-weight: 700; }
.mobile-view-select svg { position: absolute; top: 10px; right: 8px; width: 17px; pointer-events: none; }
.today-button, .secondary-button { color: #58526f; background: rgba(255,255,255,.72); border: 1px solid rgba(88,76,151,.18); backdrop-filter: blur(8px); }
.today-button:hover, .secondary-button:hover { border-color: #c9c5bd; }
.compact-add { padding: 11px 16px; }
.calendar-card { overflow: hidden; background: var(--card); border: 1px solid #d4cbea; border-radius: 18px; box-shadow: 0 20px 55px rgba(64, 51, 124, .16); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; color: #fff; background: linear-gradient(100deg, #51489c, #7463c6); border-bottom: 0; }
.calendar-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.month-navigation { display: flex; align-items: center; gap: 7px; }
.month-navigation h2 { min-width: 185px; margin-left: 8px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #676d7a; background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.icon-button:hover { color: var(--indigo); background: #f5f4fb; }
.calendar-toolbar .icon-button { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.24); }
.calendar-toolbar .icon-button:hover { color: #403778; background: #fff; }
.calendar-toolbar .legend { color: rgba(255,255,255,.78); }
.calendar-toolbar .view-switcher { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
.calendar-toolbar .view-switcher button { color: rgba(255,255,255,.76); }
.calendar-toolbar .view-switcher button.active { color: #403778; background: #fff; }
.calendar-toolbar .today-button { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); backdrop-filter: none; }
.calendar-toolbar .today-button:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.calendar-toolbar .category-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.34); }
.icon-button svg { width: 18px; height: 18px; }
.legend { display: flex; align-items: center; gap: 17px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { background: #e9e4f7; border-bottom: 1px solid #d8d1ea; }
.weekday-row span { padding: 13px 11px; color: #6f668c; font-size: 10px; font-weight: 800; letter-spacing: .8px; text-align: center; text-transform: uppercase; }
.calendar-day { position: relative; min-width: 0; min-height: 112px; padding: 10px 8px 7px; background: #fdfcff; border: 0; border-right: 1px solid #e2ddef; border-bottom: 1px solid #e2ddef; text-align: left; cursor: pointer; }
.calendar-day:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--indigo) 24%, transparent); }
.repeat-delete-modal { width: min(460px, calc(100vw - 28px)); }
.repeat-delete-modal > p { margin: 0 0 22px; color: var(--muted); }
.repeat-delete-actions { display: flex; justify-content: flex-end; gap: 8px; }
.event-all-day { margin: 2px 0 14px; }
.event-date-row .field { min-width: 0; }
.event-date-row.all-day .event-time-field { display: none; }
.calendar-day:nth-child(7n+1), .calendar-day:nth-child(7n) { background: #f5f1fb; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-day.other-month { background: #eeeaf5; }
.calendar-day.other-month .day-number { color: #c9c8c3; }
.calendar-day.is-today { background: #e8e2fb; box-shadow: inset 0 0 0 2px rgba(91,91,214,.18); }
.day-number { display: grid; place-items: center; width: 27px; height: 27px; margin: 0 0 5px 2px; color: #616674; font-size: 12px; font-weight: 700; border-radius: 50%; }
.is-today .day-number { color: white; background: var(--indigo); }
.day-events { display: grid; gap: 4px; }
.event-pill { overflow: hidden; display: block; width: 100%; padding: 5px 7px; border: 0; border-left: 3px solid; border-radius: 5px; font-size: 10px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.event-pill.vacation { color: #247555; background: var(--green-soft); border-color: var(--green); }
.event-pill.appointment { color: #aa414b; background: var(--red-soft); border-color: var(--red); }
.event-pill.other { color: #326cae; background: var(--blue-soft); border-color: var(--blue); }
.event-pill.dynamic-event { color: color-mix(in srgb, var(--event-color) 72%, #18202c); background: color-mix(in srgb, var(--event-color) 14%, white); border-color: var(--event-color); }
.more-events { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.agenda-view { padding: 10px 24px 25px; }
.range-view { padding: 10px 24px 25px; }
.range-view[hidden] { display: none; }
.range-day { min-height: 90px; }
.empty-day { width: 100%; padding: 13px; color: var(--muted); background: #f8f7fb; border: 1px dashed #d5d0e2; border-radius: 9px; font-size: 11px; text-align: left; cursor: pointer; }
.empty-day span { float: right; color: var(--indigo); font-weight: 700; }
.agenda-day { display: grid; grid-template-columns: 105px 1fr; gap: 20px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.agenda-day:last-child { border: 0; }
.agenda-date strong, .agenda-date span { display: block; }
.agenda-date strong { font-size: 14px; }
.agenda-date span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.agenda-items { display: grid; gap: 8px; }
.agenda-event { display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: #f8f7f4; border: 0; border-radius: 9px; text-align: left; cursor: pointer; }
.agenda-event i { width: 4px; height: 28px; border-radius: 5px; background: var(--event-color); }
.agenda-event span { color: var(--muted); font-size: 12px; }
.agenda-event strong { display: block; font-size: 13px; }

.up-next { margin-top: 35px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 15px; }
.section-heading .eyebrow { margin-bottom: 5px; color: var(--indigo); }
.section-heading h2 { font-size: 20px; }
.section-heading button { color: var(--indigo); background: none; border: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.upcoming-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.upcoming-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 13px; min-width: 0; padding: 14px; background: linear-gradient(135deg, #f8f5ff, #ebe5fb); border: 1px solid #d6cdec; border-radius: 13px; cursor: pointer; transition: .2s ease; }
.upcoming-card:has(.date-tile.vacation) { background: linear-gradient(135deg, #eef9f4, #dff2e9); border-color: #c5e4d5; }
.upcoming-card:has(.date-tile.appointment) { background: linear-gradient(135deg, #fff3f4, #f9e0e3); border-color: #f0c9cd; }
.upcoming-card:has(.date-tile.other) { background: linear-gradient(135deg, #f0f6ff, #dfeafb); border-color: #c9daf2; }
.upcoming-card::after { position: absolute; inset: 0 0 0 auto; width: 3px; background: linear-gradient(180deg, #8c75e8, #5b5bd6); content: ""; }
.upcoming-card:hover { transform: translateY(-2px); box-shadow: 0 9px 25px rgba(42,43,57,.07); }
.upcoming-card.dynamic-card { background: color-mix(in srgb, var(--event-color) 11%, white); border-color: color-mix(in srgb, var(--event-color) 28%, white); }
.upcoming-card.dynamic-card::after { background: var(--event-color); }
.date-tile { flex: 0 0 auto; display: grid; place-items: center; width: 45px; height: 48px; border-radius: 10px; }
.date-tile strong { font: 800 18px/1 "Manrope"; }
.date-tile span { font-size: 9px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.date-tile.vacation { color: #247555; background: var(--green-soft); }
.date-tile.appointment { color: #aa414b; background: var(--red-soft); }
.date-tile.other { color: #326cae; background: var(--blue-soft); }
.date-tile.dynamic-date { color: color-mix(in srgb, var(--event-color) 75%, #18202c); background: color-mix(in srgb, var(--event-color) 18%, white); }
.upcoming-info { min-width: 0; }
.upcoming-info strong { overflow: hidden; display: block; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-info span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.empty-state { grid-column: 1 / -1; padding: 34px; color: #706987; background: rgba(255,255,255,.58); border: 1px dashed #bfb4db; border-radius: 13px; text-align: center; }

.mobile-fab { display: none; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(31,33,43,.45); backdrop-filter: blur(4px); z-index: 100; }
.modal-backdrop[hidden] { display: none; }
.event-modal { overflow-y: auto; width: min(540px, 100%); max-height: calc(100vh - 40px); padding: 26px; background: linear-gradient(145deg, #fff, #f5f1ff); border: 1px solid #ddd4f0; border-radius: 20px; box-shadow: 0 30px 80px rgba(36,29,80,.3); }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 23px; }
.modal-header .eyebrow { margin-bottom: 5px; color: var(--indigo); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field > span, .category-picker legend { color: #666b78; font-size: 12px; font-weight: 700; }
.field em { color: #a5a6ad; font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; color: var(--ink); background: #faf9f7; border: 1px solid #dfdcd5; border-radius: 10px; outline: none; }
.field input, .field select { height: 44px; padding: 0 12px; }
.field textarea { resize: vertical; padding: 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(91,91,214,.1); }
.custom-reminder { margin: -3px 0 16px; padding: 14px; background: linear-gradient(135deg, #f5f2ff, #faf7ff); border: 1px solid #dfd9f1; border-radius: 12px; box-shadow: inset 3px 0 0 var(--indigo); }
.custom-reminder[hidden] { display: none; }
.custom-reminder-heading { margin-bottom: 11px; }
.custom-reminder-heading span { display: block; color: #55506d; font-size: 12px; font-weight: 800; }
.custom-reminder-heading small { display: block; margin-top: 3px; color: #8a859b; font-size: 10px; }
.custom-reminder-controls { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 8px; }
.custom-reminder input, .custom-reminder select { height: 40px; padding: 0 10px; color: var(--ink); background: #fff; border: 1px solid #d9d5e7; border-radius: 9px; outline: none; }
.custom-reminder input:focus, .custom-reminder select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(91,91,214,.1); }
.custom-reminder strong { color: #77738b; font-size: 12px; }
.custom-reminder-time { display: grid; grid-template-columns: auto 125px 1fr; align-items: center; gap: 9px; margin-top: 10px; color: #77738b; font-size: 12px; font-weight: 700; }
.custom-reminder-time[hidden] { display: none; }
.custom-reminder-time small { color: #9792a5; font-size: 10px; font-weight: 500; }
.category-picker { display: flex; gap: 8px; margin: 1px 0 16px; padding: 0; border: 0; }
.category-picker legend { margin-bottom: 8px; }
.color-choice input { position: absolute; opacity: 0; }
.color-choice span { display: flex; align-items: center; gap: 7px; padding: 9px 12px; color: var(--muted); background: #faf9f7; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.color-choice i { width: 9px; height: 9px; border-radius: 50%; }
.color-choice.vacation i { background: var(--green); }
.color-choice.appointment i { background: var(--red); }
.color-choice.other i { background: var(--blue); }
.color-choice input:checked + span { color: var(--ink); border-color: currentColor; box-shadow: 0 2px 7px rgba(25,28,37,.07); }
.color-choice.vacation input:checked + span { color: var(--green); background: var(--green-soft); }
.color-choice.appointment input:checked + span { color: var(--red); background: var(--red-soft); }
.color-choice.other input:checked + span { color: var(--blue); background: var(--blue-soft); }
.reminder-hint { margin: -5px 0 16px; padding: 9px 11px; color: #6b6982; background: #f4f2fa; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 7px; }
.modal-actions span { flex: 1; }
.event-details { display: grid; gap: 18px; }
.event-details[hidden] { display: none; }
.event-details-heading { display: flex; align-items: center; gap: 12px; padding: 16px; background: rgba(91,91,214,.06); border: 1px solid var(--line); border-radius: 13px; }
.event-details-heading .type-swatch { flex: 0 0 auto; width: 16px; height: 16px; }
.event-details-heading h3 { margin: 0; font: 800 18px/1.25 "Manrope",sans-serif; }
.event-details-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.event-detail-notes { min-height: 95px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.event-detail-notes > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.event-detail-notes p { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.55; }
.event-detail-actions { display: flex; justify-content: flex-end; gap: 9px; }
.event-detail-actions > span { flex: 1; }
.delete-button { padding-left: 0; color: var(--red); background: transparent; }
.toast { position: fixed; left: 50%; bottom: 25px; opacity: 0; pointer-events: none; z-index: 150; transform: translate(-50%, 15px); padding: 11px 18px; color: white; background: #303442; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sketch-field { margin-bottom: 15px; }
.photo-field { display: grid; gap: 8px; margin-bottom: 15px; }
.photo-field > span { color: #666b78; font-size: 12px; font-weight: 700; }
.photo-field em { color: #a5a6ad; font-style: normal; font-weight: 400; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-picker { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 12px; color: var(--indigo); background: color-mix(in srgb, var(--indigo) 6%, var(--card)); border: 1px dashed color-mix(in srgb, var(--indigo) 42%, var(--line)); border-radius: 10px; font-size: 11px; font-weight: 700; cursor: pointer; }
.photo-picker:hover { background: color-mix(in srgb, var(--indigo) 10%, var(--card)); }
.photo-picker svg { width: 19px; }
.photo-field:focus-within .photo-picker { outline: 3px solid rgba(91,91,214,.18); }
.photo-field.read-only .photo-picker { display: none; }
.photo-preview { position: relative; overflow: hidden; width: 100%; max-height: 280px; background: #171a23; border-radius: 11px; }
.photo-preview[hidden] { display: none; }
.photo-preview img { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.photo-preview button { position: absolute; top: 9px; right: 9px; padding: 6px 9px; color: #fff; background: rgba(22,24,31,.75); border: 1px solid rgba(255,255,255,.22); border-radius: 7px; font-size: 9px; font-weight: 700; cursor: pointer; backdrop-filter: blur(5px); }
.photo-field.read-only .photo-preview button { display: none; }
.sketch-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sketch-heading span { color: #666b78; font-size: 12px; font-weight: 700; }
.sketch-heading em { color: #a5a6ad; font-style: normal; font-weight: 400; }
.sketch-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.sketch-tools { display: flex; gap: 5px; }
.sketch-tools button { padding: 4px 7px; color: var(--indigo); background: transparent; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
#eventSketch { display: block; width: 100%; height: 160px; touch-action: none; background-color: #fff; background-image: linear-gradient(#edf0f6 1px, transparent 1px), linear-gradient(90deg, #edf0f6 1px, transparent 1px); background-size: 20px 20px; border: 1px solid #d9d5e1; border-radius: 11px; cursor: crosshair; }

.todo-page[hidden] { display: none; }
.todo-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 10px 12px 0; }
.todo-hero .eyebrow { margin-bottom: 4px; color: var(--indigo); }
.todo-hero p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.todo-card { overflow: hidden; padding: 24px; background: var(--card); border: 1px solid #d4cbea; border-radius: 18px; box-shadow: var(--shadow); }
.todo-form { margin-bottom: 22px; padding: 18px; background: color-mix(in srgb, var(--indigo) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--indigo) 20%, var(--line)); border-radius: 13px; }
.todo-form[hidden] { display: none; }
.todo-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.todo-summary { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 13px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.todo-summary button { color: var(--indigo); background: none; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.todo-list { display: grid; }
.todo-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.todo-row:last-child { border-bottom: 0; }
.todo-check { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--indigo); cursor: pointer; }
.todo-copy strong { display: block; font-size: 13px; line-height: 1.4; }
.todo-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.todo-photo { display: block; width: min(220px, 100%); max-height: 140px; margin-top: 9px; object-fit: cover; border-radius: 9px; }
.todo-row.completed .todo-copy { opacity: .55; }
.todo-row.completed .todo-copy strong { text-decoration: line-through; }
.todo-actions { display: flex; gap: 3px; }
.todo-actions button { padding: 5px; color: var(--muted); background: none; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.todo-actions button:last-child { color: var(--red); }
.todo-empty { padding: 52px 20px; color: var(--muted); text-align: center; }
.todo-empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 14px; }
.history-page[hidden], .history-panel[hidden] { display: none; }
.history-hero { margin-bottom: 18px; padding: 10px 12px 0; }
.history-hero .eyebrow { margin-bottom: 4px; color: var(--indigo); }
.history-hero p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.history-card { overflow: hidden; padding: 24px; background: var(--card); border: 1px solid #d4cbea; border-radius: 18px; box-shadow: var(--shadow); }
.history-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.history-tabs button { padding: 9px 13px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 750; cursor: pointer; }
.history-tabs button.active { color: var(--indigo); background: color-mix(in srgb, var(--indigo) 8%, var(--card)); border-color: color-mix(in srgb, var(--indigo) 18%, var(--line)); }
.history-panel { display: grid; gap: 8px; }
.completed-range { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-bottom: 12px; }
.completed-range span { margin-right: 3px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.completed-range button { padding: 7px 10px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 700; cursor: pointer; }
.completed-range button.active { color: #fff; background: var(--indigo); border-color: var(--indigo); }
.completed-history-list { display: grid; gap: 8px; }
.history-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; background: color-mix(in srgb, var(--card) 88%, var(--canvas)); border: 1px solid var(--line); border-radius: 11px; }
.history-row-marker { display: grid; place-items: center; width: 30px; height: 30px; color: var(--indigo); background: color-mix(in srgb, var(--indigo) 10%, var(--card)); border-radius: 9px; font-weight: 800; }
.history-row-copy strong, .history-row-copy span { display: block; }
.history-row-copy strong { font-size: 12px; }
.history-row-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.history-row-action { padding: 7px 9px; color: var(--indigo); background: transparent; border: 0; font-size: 10px; font-weight: 750; cursor: pointer; }
.history-event { width: 100%; color: inherit; text-align: left; cursor: pointer; }
.history-event .history-row-marker { color: #fff; background: var(--event-color); }
.history-empty { padding: 48px 20px; color: var(--muted); text-align: center; }
.history-empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 14px; }
.history-empty.compact { padding: 22px 15px 6px; }
.event-progress-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) minmax(210px, .65fr); align-items: center; gap: clamp(24px, 6vw, 70px); min-height: 330px; padding: clamp(27px, 5vw, 54px); color: #fff; background: radial-gradient(circle at 85% 18%, rgba(255,255,255,.2), transparent 25%), linear-gradient(135deg, #29285d 0%, #51469a 54%, #6d5bb0 100%); border-radius: 20px; box-shadow: 0 20px 45px rgba(51,43,113,.2); }
.event-progress-card::before { position: absolute; right: -70px; bottom: -100px; width: 260px; height: 260px; content: ""; border: 45px solid rgba(255,255,255,.045); border-radius: 50%; }
.event-progress-copy { position: relative; z-index: 1; }
.event-progress-copy .eyebrow { margin-bottom: 8px; color: rgba(255,255,255,.62); }
.event-progress-copy h3 { margin: 0; color: #fff; font: 800 clamp(23px, 3vw, 34px)/1.15 "Manrope", sans-serif; letter-spacing: -.7px; }
.event-progress-copy > p:not(.eyebrow) { max-width: 470px; margin: 11px 0 25px; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.65; }
.event-progress-legend { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.event-progress-legend > button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 13px 14px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); border-radius: 12px; text-align: left; cursor: pointer; backdrop-filter: blur(8px); transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.event-progress-legend > button:hover, .event-progress-legend > button.active { background: rgba(255,255,255,.17); border-color: rgba(255,255,255,.38); transform: translateY(-2px); }
.event-progress-legend i { width: 9px; height: 9px; border-radius: 50%; }
.event-progress-legend i.completed { background: #63dfba; box-shadow: 0 0 0 4px rgba(99,223,186,.13); }
.event-progress-legend i.missed { background: #ff8e98; box-shadow: 0 0 0 4px rgba(255,142,152,.13); }
.event-progress-legend span { color: rgba(255,255,255,.72); font-size: 10px; font-weight: 700; }
.event-progress-legend strong { font-size: 20px; }
.event-progress-legend small { grid-column: 2 / -1; color: rgba(255,255,255,.55); font-size: 9px; }
.event-progress-chart { position: relative; z-index: 1; display: grid; place-items: center; width: min(235px, 100%); aspect-ratio: 1; justify-self: center; padding: 20px; background: conic-gradient(#63dfba calc(var(--completed-percent) * 1%), #ff8e98 0); border-radius: 50%; box-shadow: 0 20px 45px rgba(15,14,48,.3), inset 0 0 0 1px rgba(255,255,255,.22); }
.event-progress-chart.empty { background: conic-gradient(rgba(255,255,255,.18) 0 100%); }
.event-progress-chart::after { position: absolute; inset: 25px; content: ""; background: #393473; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: inset 0 10px 28px rgba(11,10,39,.2); }
.event-progress-chart > div { position: relative; z-index: 1; text-align: center; }
.event-progress-chart strong, .event-progress-chart span { display: block; }
.event-progress-chart strong { font: 800 clamp(34px, 5vw, 50px)/1 "Manrope", sans-serif; letter-spacing: -2px; }
.event-progress-chart span { margin-top: 7px; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.event-progress-results { margin-top: 8px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; }
.event-progress-results[hidden] { display: none; }
.event-progress-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.event-progress-results-heading .eyebrow { margin-bottom: 3px; color: var(--indigo); }
.event-progress-results-heading h3 { margin: 0; font: 800 16px/1.3 "Manrope", sans-serif; }
.event-progress-results-heading button { padding: 6px 8px; color: var(--muted); background: transparent; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.event-progress-actions { display: flex; align-items: center; gap: 4px; }
.event-progress-actions [data-clear-completed-events] { color: #b64652; }
.event-progress-results-list { display: grid; gap: 8px; }
body[data-theme-mode="dark"] .todo-card, body[data-theme-mode="dark"] .todo-form { background: #202634; border-color: #3b4356; }
body[data-theme-mode="dark"] .history-card { background: #202634; border-color: #3b4356; }
body[data-theme-mode="dark"] #eventSketch { background-color: #171d29; background-image: linear-gradient(#30384a 1px, transparent 1px), linear-gradient(90deg, #30384a 1px, transparent 1px); border-color: #3d4557; }

.top-search-button { color: #574f77; background: rgba(255,255,255,.72); border-color: rgba(88,76,151,.18); }
.search-modal { width: min(650px, 100%); }
.search-header { margin-bottom: 17px; }
.search-input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 13px; background: #fff; border: 1px solid #d9d4e8; border-radius: 11px; box-shadow: 0 3px 12px rgba(50,42,96,.06); }
.search-input-wrap:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(91,91,214,.1); }
.search-input-wrap svg { flex: 0 0 auto; width: 18px; color: var(--indigo); }
.search-input-wrap input { width: 100%; height: 48px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-results { overflow-y: auto; display: grid; gap: 7px; max-height: min(470px, 55vh); margin-top: 14px; }
.search-result { display: grid; grid-template-columns: 4px minmax(0,1fr); align-items: center; gap: 11px; padding: 12px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 10px; text-align: left; cursor: pointer; }
.search-result:hover { border-color: color-mix(in srgb, var(--event-color) 45%, white); background: color-mix(in srgb, var(--event-color) 8%, white); }
.search-result i { width: 4px; height: 34px; background: var(--event-color); border-radius: 5px; }
.search-result strong { display: block; font-size: 12px; }
.search-result span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.search-result b { color: #56506f; }
.search-status { padding: 30px; color: var(--muted); font-size: 12px; text-align: center; }
.reminder-list-modal { width: min(590px, 100%); }
.reminder-list { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.missed-reminder-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; background: rgba(255,255,255,.68); border: 1px solid var(--line); border-radius: 10px; }
.missed-reminder-row strong, .missed-reminder-row span { display: block; }
.missed-reminder-row strong { font-size: 12px; }
.missed-reminder-row span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.missed-reminder-row .primary-button { padding: 8px 10px; font-size: 10px; }
.due-reminder-modal { width: min(430px, 100%); text-align: center; }
.due-reminder-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px; color: #fff; background: var(--indigo); border-radius: 16px; box-shadow: 0 9px 25px rgba(91,91,214,.28); }
.due-reminder-modal .eyebrow { margin-bottom: 7px; color: var(--indigo); }
.due-reminder-meta { margin: 10px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.due-reminder-actions { display: flex; justify-content: center; gap: 9px; }

.settings-modal { width: min(720px, 100%); }
.settings-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-bottom: 22px; padding: 4px; background: rgba(91,91,214,.08); border-radius: 12px; }
.settings-tabs button { padding: 9px 10px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.settings-tabs button.active { color: var(--ink); background: var(--card); box-shadow: 0 3px 10px rgba(42,43,57,.08); }
.settings-panel { min-height: 230px; }
.appearance-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; }
.appearance-form .field { margin: 0; }
.settings-reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; padding: 14px 15px; background: rgba(91,91,214,.06); border: 1px solid var(--line); border-radius: 11px; }
.settings-reminder-row strong, .settings-reminder-row span { display: block; }
.settings-reminder-row strong { font-size: 12px; }
.settings-reminder-row span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.settings-reminder-row .secondary-button { flex: 0 0 auto; padding: 9px 13px; }
.settings-calendar-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; margin-bottom: 12px; }
.settings-calendar-row .field { margin: 0; }
.calendar-settings #renameCalendarForm { margin-bottom: 12px; }
.default-calendar-field { margin-bottom: 13px; }
.delete-calendar-button { margin: 2px 0 4px; padding: 8px 0; }
.access-badge { padding: 6px 9px; color: #51489c; background: #ebe8fb; border-radius: 999px; font-size: 10px; font-weight: 800; }
.sharing-heading { margin: 20px 0 10px; }
.sharing-heading h4 { margin: 0; font-size: 12px; }
.sharing-heading p, .read-only-note { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.member-list { display: grid; gap: 7px; }
.member-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 9px 11px; background: rgba(255,255,255,.65); border: 1px solid var(--line); border-radius: 9px; }
.member-row strong, .member-row span { display: block; }
.member-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-row div span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.member-role { color: var(--muted); font-size: 10px; font-weight: 700; }
.member-row select { height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.remove-member { padding: 4px; color: var(--red); background: none; border: 0; font-size: 9px; font-weight: 700; cursor: pointer; }
.invite-form { display: grid; grid-template-columns: minmax(0,1fr) 115px auto; align-items: end; gap: 8px; margin-top: 10px; }
.invite-form .field { margin: 0; }
.read-only-note { padding: 11px; background: #f4f2fa; border-radius: 8px; }
.settings-heading { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.settings-heading h3 { margin: 0; font: 800 15px/1.3 "Manrope", sans-serif; }
.settings-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.event-type-list { display: grid; gap: 7px; margin-bottom: 13px; }
.event-type-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 10px; }
.event-type-row strong { font-size: 12px; }
.event-type-row button { padding: 3px; color: var(--indigo); background: none; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.event-type-row .type-delete { color: var(--red); }
.type-swatch { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.empty-settings { color: var(--muted); font-size: 12px; }
.event-type-form { display: grid; grid-template-columns: minmax(0,1fr) 76px auto auto; align-items: end; gap: 9px; }
.event-type-form .field { margin: 0; }
.color-field input { padding: 5px; cursor: pointer; }
.settings-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; }
.settings-form .field { margin: 0; }
.field small { color: var(--muted); font-size: 10px; font-weight: 400; }
.password-form { grid-template-columns: 1fr 1fr auto; margin-top: 0; }
.password-actions { display: flex; align-items: center; gap: 9px; }
.password-hint { grid-column: 2 / -1; margin: -3px 0 0; color: var(--muted); font-size: 10px; }
.text-button { padding: 7px 3px; color: var(--indigo); background: none; border: 0; font-size: 10px; font-weight: 800; cursor: pointer; }
.password-reset-panel { margin-top: 14px; padding: 13px; background: rgba(91,91,214,.06); border: 1px solid var(--line); border-radius: 10px; }
.password-reset-panel > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.password-reset-form { grid-template-columns: .7fr 1fr auto auto; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .85fr) minmax(430px, 1.15fr); background: #f7f6fb; }
.auth-intro { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(38px,5vw,72px); color: #fff; background: linear-gradient(155deg,#34316f,#5b50ae 56%,#7665c4); }
.auth-intro > div { max-width: 480px; }
.auth-intro .eyebrow { margin-bottom: 12px; color: rgba(255,255,255,.62); }
.auth-intro h1 { font-size: clamp(34px,4.2vw,60px); line-height: 1.06; letter-spacing: -2px; }
.auth-intro p:not(.eyebrow) { max-width: 410px; margin: 18px 0 0; color: rgba(255,255,255,.72); line-height: 1.65; }
.auth-intro small { color: rgba(255,255,255,.55); }
.auth-card { align-self: center; width: min(470px,calc(100% - 48px)); margin: 36px auto; padding: 42px; background: #fff; border: 1px solid #e7e3ef; border-radius: 22px; box-shadow: 0 24px 70px rgba(52,43,110,.12); }
.auth-brand { display: none; margin-bottom: 35px; color: var(--ink); }
.auth-card > .eyebrow { margin-bottom: 6px; color: var(--indigo); }
.auth-card h1 { font-size: 30px; }
.auth-copy { margin: 9px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.password-input { position: relative; display: block; }
.password-input input { width: 100%; padding-right: 58px; }
.password-input button { position: absolute; top: 50%; right: 9px; padding: 5px 6px; color: var(--indigo); background: transparent; border: 0; font-size: 10px; font-weight: 700; transform: translateY(-50%); cursor: pointer; }
.auth-submit { width: 100%; margin-top: 8px; }
.remember-me { display: flex; align-items: center; gap: 7px; margin: -2px 0 12px; color: var(--muted); font-size: 12px; }
.auth-footer { margin: 21px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-footer a { color: var(--indigo); font-weight: 700; }
.validation-summary, .field-error { color: #b23f4a; font-size: 11px; }
.validation-summary ul { margin: 0 0 15px; padding-left: 18px; }
.field span.field-error:empty { display: none; }
button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 1100px) {
  .calendar-toolbar .view-switcher { display: none; }
  .calendar-toolbar .mobile-view-select { display: block; }
}

@media (max-width: 950px) {
  .app-shell { grid-template-columns: 210px 1fr; }
  .sidebar { width: 210px; padding-left: 16px; padding-right: 16px; }
  .calendar-page { grid-column: 2; padding: 32px 22px 60px; }
  .legend { display: none; }
  .upcoming-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-page { display: grid; grid-template-columns: 1fr; place-items: center; padding: 14px; background: var(--canvas); }
  .auth-intro { display: none; }
  .auth-card { min-width: 0; width: calc(100vw - 28px); max-width: 460px; margin: 0; padding: 30px 22px; }
  .auth-card input, .auth-card .password-input { min-width: 0; max-width: 100%; }
  .auth-brand { display: inline-flex; }
}

@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { visibility: hidden; opacity: 0; width: min(280px, 85vw); transform: translateX(-100%); transition: .25s ease; box-shadow: 25px 0 60px rgba(20,21,29,.18); }
  .sidebar.open { visibility: visible; opacity: 1; transform: translateX(0); }
  .calendar-page { padding: 0 12px 90px; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; margin: 0 -12px 22px; padding: 15px; color: #fff; background: linear-gradient(100deg, #3e397e, #6557b5); box-shadow: 0 7px 22px rgba(54,45,112,.22); }
  .mobile-header .icon-button { color: #fff; border-color: rgba(255,255,255,.3); }
  .mobile-header .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .mobile-header .brand-mark svg { width: 21px; }
  .page-topbar { align-items: center; margin-bottom: 10px; padding-left: 9px; }
  .page-topbar .eyebrow { display: none; }
  .page-topbar h1 { font-size: 26px; }
  .compact-add { display: none; }
  .page-topbar { flex-wrap: wrap; }
  .topbar-actions { display: none; }
  .view-switcher { display: none; }
  .mobile-view-select { position: relative; display: block; }
  .mobile-view-select select { height: 34px; min-width: 92px; padding: 0 27px 0 9px; color: #57516f; background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.28); border-radius: 9px; outline: none; appearance: none; font-size: 10px; font-weight: 700; }
  .mobile-view-select svg { position: absolute; top: 8px; right: 7px; width: 17px; pointer-events: none; }
  .today-button { padding: 8px 10px; font-size: 10px; }
  .calendar-toolbar { flex-wrap: nowrap; gap: 6px; padding: 12px 8px; }
  .month-navigation { flex: 1 1 auto; min-width: 0; gap: 2px; }
  .month-navigation .icon-button { width: 32px; height: 32px; }
  .calendar-toolbar-actions { flex: 0 0 auto; width: auto; gap: 6px; }
  .month-navigation h2 { overflow: hidden; flex: 1; min-width: 0; margin: 0 2px; font-size: 15px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .weekday-row span { padding: 10px 2px; font-size: 9px; }
  .calendar-day { min-height: 79px; padding: 5px 3px; }
  .day-number { width: 23px; height: 23px; margin: 0 auto 3px; font-size: 10px; }
  .event-pill { width: 6px; height: 6px; margin: 2px auto; padding: 0; border: 0; border-radius: 50%; color: transparent !important; font-size: 0; }
  .event-pill.vacation { background: var(--green); }
  .event-pill.appointment { background: var(--red); }
  .event-pill.other { background: var(--blue); }
  .event-pill.dynamic-event { background: var(--event-color); }
  .day-events { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .more-events { display: none; }
  .up-next { margin-top: 27px; }
  .upcoming-list { gap: 8px; }
  .mobile-fab { position: fixed; right: 19px; bottom: 20px; display: grid; place-items: center; width: 55px; height: 55px; color: #fff; background: var(--indigo); border: 0; border-radius: 17px; box-shadow: 0 10px 25px rgba(91,91,214,.35); z-index: 30; }
  .mobile-fab svg { width: 23px; stroke-width: 2.3; }
  .event-modal { padding: 21px 17px; border-radius: 17px; }
  .todo-hero { align-items: center; padding: 6px 8px 0; }
  .todo-hero h1 { font-size: 26px; }
  .todo-hero p:last-child { display: none; }
  .todo-hero .primary-button { padding: 10px 12px; font-size: 11px; }
  .todo-card { padding: 14px; }
  .history-hero { padding: 6px 8px 0; }
  .history-hero h1 { font-size: 26px; }
  .history-hero p:last-child { display: none; }
  .history-card { padding: 14px; }
  .history-row { grid-template-columns: auto minmax(0,1fr); }
  .history-row-action { grid-column: 2; justify-self: start; padding-left: 0; }
  .event-progress-card { grid-template-columns: 1fr; padding: 27px 20px; }
  .event-progress-chart { grid-row: 1; width: min(205px, 75vw); }
  .event-progress-legend { grid-template-columns: 1fr; }
  .todo-form { padding: 14px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .category-picker { flex-wrap: wrap; }
  .modal-actions .primary-button, .modal-actions .secondary-button { padding: 11px 13px; }
  .event-type-form, .settings-form, .password-form, .invite-form, .appearance-form { grid-template-columns: 1fr; }
  .password-hint { grid-column: 1; }
  .event-type-form .primary-button, .event-type-form .secondary-button, .settings-form .primary-button, .settings-form .secondary-button { width: 100%; }
  .auth-page { padding: 14px; }
  .auth-card { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
