@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  font: 15px/1.5 Inter, system-ui, sans-serif;
  color: #23233a;
  background: #f7f7fb;
  --muted: #656579;
  --accent: #5c42d6;
  --border: #e9e8f1;
  --radius: 19px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid #755ef2; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.symbols, .visually-hidden { width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; position: absolute; white-space: nowrap; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); }
.top-inner, .layout { width: min(1100px, calc(100% - 64px)); margin: auto; }
.top-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; color: inherit; font-size: 23px; font-weight: 800; letter-spacing: -.9px; text-decoration: none; }
.brand-icon { width: 38px; height: 38px; margin-right: 10px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: white; }
.brand-dot { color: var(--accent); }
.connection { display: flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 100px; border: 1px solid #ece9f6; background: #f9f7ff; color: #50457a; font-size: .79rem; white-space: nowrap; }
.connection > span { width: 7px; height: 7px; border-radius: 50%; background: #866bf6; }
.connection[data-state="connected"] > span { background: #269972; }
.connection[data-state="waiting"] > span { background: #cf8527; }
.layout { padding: 32px 0 48px; }
.hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; min-height: 261px; padding: 34px 40px; border-radius: 25px; background: radial-gradient(ellipse at 90% 15%, #ece4ff, transparent 56%), linear-gradient(115deg, #eeeaff, #f5eeff); border: 1px solid #e7defb; }
.hero-text { z-index: 1; }
.hero-date { display: inline-flex; gap: 7px; align-items: center; margin-bottom: 12px; color: #5d499a; font-size: .8rem; font-weight: 700; }
.hero-date svg { width: 17px; height: 17px; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.45rem); letter-spacing: -.055em; line-height: 1.05; font-weight: 800; }
.hero p { margin-top: 12px; max-width: 38ch; color: #5a5276; }
.button { min-height: 42px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 11px; font-size: .87rem; font-weight: 700; transition: background .15s, box-shadow .15s; }
.button svg { width: 17px; height: 17px; }
.primary { color: #fff; background: var(--accent); }
.primary:hover:not(:disabled) { background: #4d35bd; }
.hero .primary { margin-top: 23px; box-shadow: 0 5px 13px #5c42d62a; }
.secondary { background: #fff; border-color: #e4e1ef; color: #4a435e; }
.secondary:hover:not(:disabled) { background: #f8f6ff; }
.hero-art { position: absolute; width: 345px; height: 255px; right: 17px; top: 50%; translate: 0 -50%; display: grid; place-items: center; pointer-events: none; }
.orbit { position: absolute; width: 290px; height: 194px; border: 1px solid #a78af047; border-radius: 50%; transform: rotate(-29deg); }
.orbit-inner { width: 235px; height: 145px; border-color: #b294ed52; }
.art-card { position: relative; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 33px; transform: rotate(-12deg); color: white; background: linear-gradient(150deg, #a58aff, #7250e2 78%); border: 1px solid #ffffff8a; box-shadow: 0 18px 36px #7553d84a, inset 0 1px 8px #e9dcff70; }
.art-card svg { width: 65px; height: 65px; stroke-width: 1.45; }
.art-card i { position: absolute; top: 26px; right: 31px; width: 13px; height: 13px; border: 2px solid #9677f6; border-radius: 50%; background: #ffd8a4; }
.spark { position: absolute; color: #9d80f0; line-height: 1; }
.spark-top { top: 50px; right: 70px; font-size: 28px; }
.spark-bottom { bottom: 43px; left: 62px; font-size: 22px; }
.spark-small { top: 76px; left: 66px; font-size: 12px; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 320px); align-items: start; gap: 26px; margin-top: 29px; }
.section-head { display: flex; gap: 9px; align-items: center; }
h2 { font-size: 1.18rem; font-weight: 800; letter-spacing: -.035em; }
.section-head h2 { font-size: 1.55rem; }
.count { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 0 6px; color: #5f47bc; background: #ece7fc; font-size: .8rem; font-weight: 700; border-radius: 100px; }
.count:empty { display: none; }
.filters { display: flex; gap: 5px; margin: 13px 0 14px; }
.filters button { border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); padding: 6px 11px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.filters button:hover { color: var(--accent); }
.filters button[aria-pressed="true"] { color: #5135bc; background: #ede8ff; border-color: #e6ddfc; }
.reminders { display: grid; gap: 9px; }
.reminder { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 15px; }
.category-icon, .panel-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #eae6ff; color: #6249ce; }
.category-icon.birthday { background: #fceaf3; color: #ad457e; }
.category-icon.event { background: #e2f5ef; color: #257c65; }
.category-icon.other { background: #fef1df; color: #97591c; }
.reminder h3 { overflow-wrap: anywhere; font-size: .98rem; font-weight: 700; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; color: var(--muted); font-size: .78rem; margin-top: 3px; }
.meta span + span::before { content: '·'; margin-right: 7px; color: #9991ac; }
.reminder-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { border: 0; border-radius: 9px; background: transparent; color: #6e6489; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; }
.icon-button:hover { background: #f2edff; color: var(--accent); }
.icon-button svg { width: 17px; height: 17px; }
.switch { display: grid; place-items: center; border: 0; padding: 0; background: transparent; width: 39px; height: 34px; border-radius: 8px; }
.switch span { width: 35px; height: 20px; border-radius: 20px; position: relative; background: #d8d5e3; transition: background .15s; }
.switch span::after { content: ''; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .15s; }
.switch[aria-checked="true"] span { background: #7558e9; }
.switch[aria-checked="true"] span::after { transform: translateX(15px); }
.empty { border: 1px dashed #ded9ec; border-radius: 14px; padding: 24px 16px; color: var(--muted); text-align: center; }
.sidebar { display: grid; gap: 12px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 17px; }
.telegram-panel h2 { margin: 10px 0 4px; }
.panel p { font-size: .85rem; color: var(--muted); }
.telegram-icon { background: #e8f4ff; color: #276eab; }
.test { justify-content: space-between; width: 100%; margin-top: 13px; }
.history-heading { display: flex; align-items: center; gap: 8px; }
.history-icon { width: 32px; height: 32px; border-radius: 9px; }
.history-icon svg { width: 17px; height: 17px; }
.history { display: grid; max-height: 260px; overflow: auto; }
.history p { margin-top: 8px; }
.history-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .79rem; }
.history-entry:last-child { border: 0; padding-bottom: 0; }
.history-entry b { overflow-wrap: anywhere; }
.history-entry span { color: var(--muted); }
.history-entry time { grid-column: 1 / -1; color: var(--muted); }
.timezone { display: flex; align-items: center; gap: 6px; padding: 1px 3px; color: var(--muted); font-size: .76rem; }
.timezone svg { width: 15px; height: 15px; }
dialog { width: min(550px, calc(100% - 24px)); max-height: min(90dvh, 850px); border: 1px solid var(--border); border-radius: 21px; padding: 0; color: inherit; box-shadow: 0 22px 90px #1a123842; }
dialog::backdrop { background: #22203980; }
.dialog-head, .form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 21px; background: #fff; }
.dialog-head { border-bottom: 1px solid var(--border); }
.dialog-head h2 { font-size: 1.25rem; }
.form-fields { display: grid; gap: 13px; padding: 17px 21px; }
.form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
label { display: grid; gap: 5px; align-content: start; min-width: 0; color: #45405a; font-size: .8rem; font-weight: 700; }
input, select, textarea { width: 100%; min-width: 0; min-height: 39px; padding: 6px 9px; border: 1px solid #dedbea; border-radius: 8px; color: #2f2943; background: #fff; font-size: .93rem; font-weight: 400; }
textarea { resize: vertical; }
small { color: var(--muted); font-weight: 400; }
fieldset { margin: 0; min-width: 0; border: 1px solid var(--border); padding: 9px; border-radius: 11px; }
legend { font-size: .8rem; font-weight: 700; color: #45405a; padding: 0 4px; }
#time-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.time-input { display: flex; gap: 3px; align-items: center; }
.time-input input { width: 113px; }
.text-button { min-height: 32px; color: var(--accent); padding: 0 4px; background: transparent; }
.text-button:hover { text-decoration: underline; }
.interval-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.form-actions { position: sticky; bottom: 0; border-top: 1px solid var(--border); justify-content: end; }
.danger { margin-right: auto; color: #a92d52; background: #fdf0f3; }
.danger:hover { background: #fae1e8; }
.error, .delete-question { color: #a92d52; font-size: .83rem; }
.toast { position: fixed; z-index: 2; bottom: 16px; left: 50%; translate: -50% 0; width: max-content; max-width: calc(100% - 24px); background: #32294d; color: white; border-radius: 10px; padding: 10px 14px; font-size: .87rem; box-shadow: 0 6px 20px #31244838; }
.workspace-nav { display: flex; align-items: center; gap: 6px; margin: 20px 0; padding: 5px; border: 1px solid var(--border); border-radius: 13px; background: white; }
.workspace-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 13px; min-height: 39px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.workspace-tab:hover, .workspace-tab[aria-current] { color: #5135bc; background: #ede8ff; }
.workspace-tab svg { width: 16px; height: 16px; }
.workspace-nav + .columns { margin-top: 0; }
.birthday-form { display: grid; gap: 15px; }
.birthday-form > button { justify-self: start; }
.birthday-fields { display: grid; grid-template-columns: minmax(140px, 2fr) minmax(64px, .65fr) minmax(110px, 1fr) minmax(115px, 1fr); gap: 10px; }
.workspace-view, .workspace-stack { display: grid; gap: 14px; min-width: 0; }
.workspace-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; align-items: start; }
.workspace-heading, .workspace-actions, .calendar-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.workspace-heading { justify-content: space-between; }
.workspace-heading h2 { overflow-wrap: anywhere; }
.workspace-hint, .invite-box small { color: var(--muted); font-size: .85rem; }
.inline-form { display: flex; gap: 8px; align-items: end; margin-top: 8px; }
.inline-form label { flex: 1; max-width: 400px; }
.role-label { border-radius: 20px; padding: 3px 8px; color: #5135bc; background: #ede8ff; font-size: .78rem; }
.member-list { padding: 0; margin: 8px 0 12px; list-style: none; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 35px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.invite-box { display: grid; gap: 7px; grid-template-columns: minmax(0, 220px) auto; justify-content: start; margin-bottom: 10px; }
.invite-box small { grid-column: 1 / -1; }
.data-panel { display: grid; gap: 9px; }
.data-panel > .button, #import-preview > .button { justify-self: start; }
.file-items { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 500; min-height: 32px; padding-right: 6px; overflow-wrap: anywhere; }
.checkbox-row input { accent-color: var(--accent); width: 16px; min-height: 16px; flex: 0 0 auto; }
#import-preview { display: grid; gap: 8px; }
.confirm-action { margin: 0; }
#calendar-month::first-letter, #day-title::first-letter { text-transform: uppercase; }
.calendar-controls .button { min-height: 34px; padding: 0 10px; }
.calendar-filter { width: min(100%, 200px); margin: 10px 0 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.calendar-week { text-align: center; color: var(--muted); font-size: .79rem; margin-bottom: 4px; }
.calendar-day { display: flex; flex-direction: column; align-items: stretch; gap: 3px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; min-height: 91px; padding: 5px; color: inherit; background: #fcfbff; text-align: start; }
.calendar-day[data-outside="true"] { color: #717083; background: #f7f7fb; }
.calendar-day[aria-pressed="true"] { border-color: var(--accent); background: #f3efff; }
.day-number { font-size: .8rem; font-weight: 700; align-self: start; min-width: 21px; text-align: center; }
.calendar-day[aria-current="date"] .day-number { border-radius: 6px; background: var(--accent); color: #fff; }
.day-event, .day-more { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-event { border-radius: 4px; padding: 1px 4px; background: #eae6ff; color: #4c32ae; }
.day-event[data-category="birthday"] { background: #fceaf3; color: #98366b; }
.day-event[data-category="event"] { background: #e2f5ef; color: #1c705a; }
.day-event[data-category="other"] { background: #fef1df; color: #8a5016; }
.day-event[data-paused="true"] { background: #efedf4; color: #656579; }
.day-more { color: var(--muted); }
.day-panel .workspace-heading { margin-bottom: 10px; }
.quick-open { margin: 10px 0 0 5px; }
.calendar-settings, .history-actions { display: flex; align-items: start; gap: 8px; }
.calendar-settings { margin: 10px 0 14px; }
.calendar-settings label { flex: 1; max-width: 180px; }
.calendar-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
.calendar-list .calendar-day { min-height: 50px; }
.calendar-list .day-number { text-align: start; }
.advanced-fields { display: grid; gap: 9px; }
details > summary { cursor: pointer; font-weight: 700; }
details > .advanced-fields { margin-top: 10px; }
.advanced-fields > .button { justify-self: start; }
.event-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-actions { grid-column: 1 / -1; }
.history-actions .button { min-height: 24px; font-size: .75rem; }
.form-actions { flex-wrap: wrap; }
@media (max-width: 800px) {
  .hero-art { right: -35px; opacity: .7; scale: .82; }
  .columns { grid-template-columns: minmax(0,1fr) minmax(200px, 245px); gap: 13px; }
}
@media (max-width: 620px) {
  .top-inner, .layout { width: calc(100% - 28px); }
  .top-inner { min-height: 58px; }
  .brand { font-size: 20px; }
  .brand-icon { width: 33px; height: 33px; border-radius: 10px; margin-right: 7px; }
  .layout { padding: 14px 0 28px; }
  .hero { min-height: 0; padding: 24px 17px; border-radius: 17px; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .hero p { font-size: .88rem; max-width: 30ch; }
  .hero-art { right: -121px; opacity: .28; scale: .54; }
  .columns { grid-template-columns: 1fr; margin-top: 18px; gap: 15px; }
  .reminder { gap: 8px; padding: 10px; }
  .category-icon { width: 34px; height: 34px; border-radius: 9px; }
  .reminder-actions { gap: 0; }
  .dialog-head, .form-actions { padding: 10px 12px; }
  .form-fields { padding: 13px 12px; }
  input, select, textarea { font-size: 16px; }
  .workspace-nav { gap: 2px; margin: 12px 0; flex-wrap: wrap; }
  .birthday-fields { grid-template-columns: minmax(48px, .6fr) minmax(75px, 1fr) minmax(95px, 1fr); }
  .birthday-fields > :first-child { grid-column: 1 / -1; }
  .workspace-tab { flex: 1; padding: 6px 4px; font-size: .79rem; }
  .workspace-tab svg { display: none; }
  .workspace-columns { grid-template-columns: 1fr; }
  .calendar-panel { padding: 11px; }
  .calendar-day { min-height: 61px; padding: 3px; border-radius: 6px; }
  .day-event { padding: 0 2px; font-size: .62rem; }
  .calendar-list { grid-template-columns: 1fr; }
  .quick-open { display: flex; margin-left: 0; }
}
