/* ==========================================================================
   Kamla Trust – admin panel
   Same "Civic Dignity" tokens as the website, denser layout for data work.
   ========================================================================== */

:root {
  --c-burgundy: #7a1f3d;
  --c-burgundy-dark: #5c0427;
  --c-wine: #4b1530;
  --c-terracotta: #c56a4a;
  --c-terracotta-dark: #a85335;
  --c-gold: #d6a84f;
  --c-gold-light: #f7e7c4;
  --c-green: #5e8c61;
  --c-green-dark: #3f6642;
  --c-blue: #3d6a8a;
  --c-error: #ba1a1a;

  --c-bg: #fcf6f3;
  --c-cream: #fff8f2;
  --c-beige: #f3e6da;
  --c-surface-low: #faf1e9;
  --c-white: #ffffff;
  --c-border: #eadcd4;
  --c-border-strong: #dbc7bc;
  --c-text: #2d2326;
  --c-muted: #6e6064;

  --font-sans: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --shadow-1: 0 4px 20px -2px rgba(45, 35, 38, 0.05);
  --shadow-2: 0 12px 32px -4px rgba(75, 21, 48, 0.12);
  --ring: 0 0 0 3px rgba(122, 31, 61, 0.16);

  --sidebar-w: 272px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: .9375rem; line-height: 1.55; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--c-burgundy); }
h1, h2, h3, h4 { margin: 0 0 .5rem; color: var(--c-wine); line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid var(--c-burgundy); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--c-wine); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 1rem; }

.icon {
  font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 1.25rem; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; display: inline-block; width: 1em; overflow: hidden; flex-shrink: 0;
  font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; vertical-align: -0.22em;
}
.icon--fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* ---------------------------------------------------------------- shell -- */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--sidebar-w);
  background: var(--c-white); border-right: 1px solid var(--c-border);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .28s var(--ease), width .28s var(--ease);
}
.shell.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-2); }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(45, 21, 33, .4); opacity: 0; visibility: hidden; transition: opacity .25s; }
.shell.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }

.main { min-width: 0; transition: padding-left .28s var(--ease); }

@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .sidebar-backdrop { display: none; }
  .main { padding-left: var(--sidebar-w); }
  .shell.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
  .shell.sidebar-collapsed .main { padding-left: var(--sidebar-w-collapsed); }
  .shell.sidebar-collapsed .sidebar__label,
  .shell.sidebar-collapsed .sidebar__heading,
  .shell.sidebar-collapsed .sidebar__brand-text,
  .shell.sidebar-collapsed .sidebar__reg,
  .shell.sidebar-collapsed .sidebar__foot-text { display: none; }
  .shell.sidebar-collapsed .sidebar__link { justify-content: center; padding-inline: 0; }
  .shell.sidebar-collapsed .sidebar__brand { justify-content: center; padding-inline: 0; }
  .shell.sidebar-collapsed .sidebar__section { padding-top: .5rem; }
}

.sidebar__brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; min-height: var(--topbar-h); border-bottom: 1px solid var(--c-border); text-decoration: none; }
.sidebar__mark { width: 2.5rem; height: 2.5rem; border-radius: 11px; display: grid; place-items: center; background: var(--c-burgundy); color: #fff8f2; flex-shrink: 0; }
.sidebar__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; background: #fff; }
.sidebar__brand-text { min-width: 0; }
.sidebar__brand-text strong { display: block; color: var(--c-wine); font-size: 1rem; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__brand-text span { display: block; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); font-weight: 600; }

.sidebar__reg { margin: .9rem 1rem 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .75rem; border-radius: 999px; background: #fdf3f5; border: 1px solid #f0dde2; font-size: .75rem; font-weight: 600; color: var(--c-text); }
.sidebar__reg .icon { color: var(--c-terracotta); font-size: 1.05rem; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; scrollbar-width: thin; }
.sidebar__section { padding-top: 1.1rem; }
.sidebar__heading { padding: 0 .75rem .4rem; font-size: .6875rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--c-muted); }
.sidebar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidebar__link {
  display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; border-radius: var(--radius-lg);
  color: var(--c-text); text-decoration: none; font-weight: 550; font-size: .9063rem; transition: background-color .15s, color .15s;
}
.sidebar__link .icon { color: var(--c-muted); font-size: 1.3rem; transition: color .15s; }
.sidebar__link:hover { background: var(--c-surface-low); color: var(--c-burgundy); }
.sidebar__link:hover .icon { color: var(--c-burgundy); }
.sidebar__link.is-active { background: var(--c-burgundy-dark); color: #fff; box-shadow: 0 8px 18px -10px rgba(92, 4, 39, .8); }
.sidebar__link.is-active .icon { color: #fff; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

.sidebar__foot { padding: .9rem 1rem; border-top: 1px solid var(--c-border); display: flex; align-items: center; gap: .6rem; font-size: .75rem; color: var(--c-muted); }
.sidebar__foot .icon { color: var(--c-green); }

/* --------------------------------------------------------------- topbar -- */
.topbar {
  position: sticky; top: 0; z-index: 40; min-height: var(--topbar-h);
  display: flex; align-items: center; gap: .75rem; padding: .75rem clamp(1rem, 2vw, 1.75rem);
  background: rgba(252, 246, 243, .9); border-bottom: 1px solid var(--c-border);
}
@supports (backdrop-filter: blur(8px)) { .topbar { backdrop-filter: blur(10px) saturate(1.3); } }

.icon-btn {
  width: 2.5rem; height: 2.5rem; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: var(--radius-lg);
  background: var(--c-white); border: 1px solid var(--c-border); color: var(--c-wine); cursor: pointer; text-decoration: none; position: relative;
}
.icon-btn:hover { background: var(--c-beige); }

.topbar__search { flex: 1; max-width: 460px; position: relative; display: none; }
.topbar__search .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.topbar__search input { width: 100%; height: 2.5rem; padding: 0 .9rem 0 2.6rem; font: inherit; font-size: .875rem; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-white); color: var(--c-text); }
.topbar__search input:focus { outline: none; border-color: var(--c-burgundy); box-shadow: var(--ring); }
@media (min-width: 768px) { .topbar__search { display: block; } }

.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.topbar__site { display: none !important; }
@media (min-width: 900px) { .topbar__site { display: inline-flex !important; } }

.user-menu { position: relative; }
.user-menu__trigger { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; border: 1px solid transparent; background: none; font: inherit; cursor: pointer; color: var(--c-text); text-align: left; }
.user-menu__trigger:hover, .user-menu.is-open .user-menu__trigger { background: var(--c-white); border-color: var(--c-border); }
.avatar { width: 2.35rem; height: 2.35rem; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--c-burgundy-dark); color: #fff; font-weight: 700; font-size: .8125rem; letter-spacing: .02em; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu__meta { display: none; line-height: 1.2; }
.user-menu__meta strong { display: block; font-size: .875rem; color: var(--c-wine); }
.user-menu__meta span { font-size: .75rem; color: var(--c-muted); }
@media (min-width: 640px) { .user-menu__meta { display: block; } }

.menu {
  position: absolute; right: 0; top: calc(100% + .5rem); min-width: 220px; padding: .4rem; z-index: 70;
  background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.user-menu.is-open .menu { opacity: 1; visibility: visible; transform: none; }
.menu a, .menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .7rem; border-radius: var(--radius); border: 0; background: none; font: inherit; font-size: .875rem; color: var(--c-text); text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--c-surface-low); color: var(--c-burgundy); }
.menu hr { border: 0; border-top: 1px solid var(--c-border); margin: .35rem 0; }
.menu .menu__danger { color: var(--c-error); }

/* -------------------------------------------------------------- content -- */
.content { padding: clamp(1rem, 2.2vw, 2rem) clamp(1rem, 2vw, 1.75rem) 3rem; max-width: 1480px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 800; margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--c-muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0 0 .5rem; padding: 0; font-size: .8125rem; color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-burgundy); }
.breadcrumb li + li::before { content: "›"; margin-right: .25rem; color: var(--c-border-strong); }
.breadcrumb [aria-current] { color: var(--c-text); font-weight: 600; }

.welcome {
  position: relative; overflow: hidden; padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); border-radius: var(--radius-xl); margin-bottom: 1.5rem;
  background: linear-gradient(120deg, #fdf0f2 0%, #fff6ef 100%); border: 1px solid #f0dde2;
}
.welcome::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(122, 31, 61, .05); }
.welcome h1 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); font-weight: 800; margin-bottom: .35rem; }
.welcome p { color: var(--c-muted); margin: 0; max-width: 46rem; }
.welcome__chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; background: #fff; border: 1px solid #f0dde2; font-size: .75rem; font-weight: 700; color: var(--c-burgundy); margin-bottom: .9rem; }
.welcome__chip::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--c-terracotta); }

/* ----------------------------------------------------------------- grid -- */
.grid { display: grid; gap: 1.25rem; }
.grid--stats { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .grid--2 { grid-template-columns: 1.6fr 1fr; } }
.mt { margin-top: 1.25rem; }

/* ---------------------------------------------------------------- cards -- */
.panel { background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-1); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--c-border); }
.panel__head h2 { font-size: 1.0625rem; margin: 0; }
.panel__head p { margin: .15rem 0 0; font-size: .8125rem; color: var(--c-muted); }
.panel__body { padding: 1.25rem; }
.panel__foot { padding: .9rem 1.25rem; border-top: 1px solid var(--c-border); font-size: .8125rem; color: var(--c-muted); }

.stat {
  background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-1);
  padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; position: relative;
}
.stat__label { font-size: .8125rem; font-weight: 600; color: var(--c-muted); padding-right: 3rem; }
.stat__value { font-size: 1.75rem; font-weight: 800; color: var(--c-wine); letter-spacing: -0.02em; line-height: 1.15; }
.stat__meta { font-size: .8125rem; color: var(--c-muted); display: flex; align-items: center; gap: .3rem; }
.stat__icon { position: absolute; top: 1rem; right: 1rem; width: 2.5rem; height: 2.5rem; border-radius: 10px; display: grid; place-items: center; background: #fdf0f2; color: var(--c-burgundy); }
.stat__icon--terracotta { background: #fdf0ea; color: var(--c-terracotta-dark); }
.stat__icon--gold { background: #fdf5e4; color: #8a6420; }
.stat__icon--green { background: #eef5ee; color: var(--c-green-dark); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--c-border); font-size: .875rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist__label { display: flex; align-items: center; gap: .6rem; color: var(--c-text); }
.checklist__label .icon { color: var(--c-muted); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--c-border); font-size: .875rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline__dot { width: 2rem; height: 2rem; border-radius: 50%; background: var(--c-surface-low); color: var(--c-burgundy); display: grid; place-items: center; flex-shrink: 0; }
.timeline__dot .icon { font-size: 1.05rem; }
.timeline small { display: block; color: var(--c-muted); font-size: .75rem; }

.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.roadmap li { display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem; border-radius: var(--radius-lg); background: var(--c-surface-low); border: 1px solid var(--c-border); font-size: .8125rem; font-weight: 600; }
.roadmap li .icon { color: var(--c-muted); }
.roadmap li.is-done { background: #eef5ee; border-color: #c9dfca; }
.roadmap li.is-done .icon { color: var(--c-green-dark); }

/* --------------------------------------------------------------- badges -- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 650; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; opacity: .85; }
.badge--published, .badge--approved, .badge--active, .badge--completed, .badge--successful, .badge--success { background: #eef5ee; color: var(--c-green-dark); border-color: #c9dfca; }
.badge--draft, .badge--inactive, .badge--closed, .badge--archived { background: #f3efee; color: #5f5357; border-color: #e2d9d6; }
.badge--pending, .badge--new, .badge--scheduled, .badge--under-review, .badge--warning { background: #fdf5e4; color: #7a5716; border-color: #efd9a8; }
.badge--rejected, .badge--failed, .badge--cancelled, .badge--spam, .badge--danger { background: #fdf0ef; color: #9b1c16; border-color: #f0c1bc; }
.badge--ongoing, .badge--info, .badge--read, .badge--replied { background: #eef3f8; color: #2f5673; border-color: #cddbe7; }
.badge--role { background: #fdf0f2; color: var(--c-burgundy); border-color: #f0dde2; }
.badge--role::before { display: none; }

/* -------------------------------------------------------------- buttons -- */
.btn {
  --btn-bg: var(--c-burgundy-dark); --btn-fg: #fff; --btn-bd: transparent; --btn-hover: var(--c-wine);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem; padding: .5rem 1rem;
  font: inherit; font-size: .875rem; font-weight: 650; line-height: 1.2; white-space: nowrap; text-decoration: none; cursor: pointer;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd); border-radius: var(--radius-lg);
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: var(--btn-hover); color: var(--btn-fg); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn--secondary { --btn-bg: var(--c-white); --btn-fg: var(--c-wine); --btn-bd: var(--c-border); --btn-hover: var(--c-beige); }
.btn--soft { --btn-bg: #fdf0f2; --btn-fg: var(--c-burgundy); --btn-bd: #f0dde2; --btn-hover: #fae3e8; }
.btn--gold { --btn-bg: #fbe9c3; --btn-fg: #5c410c; --btn-bd: #f0d494; --btn-hover: #f7dfa9; }
.btn--danger { --btn-bg: #b3261e; --btn-hover: #8c1d18; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-muted); --btn-hover: var(--c-surface-low); }
.btn--sm { min-height: 2rem; padding: .3rem .7rem; font-size: .8125rem; }
.btn--lg { min-height: 3rem; padding: .75rem 1.4rem; font-size: .9375rem; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- forms -- */
.field { margin-bottom: 1.15rem; }
.label { display: block; font-size: .8125rem; font-weight: 650; color: var(--c-text); margin-bottom: .35rem; }
.label .req { color: var(--c-error); margin-left: .1rem; }
.input, .select, .textarea {
  width: 100%; min-height: 2.75rem; padding: .55rem .85rem; font: inherit; font-size: .9063rem; color: var(--c-text);
  background: var(--c-white); border: 1px solid var(--c-border-strong); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 7rem; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-burgundy); box-shadow: var(--ring); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--c-error); }
.input-group { position: relative; }
.input-group .input { padding-right: 2.75rem; }
.input-group__btn { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 2.1rem; height: 2.1rem; border: 0; background: none; border-radius: var(--radius); display: grid; place-items: center; color: var(--c-muted); cursor: pointer; }
.input-group__btn:hover { background: var(--c-surface-low); color: var(--c-burgundy); }
.input-with-icon { position: relative; }
.input-with-icon > .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.input-with-icon .input { padding-left: 2.6rem; }
.help { font-size: .75rem; color: var(--c-muted); margin-top: .3rem; }
.field-error { font-size: .78rem; color: var(--c-error); margin-top: .3rem; display: flex; align-items: center; gap: .25rem; }
.field-error .icon { font-size: 1rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--c-burgundy); }

.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-lg); border: 1px solid; font-size: .875rem; margin-bottom: 1rem; }
.alert .icon { margin-top: .05rem; }
.alert--success { background: #f1f7f1; border-color: #c9dfca; color: #2f5532; }
.alert--error   { background: #fdf0ef; border-color: #f0c1bc; color: #8c1d18; }
.alert--warning { background: #fff8e8; border-color: #ecd49a; color: #6b4d0e; }
.alert--info    { background: #fbf2f4; border-color: #ecd3da; color: var(--c-wine); }

/* ---------------------------------------------------------------- table -- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); background: var(--c-surface-low); padding: .7rem 1rem; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table tbody tr:hover { background: #fffbf8; }
.table tbody tr:last-child td { border-bottom: 0; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--c-muted); }
.empty .icon { font-size: 2.25rem; width: auto; color: var(--c-border-strong); display: block; margin: 0 auto .5rem; }
.empty strong { display: block; color: var(--c-wine); margin-bottom: .2rem; }

/* --------------------------------------------------------------- toasts -- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 300; display: grid; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
.toast {
  display: flex; align-items: flex-start; gap: .7rem; padding: .85rem .9rem; border-radius: var(--radius-lg);
  background: var(--c-white); border: 1px solid var(--c-border); border-left: 4px solid var(--c-burgundy); box-shadow: var(--shadow-2);
  font-size: .875rem; animation: toast-in .3s var(--ease);
}
.toast.is-leaving { animation: toast-out .25s var(--ease) forwards; }
.toast__icon { color: var(--c-burgundy); }
.toast--success { border-left-color: var(--c-green); } .toast--success .toast__icon { color: var(--c-green-dark); }
.toast--error { border-left-color: var(--c-error); } .toast--error .toast__icon { color: var(--c-error); }
.toast--warning { border-left-color: var(--c-gold); } .toast--warning .toast__icon { color: #8a6420; }
.toast__msg { flex: 1; padding-top: .05rem; }
.toast__close { border: 0; background: none; color: var(--c-muted); cursor: pointer; padding: 0; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 4px; }
.toast__close:hover { background: var(--c-surface-low); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---------------------------------------------------------------- modal -- */
.modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 1rem; background: rgba(45, 21, 33, .45); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__dialog { width: min(440px, 100%); background: var(--c-white); border-radius: var(--radius-xl); box-shadow: var(--shadow-2); padding: 1.5rem; transform: scale(.96); transition: transform .2s var(--ease); }
.modal.is-open .modal__dialog { transform: none; }
.modal__icon { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: #fdf0ef; color: var(--c-error); margin-bottom: 1rem; }
.modal__dialog h2 { font-size: 1.125rem; }
.modal__dialog p { color: var(--c-muted); font-size: .9063rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }

/* ------------------------------------------------------------ auth page -- */
.auth { min-height: 100vh; display: grid; background: var(--c-cream); }
@media (min-width: 960px) { .auth { grid-template-columns: 1.05fr 1fr; } }
.auth__aside {
  display: none; position: relative; overflow: hidden; padding: 3rem; color: #fff8f2;
  background:
    radial-gradient(circle at 15% 20%, rgba(214, 168, 79, .28), transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(197, 106, 74, .35), transparent 45%),
    linear-gradient(145deg, var(--c-wine), var(--c-burgundy));
}
.auth__aside::before { content: ""; position: absolute; inset: 0; opacity: .14; background-image: radial-gradient(rgba(255, 248, 242, .9) 1px, transparent 1.5px); background-size: 24px 24px; }
@media (min-width: 960px) { .auth__aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth__aside > * { position: relative; }
.auth__aside h2 { color: #fff8f2; font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; max-width: 30rem; }
.auth__aside p { color: rgba(255, 248, 242, .82); max-width: 30rem; font-size: 1rem; }
.auth__brand { display: flex; align-items: center; gap: .75rem; color: #fff8f2; text-decoration: none; font-weight: 800; font-size: 1.125rem; }
.auth__brand .sidebar__mark { background: rgba(255, 248, 242, .14); border: 1px solid rgba(255, 248, 242, .25); }
.auth__points { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .8rem; }
.auth__points li { display: flex; align-items: center; gap: .7rem; font-weight: 500; }
.auth__points .icon { color: var(--c-gold); }
.auth__main { display: grid; place-items: center; padding: 2rem 1rem; }
.auth__card { width: min(420px, 100%); }
.auth__card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .35rem; }
.auth__card > p { color: var(--c-muted); margin-bottom: 1.75rem; }
.auth__mobile-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 2rem; text-decoration: none; color: var(--c-wine); font-weight: 800; }
@media (min-width: 960px) { .auth__mobile-brand { display: none; } }
.auth__foot { margin-top: 2rem; font-size: .8125rem; color: var(--c-muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.auth__foot a { color: var(--c-muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.stat__value--sm { font-size: 1.25rem; }
.grid > * { min-width: 0; }
.checklist .badge { white-space: normal; text-align: right; }
