/* Quiet interface inspired by Apple: system type, neutral surfaces, blue actions. */
:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #f2f2f7;
    --line: #dedee3;
    --ink: #1d1d1f;
    --ink-soft: #636366;
    --primary: #0066cc;
    --primary-ink: #ffffff;
    --primary-soft: #e8f2ff;
    --coral: #0066cc;
    --sun: #d6eaff;
    --sun-soft: #edf5ff;
    --lagoon: #0066cc;
    --danger: #b52d41;
    --danger-soft: #ffedf0;
    --warn-soft: #edf5ff;
    --radius-lg: 16px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 12px 36px -24px #16335c40;
    --sticker: none;
    --topbar-h: 86px;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}
body { background: var(--bg); background-image: none; }
h1, h2, h3 { font-family: var(--font); font-style: normal; letter-spacing: -.035em; }
h1 { font-weight: 600; font-size: clamp(1.8rem, 2.4vw, 2.3rem); line-height: 1.25; }
h2 { font-weight: 600; font-size: 1.5rem; }
.topbar { min-height: var(--topbar-h); height: auto; padding: 1rem 2.5rem; gap: 2.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { gap: .7rem; }
.brand-wordmark { display: grid; }
.brand-name { font-size: 1.3rem; font-weight: 600; letter-spacing: -.04em; }
.brand-caption { color: var(--ink-soft); font-size: .75rem; }
.date-tile { border: 0; background: var(--primary); color: #fff; box-shadow: none; transform: none; border-radius: 13px; }
.date-tile__band, .date-tile--sm .date-tile__band { background: transparent; color: #fff; font-size: 11px; }
.date-tile__day { font-family: var(--font); font-weight: 600; }
.topnav { gap: .35rem; }
.topnav a { padding: .7rem 1rem; font-weight: 550; border-radius: 12px; color: var(--ink-soft); }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a.active { background: var(--primary-soft); color: var(--primary); }
.topnav a.active::after { content: none; }
.topbar-user { font-size: .85rem; }
.topbar-name { font-weight: 550; }
.page { padding-top: 2.5rem; }
.page-calendar { max-width: 1512px; padding-inline: 2.5rem; }
.space-intro { margin: 0 0 1.75rem; }
.space-intro h1 { margin: .35rem 0 .65rem; }
.space-intro p { margin-bottom: 0; }
.space-kicker, .files-eyebrow { font-size: .72rem; color: var(--primary); font-weight: 650; letter-spacing: .12em; }
.calendar-page { position: relative; }
.calendar-toolbar { justify-content: flex-end; margin-top: -4.6rem; margin-bottom: 2.6rem; }
.btn { border-radius: 11px; font-weight: 550; border-width: 1px; }
.btn-primary { box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-create { background: var(--primary); color: var(--primary-ink); border: 0; padding: .85rem 1.15rem; box-shadow: none; }
.btn-create-plus { background: transparent; color: inherit; width: auto; height: auto; font-size: 1.25rem; line-height: 1.4; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=datetime-local], select, textarea { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.field > label { font-weight: 550; }
.form-meta, .field-help { color: var(--ink-soft); font-size: .9rem; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 1.75rem; box-shadow: none; }
.workspace { grid-template-columns: minmax(0, 1fr) 330px; gap: 1.75rem; align-items: start; }
.calendar { aspect-ratio: auto; height: clamp(560px, 72dvh, 820px); border-radius: 16px; padding: 1.35rem; background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.calendar .fc .fc-toolbar-title { font-family: var(--font); font-size: 1.6rem; font-weight: 600; letter-spacing: -.05em; }
.calendar .fc .fc-button, .calendar .fc .fc-button-group, .calendar .fc .fc-button-group > .fc-button { border-radius: 9px !important; }
.calendar .fc .fc-button { padding: .45rem .65rem; font-weight: 500; }
.calendar .fc .fc-button-group { padding: 3px; }
.calendar .fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--primary); color: var(--primary-ink); }
.calendar .fc .fc-col-header-cell-cushion { font-weight: 500; }
.calendar .fc .fc-daygrid-day-number { font-weight: 500; }
.calendar .fc .fc-day-other, .calendar .fc .fc-day-other .fc-daygrid-day-top { opacity: 1; }
.calendar .fc .fc-day-other .fc-daygrid-day-number { color: var(--ink-soft); opacity: 1; }
.calendar .fc .fc-day-today .fc-daygrid-day-number { background: var(--primary); color: #fff; }
.calendar .fc .fc-day-today { background: var(--primary-soft) !important; }
.calendar .fc .fc-today-button:disabled { opacity: .7; }
.tasks-panel { min-width: 0; }
.tasks-panel__head { flex-wrap: wrap; gap: 1rem; margin: .25rem 0 1.25rem; }
.tasks-panel__head h2 { font-size: 1.45rem; font-weight: 600; }
.new-list { width: 100%; }
.new-list input { flex: 1; min-width: 0; width: 100px; }
.task-lists { grid-template-columns: 1fr; gap: 1rem; }
.task-list { position: relative; border: 0; border-radius: 14px; padding: 1.15rem; background: var(--surface); box-shadow: none; }
.task-list::before { content: ''; display: block; width: 26px; height: 5px; border-radius: 4px; background: var(--list); margin-bottom: .75rem; }
.task-list__head h3 { font-family: var(--font); font-size: 1.15rem; font-weight: 650; }
.task-list__count { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; }
.task-list__menu summary { width: 34px; height: 34px; background: transparent; }
.task { padding-block: .65rem; }
.task__check { border: 1px solid #8c9bb1; border-radius: 7px; }
.task__check:hover { background: var(--primary-soft); }
.task__schedule { color: var(--primary); font-weight: 500; }
.new-list input, .add-task input { border: 1px solid var(--line); background: var(--bg); border-radius: 9px; }
.add-task__btn { background: var(--primary-soft); color: var(--primary); border: 0; border-radius: 10px; }
.modal { border: 0; border-radius: 22px; box-shadow: 0 24px 100px #1d1d1f40; }
.modal::backdrop { background: #1d1d1f66; backdrop-filter: blur(4px); }
.event-form { border-top-width: 4px; }
.day-summary { gap: .8rem; }
.day-summary a { border: 0; border-radius: 14px; background: var(--surface); padding: 1rem 1.2rem; }
.day-summary strong { color: var(--primary); font-size: 2rem; }
.day-empty { font-style: normal; line-height: 1.6; }
.day-events li { background: var(--surface-2); border-radius: 12px; border-left: 3px solid var(--primary); }
.files-tabs .btn-primary { background: var(--primary); color: #fff; }
.files-upload { background: var(--surface); border-color: #a8b8dc; border-radius: 16px; }
.files-content { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.file-kind, .file-kind--folder { border-radius: 12px; }
.files-empty > span { color: var(--primary); }
.file-actions .btn { border-color: transparent; }
.badge-catalog__item { border-radius: 12px; border-width: 1px; box-shadow: none; }
.auth-card { border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.auth-hero h1 { font-style: normal; }
.toast { border-radius: 12px; }
@media (max-width: 1200px) and (min-width: 701px) {
    .topbar { gap: 1rem; padding-inline: 1.5rem; flex-wrap: wrap; }
    .topbar-user { margin-left: 0; }
    .calendar .fc-header-toolbar { flex-wrap: wrap; gap: .75rem; }
    .calendar-toolbar { margin-top: 0; margin-bottom: 1.5rem; justify-content: flex-start; }
}
@media (max-width: 1000px) {
    .workspace { grid-template-columns: 1fr; }
    .task-lists { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .new-list { width: auto; }
    .calendar { height: 650px; }
}
@media (max-width: 700px) {
    :root { --topbar-h: 112px; }
    .topbar { padding: .75rem; gap: .6rem; }
    .brand-wordmark { display: none; }
    .topnav { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .15rem; }
    .topnav a { justify-content: center; text-align: center; white-space: normal; min-height: 44px; padding: .4rem .2rem; font-size: .83rem; }
    .page { padding: 1.5rem 1rem 3rem; }
    .page-calendar { padding-inline: .75rem; }
    .space-intro { margin-bottom: 1.25rem; }
    .space-intro h1 { font-size: 1.9rem; }
    .space-intro p.muted { font-size: .9rem; max-width: 32ch; }
    .calendar-toolbar { margin: 0 0 1.25rem; justify-content: flex-start; }
    .calendar { height: clamp(440px, 68dvh, 640px); padding: .8rem .5rem; border-radius: 16px; }
    .calendar .fc .fc-toolbar-title { font-size: 1.3rem; }
    .calendar .fc .fc-button { padding-inline: .5rem; }
    .workspace-switch { background: var(--surface-2); padding: .3rem; border-radius: 12px; margin-bottom: 1rem; }
    .workspace-switch .btn { border: 0; background: transparent; }
    .workspace-switch [aria-pressed=true] { background: var(--surface); color: var(--primary); box-shadow: 0 2px 6px #1d1d1f12; }
    .task-lists { grid-template-columns: 1fr; }
    .task__check { width: 32px; height: 32px; }
    .task__delete { min-width: 36px; min-height: 36px; }
    .card { padding: 1.3rem; border-radius: 16px; }
    .modal { border-radius: 0; height: 100dvh; max-height: 100dvh; }
    .day-heading h1 { font-size: 2rem; }
    .day-summary { gap: .5rem; }
    .day-summary a { padding: .8rem; }
    .day-grid { gap: 1rem; }
    .auth { gap: 1.75rem; }
    .auth-card { padding: 1.35rem; }
}

/* Navigation remains quiet; blue is reserved for actions and the current day. */
.topbar { background: #ffffffeb; backdrop-filter: blur(18px); }
.topnav a { font-size: .88rem; border-radius: 8px; }
.topnav a.active { color: var(--ink); background: #eeeeF1; }
.brand-caption { display: none; }
.date-tile { border-radius: 10px; background: #fff; color: #1d1d1f; border: 1px solid var(--line); }
.date-tile__band, .date-tile--sm .date-tile__band { color: #c93434; background: transparent; }
.date-tile__day { font-weight: 500; }
.space-kicker { display: none; }
.space-intro { margin-top: .3rem; }
.space-intro h1 { letter-spacing: -.04em; }
.btn { border-radius: 9px; font-weight: 500; }
.btn-create { padding: .75rem 1rem; }
.task-list { border: 1px solid var(--line); }
.task-list::before { width: 8px; height: 8px; border-radius: 50%; position: absolute; top: 1.5rem; left: 1rem; }
.task-list__head { padding-left: .8rem; }
.task-list__head h3 { font-size: 1rem; letter-spacing: -.02em; font-weight: 600; }
.task__schedule { font-size: .8rem; text-decoration: none; }
.task__schedule:hover { text-decoration: underline; }
.calendar .fc .fc-toolbar-title { letter-spacing: -.035em; font-size: 1.4rem; }
.calendar .fc .fc-button-primary:not(:disabled).fc-button-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px #0002; }
.calendar .fc .fc-button-group { background: #f0f0f3; }
.calendar .fc .fc-day-today .fc-daygrid-day-number { background: #c93434; }
.calendar .fc .fc-day-today { background: #f3f7fc !important; }
.day-summary strong { font-weight: 500; }
@media (max-width: 700px) {
 .topnav a { font-size: .8rem; }
 .space-intro h1 { font-size: 1.9rem; }
 .calendar .fc .fc-toolbar-title { font-size: 1.25rem; }
}

/* Rounded day cards: use an inset background so spanning events keep their geometry. */
.calendar .fc .fc-dayGridMonth-view .fc-daygrid-day {
    border-color: transparent;
    background: transparent !important;
}
.calendar .fc .fc-dayGridMonth-view .fc-daygrid-day-frame {
    padding: 3px;
}
.calendar .fc .fc-dayGridMonth-view .fc-daygrid-day-frame::before {
    content: '';
    display: block;
    position: absolute;
    inset: 3px;
    z-index: -1;
    pointer-events: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .15s ease, background-color .15s ease;
}
.calendar .fc .fc-dayGridMonth-view .fc-day-sat .fc-daygrid-day-frame::before,
.calendar .fc .fc-dayGridMonth-view .fc-day-sun .fc-daygrid-day-frame::before {
    background: var(--surface-2);
}
.calendar .fc .fc-dayGridMonth-view .fc-day-today .fc-daygrid-day-frame::before {
    background: var(--primary-soft);
    border-color: var(--primary);
}
.calendar .fc .fc-dayGridMonth-view .fc-daygrid-day-frame:hover::before {
    border-color: var(--primary);
}
.calendar .fc .fc-daygrid-event,
.calendar .fc .fc-timegrid-event {
    border-radius: 10px;
}
@media (max-width: 600px) {
    .calendar .fc .fc-dayGridMonth-view .fc-daygrid-day-frame { padding: 2px; }
    .calendar .fc .fc-dayGridMonth-view .fc-daygrid-day-frame::before { inset: 2px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .calendar .fc .fc-dayGridMonth-view .fc-daygrid-day-frame::before { transition: none; }
}

.calendar .fc .fc-dayGridMonth-view { isolation: isolate; }

.google-login .field-help { margin: .75rem 0; line-height: 1.5; }
.auth-divider { display: flex; align-items: center; gap: 1rem; color: var(--ink-soft); font-size: .85rem; margin: 1.5rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.google-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1rem; }
.calendar-google { margin-bottom: 1rem; font-size: .85rem; }

.auth-hero .auth-brand { font-size: 1.5rem; font-weight: 600; letter-spacing: -.04em; color: var(--ink); margin: 0 0 1.5rem; }
