:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #221a33;
  background: #f7f6fb;
  --paper: #fff;
  --muted: #615a73;
  --line: #eeeaf3;
  --accent: #6441c2;
  --accent-soft: #f0eafd;
  --sidebar: #1d1630;
  --radius: 19px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #875af0;
  outline-offset: 3px;
}
h1, h2, p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 30px 17px 20px;
  color: #d9d0e7;
  background: radial-gradient(ellipse at left bottom, #34204b, transparent 57%), var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 12px; width: fit-content; margin: 0 0 46px 9px; color: #fff; }
.brand strong { display: block; font-size: 18px; line-height: 1.13; letter-spacing: .15em; }
.brand small { display: block; margin-top: 5px; color: #b8a9ce; font-size: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #bd9bff, #8055e9);
  box-shadow: 0 4px 18px #7548bc75, inset 0 0 0 1px #ffffff30;
}
.brand-mark > span, .orbit-spark, .hero-star {
  background: currentColor;
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
}
.brand-mark > span { width: 23px; height: 23px; transform: rotate(12deg); }
.navigation { display: grid; gap: 6px; }
.navigation a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.navigation a:hover { background: #ffffff0c; color: white; }
.navigation a[aria-current] { color: #f6eeff; background: #3b2a55; box-shadow: inset 0 0 0 1px #c8a6ff1b; }
.navigation a[aria-current] svg { color: #ccb6ff; }
.navigation svg { width: 18px; height: 18px; }
.source { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 10px; border-top: 1px solid #ffffff18; }
.source strong, .source small { display: block; }
.source strong { color: #f1eafa; font-size: 12px; font-weight: 600; }
.source small { margin-top: 4px; color: #bdb0cf; font-size: 11px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #baa2ed; box-shadow: 0 0 0 4px #b9a1ed26; flex: none; }
.live-dot[data-state="live"] { background: #77d2b9; box-shadow: 0 0 0 4px #77d2b925; }
.live-dot[data-state="issue"] { background: #ffb08a; box-shadow: 0 0 0 4px #ffb08a25; }

.workspace { min-width: 0; }
.topbar { height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 0 32px; border-bottom: 1px solid #eee9f3; background: #fff; }
.breadcrumb, .top-actions { display: flex; align-items: center; gap: 10px; }
.breadcrumb { color: #756d84; font-size: 13px; }
.breadcrumb strong { color: #332845; font-weight: 650; }
.breadcrumb svg { width: 13px; height: 13px; color: #a69bb6; }
.today-label { margin-right: 3px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.profile { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #eee5fc; color: #6541a9; font-size: 11px; font-weight: 750; letter-spacing: .03em; }
.logout { padding: 6px 4px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; }
.logout:hover { color: var(--accent); }
.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #ece7f2;
  border-radius: 9px;
  color: #514667;
  background: #fff;
  transition: color .18s, background .18s, transform .18s;
}
.icon-button svg { width: 16px; height: 16px; }
.icon-button:hover { color: var(--accent); background: #f5efff; transform: translateY(-1px); }
.refresh[aria-busy="true"] svg { animation: spin .8s linear infinite; }

.main { max-width: 1530px; margin: 0 auto; padding: 27px 32px 36px; }
.view { animation: appear .35s ease both; }
.notice { margin-bottom: 14px; padding: 12px 15px; border: 1px solid #ebd5ab; border-radius: 10px; color: #6b4519; background: #fff7e7; font-size: 13px; }
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 211px;
  overflow: hidden;
  padding: 28px 35px;
  border-radius: 22px;
  color: #fff;
  background: radial-gradient(ellipse at 78% 63%, #653b99 0%, #3d2466 35%, transparent 66%),
    linear-gradient(105deg, #211435 9%, #291740 59%, #3f255f);
  box-shadow: 0 5px 16px #2c17401a;
}
.hero-copy { position: relative; z-index: 1; max-width: 72%; }
.hero-date { display: inline-block; padding: 5px 10px 6px; margin-bottom: 10px; border: 1px solid #d4b0ff4d; border-radius: 20px; color: #ebdfff; background: #ffffff12; font-size: 12px; font-weight: 600; }
.hero-date:empty { display: none; }
.hero h1 { font-size: clamp(28px, 4vw, 50px); line-height: 1.08; letter-spacing: -.054em; font-weight: 740; }
.hero-art {
  position: absolute;
  top: 50%;
  right: max(17px, 5%);
  width: 344px;
  height: 344px;
  transform: translateY(-50%);
}
.orbit {
  position: absolute;
  inset: var(--inset);
  border: 1px solid #d6baff62;
  border-radius: 50%;
  transform: rotate(-23deg) scaleY(.55);
}
.orbit-outer { --inset: 1px; }
.orbit-middle { --inset: 34px; }
.orbit-inner { --inset: 68px; }
.orbit-core {
  position: absolute;
  inset: 109px;
  border: 1px solid #b995eb60;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ad7cf498, #9959e233 53%, #814cad09 70%);
  box-shadow: 0 0 44px #ac76eb72, inset 0 0 26px #d1b3f543;
  animation: glow 5s ease-in-out infinite alternate;
}
.orbit-spark {
  position: absolute;
  inset: 132px;
  color: #f1d9ff;
  background: linear-gradient(150deg, #fff4ff, #d7b9ff 55%, #b483ff);
  transform: rotate(13deg);
  animation: drift 6s ease-in-out infinite;
}
.moon { position: absolute; width: var(--size); height: var(--size); border-radius: 50%; animation: drift 6s ease-in-out infinite; }
.moon-peach { --size: 34px; top: 103px; right: 27px; background: radial-gradient(circle at 29% 24%, #ffe5d4, #f2a49f 60%, #a764aa); box-shadow: 0 0 25px #ffb0a96b; }
.moon-violet { --size: 20px; top: 227px; left: 34px; background: radial-gradient(circle at 30% 20%, #e0c6ff, #a775ef 55%, #6943b7); box-shadow: 0 0 24px #b589ff98; animation-delay: -2s; }
.moon-lilac { --size: 9px; top: 113px; left: 108px; background: #dcbcff; box-shadow: 0 0 12px #d7b6ff; animation-delay: -4s; }
.hero-star { position: absolute; width: 12px; height: 12px; color: #d8b9ff; animation: glow 3s ease-in-out infinite alternate; }
.star-a { top: 113px; left: 32px; }
.star-b { right: 44px; bottom: 95px; animation-delay: -1s; }
.star-c { right: 1px; bottom: 142px; width: 7px; height: 7px; animation-delay: -2s; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0 20px; }
.stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 12px 16px;
  text-align: left;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 7px #27134e07;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  animation: rise .35s ease both;
}
.stat:nth-child(2) { animation-delay: .05s; }
.stat:nth-child(3) { animation-delay: .1s; }
.stat:hover { border-color: #d8c8fa; transform: translateY(-2px); box-shadow: 0 4px 13px #56368e15; }
.stat[aria-pressed="true"] { border-color: #b79aef; background: #fcfaff; }
.stat-label { font-size: 13px; font-weight: 620; }
.stat strong { font-size: 26px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
[data-kind="birthday"] { --kind: #a52460; --kind-bg: #fce9f3; --kind-dot: #d75896; }
[data-kind="probation"] { --kind: #116c70; --kind-bg: #e1f6f3; --kind-dot: #24a49e; }
[data-kind="anniversary"] { --kind: #623bb0; --kind-bg: #efe7ff; --kind-dot: #9865e4; }
[data-kind="plan"] { --kind: #926025; --kind-bg: #fff2db; --kind-dot: #d49a44; }
.event-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--kind); background: var(--kind-bg); }
.event-icon svg { width: 20px; height: 20px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(275px, 337px); gap: 17px; align-items: start; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 3px 13px #28134608; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 18px 13px; }
.card-header h2 { font-size: 18px; letter-spacing: -.024em; line-height: 1.18; font-weight: 720; }
.card-header p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: #f4f1f8; flex: none; }
.segmented button { padding: 6px 8px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 610; white-space: nowrap; transition: color .18s, background .18s; }
.segmented button:hover { color: var(--accent); }
.segmented button[aria-pressed="true"] { color: #5c379f; background: #fff; box-shadow: 0 1px 4px #39205d16; }
.event-filters, .records-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 18px 11px; }
.field { display: inline-flex; align-items: center; gap: 7px; min-width: 0; min-height: 36px; border: 1px solid #ece7f1; border-radius: 8px; color: #75698b; background: #fbfafc; }
.field:focus-within { border-color: #b598ef; box-shadow: 0 0 0 2px #ddcbfa5c; }
.field input, .field select { width: 100%; min-height: 35px; padding: 7px 8px 7px 0; border: 0; border-radius: 8px; outline: none; color: #362a49; background: transparent; font-size: 13px; }
.field svg { width: 16px; height: 16px; flex: none; }
.search-field { flex: 1 1 155px; padding-left: 9px; }
.search-field input::placeholder { color: #766b85; }
.select-field { position: relative; flex: 0 1 auto; }
.select-field select { appearance: none; padding-left: 9px; padding-right: 26px; cursor: pointer; }
.select-field svg { position: absolute; right: 7px; pointer-events: none; }
.selection { display: flex; align-items: center; gap: 7px; width: max-content; max-width: calc(100% - 36px); margin: 0 18px 10px; padding: 3px 5px 3px 9px; border-radius: 7px; color: #573692; background: #f0e9fb; font-size: 12px; font-weight: 650; }
.selection button { display: grid; place-items: center; padding: 2px; border: 0; border-radius: 4px; color: inherit; background: transparent; }
.selection svg { width: 14px; height: 14px; }
.event-list { padding: 0 18px 6px; }
.event-row { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; width: 100%; align-items: center; gap: 11px; padding: 11px 2px; border: 0; border-top: 1px solid var(--line); text-align: left; color: inherit; background: #fff; transition: background .18s; animation: appear .24s ease both; }
.event-row:hover { background: #fbf8ff; }
.date-block { display: grid; place-content: center; justify-items: center; gap: 1px; width: 42px; height: 43px; border-radius: 10px; color: #4e3974; background: #f3eff9; font-variant-numeric: tabular-nums; }
.date-block strong { font-size: 17px; line-height: 1.1; }
.date-block small { font-size: 10px; font-weight: 650; }
.event-name, .person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; line-height: 1.3; }
.event-main, .person-text { display: grid; gap: 5px; min-width: 0; }
.event-meta, .person-text small { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.event-label { display: inline-flex; align-items: center; gap: 4px; color: var(--kind); font-weight: 660; }
.event-dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--kind-dot); }
.event-right { display: grid; justify-items: end; gap: 4px; }
.event-right small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.event-action { color: var(--accent); font-size: 11px; font-weight: 680; text-align: right; }
.event-row:hover .event-action { text-decoration: underline; }
.status { display: inline-flex; width: max-content; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; color: #5c526b; background: #f2eff5; font-size: 10px; line-height: 1.15; font-weight: 650; }
.status[data-status="ordered"] { color: #63439a; background: #efe7fc; }
.status[data-status="given"] { color: #17664b; background: #e3f4ed; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 27px 12px; color: var(--muted); text-align: center; font-size: 13px; }
.empty svg { width: 24px; height: 24px; color: #8c73af; }
.empty strong { color: #372b49; font-size: 15px; }

.calendar-header { padding-bottom: 11px; }
.calendar-actions { display: flex; gap: 5px; }
.calendar-actions .icon-button { width: 30px; height: 30px; }
.calendar-week, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 0 14px; }
.calendar-week span { padding: 7px 0; text-align: center; color: #70657f; font-size: 11px; font-weight: 650; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 34px; padding: 3px 1px; gap: 3px; border: 1px solid transparent; border-radius: 8px; background: #fff; color: #362b46; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .16s, border .16s; }
.day[data-outside] { color: #777084; }
.day:hover { background: #f3edfc; border-color: #e5d8f9; }
.day[aria-current="date"] { color: #5b36a3; background: #f0e8ff; }
.day[aria-pressed="true"] { color: #fff; border-color: #6a44b9; background: #6a44b9; }
.day[aria-pressed="true"] .event-dot { background: #fff; }
.day-dots { display: flex; gap: 2px; height: 4px; }
.day-dots .event-dot { width: 4px; height: 4px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 7px 11px; margin: 11px 16px 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.calendar-legend span { display: flex; align-items: center; gap: 4px; }
.text-button { display: flex; align-items: center; gap: 5px; margin: 9px 14px 13px; padding: 4px 2px; border: 0; color: #6440a9; background: transparent; font-size: 12px; font-weight: 650; }
.text-button:hover { color: #43207f; text-decoration: underline; }
.text-button svg { width: 15px; height: 15px; }

.records-header { display: flex; align-items: center; gap: 14px; margin: 13px 0 23px; }
.records-header .event-icon { width: 52px; height: 52px; border-radius: 15px; }
.records-header .event-icon svg { width: 26px; height: 26px; }
.records-header h1 { font-size: clamp(27px, 3vw, 39px); font-weight: 740; line-height: 1.12; letter-spacing: -.045em; }
.records-header p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.records-filters { padding: 15px 17px; }
.records-filters .search-field { max-width: 310px; }
.record-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.table-scroll { overflow: auto; max-height: min(68vh, 820px); border-radius: 0 0 var(--radius) var(--radius); }
.records table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; white-space: nowrap; font-size: 13px; }
.records th, .records td { padding: 12px 13px; border-bottom: 1px solid var(--line); }
.records th:first-child, .records td:first-child { padding-left: 17px; }
.records th { position: sticky; top: 0; z-index: 1; color: #5b4e6e; background: #f7f4fa; font-size: 11px; font-weight: 700; }
.records tr:last-child td { border-bottom: 0; }
.records tr:hover td { background: #fbf8ff; }
.person { display: flex; align-items: center; gap: 8px; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: #6743a4; background: #eee5fb; font-size: 11px; font-weight: 750; }
.avatar[data-company="46"] { color: #176663; background: #e2f4ed; }
.avatar[data-company="48"] { color: #8a3567; background: #fae8f2; }
.avatar[data-company="52"] { color: #7c4b29; background: #faeddf; }
.avatar[data-company="50"] { color: #375c92; background: #e8effc; }
.table-link { display: inline-flex; align-items: center; gap: 5px; color: #653bad; font-weight: 650; }
.table-link:hover { color: #442476; text-decoration: underline; }
.table-link svg { width: 15px; height: 15px; }
.gift-text { display: block; max-width: 240px; white-space: normal; overflow-wrap: anywhere; color: var(--muted); }
.table-event { display: grid; justify-items: start; gap: 5px; padding: 1px; border: 0; color: #52328d; background: transparent; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.table-event:hover > span:first-child { text-decoration: underline; }
.table-event[data-past] { color: #61596e; }
.employee-actions { display: grid; gap: 6px; }
.edit-person {
  display: inline-flex; align-items: center; gap: 5px; justify-self: start; min-height: 32px; padding: 5px 8px;
  border-radius: 6px; color: #5e389e; background: var(--accent-soft);
}
.edit-person:hover { background: #e9dbfc; }
.edit-person svg { width: 15px; height: 15px; }

dialog { width: min(440px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); padding: 0; border: 1px solid #e8e0f1; border-radius: 20px; color: inherit; background: #fff; box-shadow: 0 22px 90px #21103655; }
dialog[open] { animation: rise .25s ease both; }
dialog::backdrop { background: #20133176; backdrop-filter: blur(4px); }
.dialog-body { position: relative; padding: 23px; }
.dialog-close { position: absolute; right: 16px; top: 16px; }
.dialog-body h2 { margin: 12px 0 5px; font-size: 24px; letter-spacing: -.035em; }
.dialog-subtitle { color: var(--muted); font-size: 13px; }
.dialog-details { display: grid; gap: 11px; margin: 17px 0; padding: 14px; border-radius: 12px; background: #f8f5fc; font-size: 13px; }
.dialog-details div { display: flex; justify-content: space-between; gap: 12px; }
.dialog-details dt { color: var(--muted); }
.dialog-details dd { margin: 0; text-align: right; font-weight: 650; }
.dialog-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; font-size: 13px; }
.dialog-status { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.dialog-status select { width: 100%; color: #322445; }
.dialog-editor { display: grid; gap: 8px; margin: 16px 0; padding-top: 13px; border-top: 1px solid var(--line); }
.dialog-editor h3 { margin: 0; font-size: 14px; }
.editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dialog-editor label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.dialog-editor input { min-width: 0; width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid #e9e0f0; border-radius: 8px; background: #fbf9fd; color: #322445; }
.save-button { justify-self: start; min-height: 33px; padding: 6px 10px; border: 0; border-radius: 7px; background: #eee5fb; color: #57378e; font-size: 12px; font-weight: 680; }
.save-button:hover { background: #e5d6f9; }
.editor-message:not(:empty) { color: #584176; font-size: 12px; }
.toast { position: fixed; z-index: 5; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 40px); padding: 11px 13px; border-radius: 10px; color: #fff; background: #34274a; box-shadow: 0 6px 22px #27144233; font-size: 13px; animation: rise .2s ease both; }
.toast svg { width: 16px; height: 16px; color: #aaecd2; }

.auth-screen {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at 82% 12%, #e9dcfb, transparent 58%), #f7f6fb;
}
.auth-card {
  width: min(100%, 440px);
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid #ebe4f1;
  border-radius: 24px;
  background: white;
  box-shadow: 0 18px 55px #33205916;
  animation: rise .3s ease both;
}
.auth-card .brand { margin: 0 0 30px; color: #322441; }
.auth-card .brand-mark { color: white; }
.auth-card .brand small { color: var(--muted); }
.auth-card h1 { font-size: clamp(25px, 5vw, 33px); letter-spacing: -.04em; line-height: 1.12; }
.auth-card p { margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth-card .auth-message:not(:empty) { padding: 8px 10px; border-radius: 8px; color: #674317; background: #fff4e2; font-size: 13px; }
.auth-action { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; min-height: 44px; padding: 6px 12px; border-radius: 9px; color: white; background: #6843b9; font-size: 14px; font-weight: 650; transition: background .18s ease; }
.auth-action:hover { background: #57339e; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: .7; } to { opacity: 1; } }
@keyframes rise { from { opacity: .65; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes glow { from { opacity: .62; } to { opacity: 1; } }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 194px minmax(0, 1fr); }
  .main { padding-right: 22px; padding-left: 22px; }
  .topbar { padding-inline: 22px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(236px, 285px); gap: 12px; }
  .card-header { padding-inline: 13px; }
  .event-filters, .event-list { padding-inline: 13px; }
  .event-row { gap: 7px; }
}

@media (max-width: 930px) {
  .shell { grid-template-columns: 66px minmax(0, 1fr); }
  .sidebar { align-items: center; padding: 13px 8px; }
  .brand { margin: 0 0 31px; }
  .brand > span:last-child, .navigation a span, .source > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .navigation a { padding: 13px; }
}

@media (max-width: 710px) {
  .shell { display: block; }
  .sidebar { z-index: 3; height: auto; flex-direction: row; gap: 10px; padding: 8px 12px; }
  .brand { margin: 0; }
  .brand-mark { width: 33px; height: 33px; border-radius: 10px; }
  .brand-mark > span { width: 19px; height: 19px; }
  .navigation { display: flex; flex-wrap: nowrap; gap: 2px; }
  .navigation a { gap: 5px; padding: 7px 5px; font-size: 11px; white-space: nowrap; }
  .navigation a svg { display: none; }
  .navigation a span { position: static; width: auto; height: auto; clip-path: none; }
  .source { margin: 0 0 0 auto; padding: 0 3px; border-top: 0; }
  .topbar { height: 48px; padding-inline: 14px; }
  .breadcrumb { gap: 5px; font-size: 11px; }
  .today-label { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .icon-button, .profile { width: 29px; height: 29px; }
  .main { padding: 13px 12px 21px; }
  .hero { min-height: 164px; padding: 17px 16px; border-radius: 16px; }
  .hero-copy { max-width: 76%; }
  .hero-art { right: -89px; transform: translateY(-50%) scale(.58); }
  .hero-date { font-size: 10px; }
  .stats { gap: 6px; margin: 9px 0 12px; }
  .stat { grid-template-columns: auto 1fr; padding: 7px; gap: 4px 6px; min-height: 58px; border-radius: 11px; }
  .stat .event-icon { width: 24px; height: 24px; border-radius: 6px; }
  .stat .event-icon svg { width: 14px; height: 14px; }
  .stat strong { grid-column: 2; grid-row: 1; font-size: 20px; }
  .stat-label { grid-column: 1 / -1; grid-row: 2; font-size: 10px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .calendar-grid, .calendar-week { max-width: 510px; margin-inline: auto; }
  .calendar-legend { margin-inline: 14px; }
  .day { min-height: 31px; }
  .card-header h2 { font-size: 16px; }
  .segmented button { padding: 6px; font-size: 11px; }
  .records-header { margin: 11px 0 15px; }
  .records-header p { font-size: 12px; }
  .records-filters { padding: 11px; }
}

@media (max-width: 370px) {
  .sidebar { flex-wrap: wrap; gap: 4px 6px; padding-inline: 8px; }
  .navigation { order: 3; display: grid; flex: 1 0 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .navigation a { display: grid; place-items: center; font-size: 10px; line-height: 1.15; text-align: center; white-space: normal; }
  .events-card .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

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