:root {
  --purple: #6d28d9;
  --purple-dark: #4c1d95;
  --pink: #ec4899;
  --bg: #f8f5ff;
  --card: #ffffff;
  --text: #20162f;
  --muted: #6b6474;
  --line: #e8ddff;
  --danger: #dc2626;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
.hero { position: sticky; top: 0; z-index: 10; padding: max(16px, env(safe-area-inset-top)) 16px 14px; color: white; background: linear-gradient(135deg, var(--purple-dark), var(--purple), var(--pink)); box-shadow: 0 12px 30px rgba(76, 29, 149, .25); }
.hero__top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; max-width: 980px; margin: 0 auto; }
.eyebrow { margin: 0 0 5px; font-size: .78rem; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
h1 { margin: 0; font-size: clamp(1.7rem, 8vw, 2.7rem); line-height: 1; }
.subtitle { margin: 8px 0 0; opacity: .9; font-size: .95rem; }
.icon-btn { border: 0; color: white; background: rgba(255,255,255,.16); border-radius: 14px; min-width: 42px; height: 42px; }
.search { display: flex; align-items: center; gap: 8px; max-width: 980px; margin: 16px auto 0; padding: 12px 14px; border-radius: 18px; background: white; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; color: var(--text); }
.tabs { position: sticky; top: var(--hero-offset, 142px); z-index: 9; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px; background: rgba(248,245,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.tab { border: 1px solid var(--line); background: white; color: var(--purple); border-radius: 999px; padding: 10px 8px; font-weight: 700; }
.tab.active { background: var(--purple); color: white; }
.tab span { display: inline-flex; min-width: 20px; justify-content: center; margin-left: 3px; padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,.25); }
main { max-width: 980px; margin: 0 auto; padding: 12px 12px 80px; }
.view { display: none; }
.view.active { display: block; }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.day-chip { flex: 0 0 auto; border: 1px solid var(--line); background: white; color: var(--purple); border-radius: 999px; padding: 10px 14px; font-weight: 800; }
.day-chip.active { color: white; background: var(--purple); }
.filter-panel, .panel { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 12px; box-shadow: 0 8px 20px rgba(76, 29, 149, .06); }
.filter-panel summary { cursor: pointer; font-weight: 900; color: var(--purple-dark); }
.filter-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.filter-grid label { display: grid; gap: 5px; color: var(--muted); font-size: .85rem; font-weight: 700; }
select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); }
.toggle-line { display: flex !important; flex-direction: row; gap: 9px !important; align-items: center; padding: 10px 0; color: var(--text) !important; }
.filter-actions, .data-actions, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.secondary-btn, .danger-btn { border: 0; border-radius: 12px; padding: 10px 12px; font-weight: 800; }
.secondary-btn { background: #efe7ff; color: var(--purple); }
.danger-btn { background: #fee2e2; color: var(--danger); }
.muted { color: var(--muted); font-size: .88rem; }
.cards { display: grid; gap: 12px; }
.date-heading { margin: 18px 4px 8px; color: var(--purple-dark); font-size: 1rem; }
.card { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 14px; box-shadow: 0 8px 22px rgba(76, 29, 149, .08); }
.card__top { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.time { color: var(--purple); font-weight: 900; font-size: .92rem; }
.title { margin: 7px 0 9px; font-size: 1.07rem; line-height: 1.25; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pill { padding: 5px 8px; border-radius: 999px; background: #f2ecff; color: var(--purple-dark); font-size: .78rem; font-weight: 700; }
.description { color: #40364d; line-height: 1.4; max-height: 3.9em; overflow: hidden; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.bookmark-btn, .details-btn { border: 0; border-radius: 13px; padding: 10px 12px; font-weight: 900; }
.bookmark-btn { background: #fdf2f8; color: #be185d; }
.bookmark-btn.saved { color: white; background: linear-gradient(135deg, var(--pink), var(--purple)); }
.details-btn { background: #f4f1f8; color: var(--purple-dark); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); background: white; border-radius: 18px; border: 1px dashed var(--line); }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: linear-gradient(135deg, white, #f5efff); border: 1px solid var(--line); border-radius: 18px; padding: 14px 10px; text-align: center; }
.stat span { display: block; font-size: 1.45rem; font-weight: 950; color: var(--purple); }
.stat small { color: var(--muted); font-weight: 700; }
.panel h2, .section-head h2 { margin: 0 0 10px; font-size: 1.15rem; }
.agenda-day { border-top: 1px solid var(--line); padding: 10px 0; }
.agenda-item { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 8px 0; }
.agenda-item strong { font-size: .92rem; }
.agenda-item small { color: var(--muted); }
.file-btn input { display: none; }
dialog { width: min(92vw, 620px); border: 0; border-radius: 22px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(32,22,47,.5); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; font-size: 1.8rem; color: var(--muted); }
#dialogContent h2 { padding-right: 26px; margin-top: 0; }
@media (min-width: 720px) {
  .filter-grid { grid-template-columns: repeat(4, 1fr); align-items: end; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .date-heading { grid-column: 1 / -1; }
  .tabs { max-width: 980px; margin: 0 auto; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 20px 20px; }
}
