/* ============================================================
   Afranga · Dashboard prototype
   Tokens from the Afranga design system. All sizing in rem.
   ============================================================ */

:root {
  /* color tokens */
  --coral: #f86d68;
  --coral-dark: #e35b56;
  --charcoal: #2c2c2c;
  --peach: #fdddb6;
  --peach-dust: #f7d5c0;
  --green: #228658;              /* semantic/positive-text */
  --green-muted: #45c68b;        /* semantic/positive-muted */
  --green-bg: #e2f6ed;
  --ivory: #f7eee5;
  --white: #ffffff;
  --bg-canvas: #fff9f3;
  --bg-light: #fff9f3;
  --surface-subtle: #f3f3f3;
  --border: #e3e1de;
  --track: #efeeec;
  --text-primary: #2c2c2c;
  --text-secondary: #737372;
  --text-muted: #adadad;
  --chart-area: #fdf4ea;

  /* type scale (design system styles) */
  --display-s: italic 400 2.125rem/2.5rem 'Spectral', serif;      /* Display S */
  --number-l: 600 2.125rem/2.5rem 'Montserrat', sans-serif;       /* Number L (SemiBold) */
  --h5: 600 0.9375rem/1.25rem 'Montserrat', sans-serif;           /* H5 */
  --title-l: 600 1.0625rem/1.5rem 'Montserrat', sans-serif;       /* Title L */
  --label-m: 600 0.875rem/1.25rem 'Montserrat', sans-serif;       /* Label M */
  --nav-item: 500 0.875rem/1.25rem 'Montserrat', sans-serif;      /* Nav Item */
  --value: 600 0.8125rem/1.125rem 'Montserrat', sans-serif;       /* Value */
  --body-m: 400 0.875rem/1.25rem 'Montserrat', sans-serif;        /* Body M */
  --body-xs: 400 0.8125rem/1.125rem 'Montserrat', sans-serif;     /* Body XS */
  --body-s: 400 0.75rem/1rem 'Montserrat', sans-serif;            /* Body S */
  --label-s: 600 0.75rem/1rem 'Montserrat', sans-serif;           /* Label S */
  --caption-s: 500 0.6875rem/0.875rem 'Montserrat', sans-serif;   /* Caption S */
  --overline: 600 0.6875rem/1rem 'Montserrat', sans-serif;        /* Overline */

  /* radius + shadow */
  --radius-card: 1.25rem;
  --radius-btn: 0.75rem;
  --shadow-card: 0 0.0625rem 0.125rem rgba(44, 44, 44, 0.04), 0 0.25rem 1rem rgba(44, 44, 44, 0.05);
  --shadow-card-hover: 0 0.125rem 0.25rem rgba(44, 44, 44, 0.05), 0 0.5rem 1.5rem rgba(44, 44, 44, 0.08);
  --shadow-pill: 0 0.25rem 1rem rgba(44, 44, 44, 0.05), 0 0.0625rem 0.125rem rgba(44, 44, 44, 0.04);
  --shadow-pop: 0 0.75rem 2rem rgba(44, 44, 44, 0.16), 0 0.125rem 0.25rem rgba(44, 44, 44, 0.06);

  /* motion (IBM productive: quick, purposeful, no bounce) */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 400ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; }

body {
  font: var(--body-m);
  color: var(--text-primary);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ Shell ============ */

.dashboard {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ============ Top bar (small screens only) ============ */

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: var(--bg-canvas);
  border-bottom: 0.0625rem solid #f0e9e1;
}
.topbar__logo { height: 1.5rem; display: block; }
.topbar__actions { display: flex; align-items: center; gap: 0.625rem; }

/* ============ Sidebar ============ */

.sidebar {
  flex: 0 0 16.5rem;             /* 264 */
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  border-right: 0.0625rem solid #f0e9e1;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar__logo { padding: 0.375rem 0.5rem 1.25rem; }
.sidebar__logo-img { height: 1.625rem; display: block; }

.sidebar__profile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.sidebar__avatar {
  flex: none;
  width: 2.375rem;
  height: 2.375rem;
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: var(--white);
  border-radius: 50%;
  font: var(--value);
}
.sidebar__avatar--small { width: 2.125rem; height: 2.125rem; }

.sidebar__profile-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar__profile-name { font: var(--value); }
.sidebar__profile-id { font: var(--caption-s); font-weight: 400; color: var(--text-secondary); }

.sidebar__bell {
  position: relative;
  margin-left: auto;
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  border: 0.0625rem solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  transition: background var(--t-fast) var(--ease);
  background: var(--white);
}
.sidebar__bell:hover { background: var(--surface-subtle); }
.sidebar__bell svg { width: 1rem; height: 1rem; }
.sidebar__bell-dot {
  position: absolute;
  top: 0.125rem; right: 0.125rem;
  width: 0.4375rem; height: 0.4375rem;
  background: var(--coral);
  border-radius: 50%;
}

.sidebar__caption {
  font: var(--overline);
  letter-spacing: 0.0625rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1.25rem 0.75rem 0.5rem;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 0.125rem; }

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6875rem 0.75rem;
  border-radius: 0.75rem;
  font: var(--nav-item);
  color: var(--text-primary);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.sidebar__item svg { width: 1.0625rem; height: 1.0625rem; flex: none; color: var(--text-secondary); transition: color var(--t-fast) var(--ease); }
.sidebar__item:hover { background: rgba(247, 238, 229, 0.6); }
.sidebar__item--active { background: var(--ivory); font: var(--label-m); }
.sidebar__item--active svg { color: var(--text-primary); }

.sidebar__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 0.0625rem solid #f0e9e1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* ============ Main ============ */

.main {
  flex: 1;
  min-width: 0;
  padding: 2.25rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 84rem;
  margin: 0 auto 1.625rem;
}
.header__title { font: var(--display-s); letter-spacing: -0.0187rem; }
.header__date { font: var(--body-m); color: var(--text-secondary); margin-top: 0.3125rem; }
.header__actions { display: flex; gap: 0.625rem; padding-top: 0.75rem; }

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-btn);
  font: var(--label-m);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--coral); color: var(--white); }
.btn--primary:hover { background: var(--coral-dark); }
.btn--primary:disabled { background: var(--track); color: var(--text-muted); cursor: not-allowed; transform: none; }
.btn--secondary { background: var(--white); border: 0.0625rem solid var(--border); }
.btn--secondary:hover { background: var(--surface-subtle); }
.btn--ghost { background: var(--white); border: 0.0625rem solid var(--border); }
.btn--ghost:hover { background: var(--surface-subtle); }
.btn--small { height: 2.125rem; padding: 0 1.125rem; font: var(--value); }

/* ============ Grid + cards ============ */

.grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 84rem;
  margin: 0 auto;
}
.grid__row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.grid__row--top { align-items: stretch; }

.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-base) var(--ease);
}
.card:hover { box-shadow: var(--shadow-card-hover); }

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card__title { font: var(--h5); }
.card__header-meta { font: var(--body-xs); font-weight: 500; color: var(--text-secondary); }

/* ============ Balance / Income card ============ */

.card--chart { position: relative; flex: 1 1 33rem; min-width: 0; }

.tabs {
  position: relative;
  display: flex;
  padding: 0 1.5rem;
  border-bottom: 0.0625rem solid var(--border);
}
.tabs__tab {
  position: relative;
  padding: 1rem 1rem 0.9375rem;
  font: var(--h5);
  color: var(--text-muted);
  transition: color var(--t-base) var(--ease);
}
.tabs__tab:hover { color: var(--text-secondary); }
.tabs__tab--active { color: var(--text-primary); }
.tabs__underline {
  position: absolute;
  bottom: -0.0625rem;
  height: 0.125rem;
  background: var(--charcoal);
  border-radius: 0.0625rem;
  transition: left var(--t-base) var(--ease), width var(--t-base) var(--ease);
}

.card--chart__body { padding: 1.5rem; }

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hero__figure { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }
.hero__amount {
  font: var(--number-l);
  letter-spacing: -0.0312rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  color: var(--green);
  font: var(--value);
  white-space: nowrap;
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.chip__icon { width: 1rem; height: 1rem; }
.chip--pop { animation: chip-pop var(--t-slow) var(--ease); }
@keyframes chip-pop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* segmented control */
.seg-wrap { position: relative; }

.seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem;
  background: var(--surface-subtle);
  border-radius: 62.4375rem;
}
.seg__pill {
  position: absolute;
  top: 0.1875rem;
  height: calc(100% - 0.375rem);
  background: var(--white);
  border-radius: 62.4375rem;
  box-shadow: var(--shadow-pill);
  transition: left var(--t-base) var(--ease), width var(--t-base) var(--ease);
}
.seg__item {
  position: relative;
  z-index: 1;
  padding: 0.375rem 0.875rem;
  border-radius: 62.4375rem;
  font: var(--value);
  color: var(--text-secondary);
  transition: color var(--t-base) var(--ease);
  display: inline-flex;
  align-items: center;
}
.seg__item:hover { color: var(--text-primary); }
.seg__item--active { color: var(--text-primary); }
.seg__item--icon svg { width: 1.0625rem; height: 1.0625rem; display: block; }
.seg--small .seg__item { padding: 0.3125rem 0.875rem; }
.seg--small .seg__item--active { background: var(--white); box-shadow: var(--shadow-pill); }

/* applied custom range: selector stays put, label sits under it */
.seg__caption {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0.1875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font: var(--label-s);
  color: var(--text-secondary);
  white-space: nowrap;
  animation: chip-pop var(--t-base) var(--ease);
}
.seg__caption:hover { color: var(--text-primary); }
.seg__caption-clear {
  display: grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.seg__caption-clear:hover { background: var(--surface-subtle); color: var(--text-primary); }
.seg__caption-clear svg { width: 0.75rem; height: 0.75rem; }

/* chart */
.chart { position: relative; height: 13.125rem; }
.chart__svg { width: 100%; height: 100%; display: block; overflow: visible; }

.chart__axis {
  display: flex;
  justify-content: space-between;
  padding-top: 0.5rem;
  font: var(--caption-s);
  color: var(--text-secondary);
}

.chart__guide {
  position: absolute;
  top: 0; bottom: 0;
  width: 0.0625rem;
  background: var(--border);
  pointer-events: none;
}
.chart__hover-dot {
  position: absolute;
  width: 0.625rem; height: 0.625rem;
  border-radius: 50%;
  background: var(--charcoal);
  border: 0.125rem solid var(--white);
  box-shadow: 0 0 0 0.0625rem rgba(44, 44, 44, 0.1);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.chart__tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 0.75rem));
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  padding: 0.5rem 0.75rem;
  background: var(--charcoal);
  color: var(--white);
  border-radius: 0.625rem;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
  box-shadow: var(--shadow-pop);
}
.chart__tooltip-date { font: var(--caption-s); color: rgba(255, 255, 255, 0.65); }
.chart__tooltip-value { font: var(--value); color: var(--white); font-variant-numeric: tabular-nums; }

/* chart svg elements */
.chart__gridline { stroke: var(--track); stroke-width: 1; }
.chart__area { fill: var(--chart-area); opacity: 1; transition: opacity var(--t-base) var(--ease); }
.chart__line { fill: none; stroke: var(--charcoal); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__end-dot { fill: var(--charcoal); }
.chart__bar { fill: var(--green-muted); transition: fill var(--t-fast) var(--ease); transform-origin: bottom; }
.chart__bar:hover, .chart__bar--hover { fill: var(--green); }

@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes area-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dot-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* meta line */
.meta {
  margin-top: 1rem;
  font: var(--body-xs);
  color: var(--text-secondary);
  transition: opacity var(--t-fast) var(--ease);
}
.meta b { font-weight: 600; color: var(--text-primary); }
.meta__sep { margin: 0 0.375rem; font-weight: 600; }

/* ============ Date range picker ============ */

.picker {
  position: absolute;
  top: 9.5rem;
  right: 1.5rem;
  z-index: 20;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(-0.375rem) scale(0.98);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.picker--open { opacity: 1; transform: translateY(0) scale(1); }

.picker__body { display: flex; gap: 1.25rem; padding: 1.25rem 1.25rem 1rem; }

.picker__months { display: flex; gap: 1.75rem; flex-wrap: wrap; }

.picker__month { display: flex; flex-direction: column; gap: 0.5rem; }
.picker__month-header { display: flex; align-items: center; }
.picker__month-title { flex: 1; text-align: center; font: var(--value); }
.picker__nav {
  width: 1.625rem; height: 1.625rem;
  display: grid; place-items: center;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  transition: background var(--t-fast) var(--ease);
}
.picker__nav:hover { background: var(--surface-subtle); }
.picker__nav svg { width: 1rem; height: 1rem; }
.picker__nav--hidden { visibility: hidden; }

.picker__weekdays, .picker__week { display: flex; }
.picker__weekday {
  width: 1.875rem; height: 1.25rem;
  display: grid; place-items: center;
  font: var(--caption-s);
  color: var(--text-muted);
}
.picker__day {
  width: 1.875rem; height: 1.875rem;
  display: grid; place-items: center;
  font: var(--body-xs);
  border-radius: 62.4375rem;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.picker__day:not(.picker__day--empty):not(.picker__day--disabled):hover { background: var(--surface-subtle); }
.picker__day--empty { pointer-events: none; }
.picker__day--disabled { color: var(--text-muted); pointer-events: none; }
.picker__day--in-range { background: var(--ivory); border-radius: 0; }
.picker__day--edge { background: var(--charcoal); color: var(--white); font: var(--value); border-radius: 62.4375rem; }

.picker__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-top: 0.0625rem solid var(--border);
}
.picker__summary { font: var(--body-xs); color: var(--text-secondary); }
.picker__summary b { font-weight: 600; color: var(--text-primary); }
.picker__buttons { display: flex; gap: 0.625rem; }

/* ============ Recent income ============ */

.card--income-list {
  flex: 1 1 16rem;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.income-list { margin-top: 1rem; display: flex; flex-direction: column; }
.income-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8125rem 0;
  border-bottom: 0.0625rem solid #f2efeb;
  transition: transform var(--t-fast) var(--ease);
}
.income-list__item:hover { transform: translateX(0.125rem); }
.income-list__icon {
  flex: none;
  width: 2.125rem; height: 2.125rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-primary);
}
.income-list__icon svg { width: 1rem; height: 1rem; }
.income-list__icon--green { background: var(--green-bg); color: var(--green); }
.income-list__text { display: flex; flex-direction: column; gap: 0.0625rem; min-width: 0; }
.income-list__title { font: var(--value); }
.income-list__desc { font: var(--body-s); color: var(--text-secondary); }
.income-list__value { margin-left: auto; font: var(--value); color: var(--green); white-space: nowrap; }

.income-list__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.25rem;
  font: var(--label-s);
  transition: color var(--t-fast) var(--ease);
}
.income-list__link:hover { color: var(--coral); }
.income-list__link svg { width: 1rem; height: 1rem; }

/* ============ Stat cards ============ */

.grid__row--stats .card { flex: 1 1 20rem; }
.card--stat { padding: 1.5rem; }

.stat { display: flex; align-items: center; gap: 2rem; margin-top: 1.125rem; }
.stat__figure { flex: none; display: flex; flex-direction: column; gap: 0.125rem; }
.stat__number { font: 600 1.5rem/2rem 'Montserrat', sans-serif; letter-spacing: -0.0125rem; }
.stat__number--positive { color: var(--green); }
.stat__label { font: var(--body-s); color: var(--text-secondary); }
.stat__band { flex: 1; display: flex; flex-direction: column; gap: 0.625rem; min-width: 0; }

.healthbar { height: 0.5rem; background: var(--track); border-radius: 62.4375rem; overflow: hidden; }
.healthbar__fill { display: block; height: 100%; background: var(--green); border-radius: inherit; }

.termbar { display: flex; height: 0.75rem; border-radius: 62.4375rem; overflow: hidden; gap: 0.0938rem; }
.termbar__seg { display: block; height: 100%; }

.legend { display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; }
.legend__item { display: inline-flex; align-items: center; gap: 0.375rem; font: var(--body-s); color: var(--text-secondary); }
.legend__item b { font-weight: 600; color: var(--text-primary); }
.legend__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--track); }
.legend__dot--green { background: var(--green); }
.legend__dot--charcoal { background: var(--charcoal); }
.legend__dot--gray { background: #8a8a88; }
.legend__dot--light { background: #cfccc7; }
.legend__dot--peach { background: var(--peach-dust); }

/* ============ Referral banner ============ */

.banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: #faebd9;
  border-radius: var(--radius-card);
}
.banner__icon {
  flex: none;
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  background: var(--white);
  border-radius: 1rem;
}
.banner__icon svg { width: 1.375rem; height: 1.375rem; }
.banner__text { flex: 1 1 20rem; min-width: 0; }
.banner__title { font: var(--title-l); }
.banner__desc { font: var(--body-xs); color: var(--text-secondary); margin-top: 0.25rem; max-width: 30rem; }
.banner__link { color: var(--coral); font-weight: 600; text-decoration: underline; text-underline-offset: 0.125rem; }
.banner__copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  height: 2.75rem;
  padding: 0 1.125rem;
  background: var(--white);
  border: 0.0625rem solid var(--border);
  border-radius: var(--radius-btn);
  font: var(--label-m);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.banner__copy:hover { background: var(--surface-subtle); }
.banner__copy:active { transform: scale(0.97); }
.banner__copy svg { width: 1rem; height: 1rem; }

/* ============ Responsive ============ */

@media (max-width: 68rem) {
  .dashboard { flex-direction: column; }
  .topbar { display: flex; }
  .sidebar { display: none; }
  .main { padding-top: 1.25rem; }
}

@media (max-width: 48rem) {
  .main { padding: 1rem 1rem 2rem; }
  .header { margin-bottom: 1.25rem; }
  .header__title { font-size: 1.75rem; line-height: 2.125rem; }
  .header__actions { padding-top: 0; width: 100%; }
  .header__actions .btn { flex: 1; }

  .card--chart__body { padding: 1.25rem 1rem; }
  .tabs { padding: 0 1rem; }
  .hero { margin-bottom: 1.75rem; }
  .seg-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 1.375rem; margin-bottom: -1.375rem; }
  .chart { height: 10.5rem; }
  .chart__axis span:nth-child(even) { display: none; }

  .card--income-list { padding: 1.25rem 1rem; }
  .card--stat { padding: 1.25rem 1rem; }
  .stat { gap: 1.25rem; flex-wrap: wrap; }
  .banner { padding: 1.25rem 1rem; }
  .banner__copy { margin-left: 0; width: 100%; justify-content: center; }

  .picker {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%) scale(0.98);
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
  .picker--open { transform: translate(-50%, -50%) scale(1); }
  .picker__months { justify-content: center; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
