/* ═══════════════════════════════════════════════════════════════════════
   HerWork — shared styles (shell, badges, toasts, FAB). Mobile-first.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --parrot: #8cc63f;
  --parrot-50: #f0f9e6;
  --parrot-100: #e1f3cc;
  --parrot-700: #5a8922;
  --brand-strong: #4a7419;      /* ≥4.5:1 with white — used for text & filled buttons */
  --sky: #29abe2;
  --sky-50: #e3f2fd;
  --sky-700: #1565c0;
  --charcoal: #2d3748;
  --slate: #5f6b7a;             /* darkened from #718096 for 4.5:1 on white */
  --warm: #fafbfc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --danger: #dc2626;
  --danger-50: #fef2f2;

  --sw-full: 288px;
  --sw-mini: 80px;
  --hh: 64px;
  --tap: 44px;
  --gutter: clamp(16px, 3vw, 32px);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 4px 20px rgb(0 0 0 / 0.06);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', var(--font-body);
  --font-num: 'Space Grotesk', var(--font-body);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Components set display:flex; the hidden attribute must still win. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--warm);
  color: var(--charcoal);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.4;
  overflow-x: clip;              /* clip (not hidden) keeps position:sticky working */
}
svg { flex-shrink: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ═══ SIDEBAR — compact by default (mobile), expanded on desktop ═══ */
.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 50;
  width: var(--sw-mini);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-inline-end: 1px solid var(--gray-100);
  transform: translateX(-100%);
  visibility: hidden;            /* off-canvas links must not be tabbable */
  transition: transform 0.3s ease-out, width 0.3s ease-out, visibility 0s linear 0.3s;
}
.sidebar.mob-open {
  transform: none;
  visibility: visible;
  transition: transform 0.3s ease-out, width 0.3s ease-out, visibility 0s;
}

.sb-header {
  height: var(--hh);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid var(--gray-100);
}
.sb-logo-wrap { display: flex; align-items: center; gap: 0; flex: 0 0 auto; min-width: 0; overflow: hidden; }
.logo-box {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--parrot), var(--sky));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgb(140 198 63 / 0.28);
}
.logo-box span { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: #fff; }
.brand-txt {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: opacity 0.2s, max-width 0.3s;
}
.collapse-btn {
  display: none;
  width: 36px; height: 36px;
  border: 0; border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate);
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s;
}
.collapse-btn:hover { background: var(--gray-100); }
.collapse-btn svg { width: 20px; height: 20px; transition: transform 0.3s; }
.sidebar.mini .collapse-btn svg { transform: rotate(180deg); }

.sb-user { display: none; padding: 16px; border-bottom: 1px solid var(--gray-100); flex-shrink: 0; }
.user-inner { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius); background: var(--gray-50); }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--parrot);
  background: linear-gradient(135deg, #a8d8a8, var(--parrot));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl-badge {
  display: inline-flex; align-items: center;
  margin-top: 3px; padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-strong), var(--sky-700));
  color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 11px;
}
.mini-avatar-wrap { display: flex; justify-content: center; align-items: center; padding: 8px 0 4px; flex-shrink: 0; }

.sb-nav { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.nav-btn,
.logout-btn {
  position: relative;
  width: 100%;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-weight: 500;
  font-size: 14px;
  color: var(--slate);
  white-space: nowrap;
  text-align: start;
  transition: background-color 0.2s, color 0.2s;
}
.nav-btn:hover { background: var(--gray-50); color: var(--charcoal); }
.nav-btn[aria-current='page'] { background: var(--parrot-50); color: var(--brand-strong); }
.nav-btn svg, .logout-btn svg { width: 20px; height: 20px; }
.nav-lbl, .logout-lbl {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s, max-width 0.3s;
}
.ndot {
  position: absolute;
  top: 2px; right: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sb-footer { padding: 8px; border-top: 1px solid var(--gray-100); flex-shrink: 0; }
.logout-btn:hover { background: var(--danger-50); color: var(--danger); }

.mob-overlay { display: none; position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 0.4); }
.mob-overlay.show { display: block; }

/* ═══ MAIN + TOPBAR ═══ */
.main {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: margin-inline-start 0.3s ease-out;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--hh);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gutter);
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.greeting { min-width: 0; }
.greeting-sub { font-size: 12px; color: var(--slate); }
.greeting-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(15px, 2.5vw, 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mob-menu-btn {
  display: flex;
  width: var(--tap); height: var(--tap);
  align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate);
  flex-shrink: 0;
}
.mob-menu-btn svg { width: 20px; height: 20px; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.earn-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--parrot-50); }
.earn-pill svg { width: 16px; height: 16px; stroke: var(--brand-strong); }
.earn-pill span { font-family: var(--font-num); font-weight: 600; font-size: 14px; color: var(--brand-strong); white-space: nowrap; }
.bell-btn {
  position: relative;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: var(--radius);
  background: var(--gray-50);
  color: var(--slate);
  display: flex; align-items: center; justify-content: center;
}
.bell-btn svg { width: 20px; height: 20px; }
.bell-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.avatar-btn {
  display: flex; align-items: center; gap: 6px;
  min-height: var(--tap);
  padding: 6px;
  border: 0; border-radius: var(--radius);
  background: transparent;
}
.av-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: linear-gradient(135deg, #a8d8a8, var(--parrot));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 13px; color: #fff;
  overflow: hidden;
}
.avatar-btn > svg { width: 16px; height: 16px; stroke: var(--slate); }

.page { padding: var(--gutter); display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 420px) {
  .earn-pill { padding: 6px 10px; }
  .earn-pill svg, .avatar-btn > svg { display: none; }
}
/* Very small phones (≤360px): keep the name readable next to the balance */
@media (max-width: 360px) {
  .topbar { gap: 6px; padding-inline: 12px; }
  .topbar-left { gap: 4px; }
  .topbar-right { gap: 4px; }
  .greeting-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .earn-pill { padding: 5px 8px; }
  .earn-pill span { font-size: 13px; }
}

/* ═══ Desktop: sidebar becomes persistent and expandable ═══ */
@media (min-width: 1025px) {
  .sidebar {
    width: var(--sw-full);
    transform: none;
    visibility: visible;
    transition: width 0.3s ease-out;
  }
  .sidebar.mini { width: var(--sw-mini); }
  .collapse-btn { display: flex; }
  .mob-menu-btn, .mob-overlay, .mob-overlay.show { display: none; }

  .sidebar:not(.mini) .sb-header { justify-content: space-between; padding: 0 16px; gap: 0; }
  .sidebar:not(.mini) .sb-logo-wrap { flex: 1; gap: 12px; }
  .sidebar:not(.mini) .brand-txt { max-width: 160px; opacity: 1; }
  .sidebar:not(.mini) .sb-user { display: block; }
  .sidebar:not(.mini) .mini-avatar-wrap { display: none; }
  .sidebar:not(.mini) .sb-nav { padding: 12px; }
  .sidebar:not(.mini) .sb-footer { padding: 4px 12px 12px; }
  .sidebar:not(.mini) :is(.nav-btn, .logout-btn) { justify-content: flex-start; padding: 12px; gap: 12px; }
  .sidebar:not(.mini) .nav-btn[aria-current='page'] { border-inline-start: 4px solid var(--parrot); padding-inline-start: 8px; }
  .sidebar:not(.mini) :is(.nav-lbl, .logout-lbl) { max-width: 140px; opacity: 1; }
  .sidebar:not(.mini) .ndot { top: 50%; right: 10px; transform: translateY(-50%); width: 18px; height: 18px; font-size: 10px; }

  .main { margin-inline-start: var(--sw-full); }
  .main.mini { margin-inline-start: var(--sw-mini); }
}

/* ═══ Status badges (shared) ═══ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--charcoal);
}
.status-badge svg { width: 12px; height: 12px; }
.status-icon { display: inline-flex; }
.status-icon:empty { display: none; }
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.pending svg { stroke: #f59e0b; }
.status-badge.approved { background: var(--parrot-50); color: var(--brand-strong); }
.status-badge.approved svg { stroke: var(--brand-strong); }
.status-badge.in-progress { background: var(--sky-50); color: var(--sky-700); }
.status-badge.in-progress svg { stroke: var(--sky-700); }
.status-badge.in-review { background: #ede9fe; color: #5b21b6; }
.status-badge.in-review svg { stroke: #7c3aed; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.status-badge.rejected svg { stroke: #dc2626; }

/* ═══ App toast (replaces alert) ═══ */
.app-toast {
  position: fixed;
  z-index: 210;
  inset-inline: 16px;
  top: calc(var(--hh) + 12px);
  max-width: 480px;
  margin-inline: auto;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #1a1a2e;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s;
}
.app-toast.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s, transform 0.25s; }
.app-toast[data-tone='error'] { background: #7f1d1d; }
.app-toast[data-tone='warn'] { background: #7c2d12; }
.app-toast[data-tone='success'] { background: #14532d; }

/* ═══ WhatsApp FAB ═══ */
.wa-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 100;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgb(37 211 102 / 0.45);
}
.wa-fab svg { width: 28px; height: 28px; }
@media (min-width: 641px) { .wa-fab { right: 24px; bottom: 24px; } }

/* ═══ Shimmer (also injected by hw_store; kept so pages render without it).
   !important is intentional: the shimmer must override any component style. ═══ */
@keyframes hw-shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
.hw-shim {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%) !important;
  background-size: 600px 100% !important;
  animation: hw-shimmer 1.4s infinite linear !important;
  color: transparent !important;
  border-radius: 6px;
  min-width: 60px;
  display: inline-block;
}
.hw-shim * { visibility: hidden !important; }
.hw-shim-block {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 600px 100%;
  animation: hw-shimmer 1.4s infinite linear;
  border-radius: 10px;
}

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

/* ═══════════════════════════════════════════════════════════════════════
   SHARED UI KIT — used by every page (shell.js + common.js)
   ═══════════════════════════════════════════════════════════════════════ */

/* Icons: one sprite (shell.js), referenced with <svg class="i"><use href="#i-name"/></svg> */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 8px;
  inset-inline-start: -9999px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--charcoal);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus-visible { inset-inline-start: 8px; }

.sb-logo-wrap { color: var(--charcoal); border-radius: var(--radius); }
.logo-box.has-img { background: #fff; box-shadow: none; overflow: hidden; }
.logo-box.has-img img { width: 100%; height: 100%; object-fit: contain; }
.wa-fab .i { width: 28px; height: 28px; }

/* ── Skeletons: any element with [data-skel] shimmers while it is empty ── */
@keyframes hw-skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skel-bg,
[data-skel]:empty::before {
  background: linear-gradient(90deg, #eef0f3 25%, #e1e4e8 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: hw-skel 1.4s ease infinite;
}
[data-skel]:empty::before {
  content: '';
  display: inline-block;
  width: var(--skel-w, 8ch);
  max-width: 100%;
  height: 0.85em;
  border-radius: 6px;
  vertical-align: middle;
}
[data-skel='block']:empty::before { display: block; width: 100%; height: 1em; margin-block: 0.2em; }
[data-skel='lines']:empty::before,
[data-skel='lines']:empty::after { display: block; width: 100%; height: 0.85em; border-radius: 6px; }
[data-skel='lines']:empty::after {
  content: '';
  width: 60%;
  margin-top: 0.5em;
  background: linear-gradient(90deg, #eef0f3 25%, #e1e4e8 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: hw-skel 1.4s ease infinite;
}
.skel-card { border-radius: var(--radius-xl); min-height: 180px; }

/* ── Top loading bar (only appears if loading takes > 200ms) ── */
@keyframes hw-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.hw-progress {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 250;
  height: 3px;
  overflow: hidden;
  background: rgb(140 198 63 / 0.2);
}
.hw-progress::after {
  content: '';
  position: absolute;
  inset-block: 0;
  width: 40%;
  background: linear-gradient(90deg, var(--parrot), var(--sky));
  animation: hw-bar 1.1s ease-in-out infinite;
}

/* ── Offline banner ── */
.offline-bar {
  position: fixed;
  z-index: 205;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #1f2937;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

/* ── Buttons ── */
.btn {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.15s, transform 0.15s, opacity 0.15s;
}
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.6; cursor: not-allowed; transform: none; pointer-events: none; }
.btn-primary { background: var(--brand-strong); color: #fff; }
.btn-primary:hover { background: #3c5f14; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--charcoal); border-color: var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); }
.btn-ghost {
  min-height: 36px;
  padding: 6px 10px;
  background: transparent;
  color: var(--brand-strong);
  font-weight: 500;
}
.btn-ghost:hover { background: var(--parrot-50); }

/* ── Cards & headers ── */
.card {
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.card-title .i { color: var(--brand-strong); }
.page-hdr { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.page-hdr h1 { font-family: var(--font-head); font-weight: 700; font-size: clamp(22px, 4vw, 28px); }
.page-hdr p { margin-top: 4px; font-size: 14px; color: var(--slate); }

/* ── Progress bar & ring: set --pct (0–100) via setPct() ── */
.prog-bg { height: 8px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--parrot), var(--sky));
  transform-origin: left center;
  transform: scaleX(calc(var(--pct, 0) / 100));
  transition: transform 0.8s ease-out;
}
.ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.ring > svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: #e2e8f0; }
.ring-value {
  fill: none;
  stroke: url(#ring-grad);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--pct, 0));
  transition: stroke-dashoffset 1.2s ease-out;
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ── Tabs ── */
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--gray-200); }
.tab {
  min-height: var(--tap);
  margin-bottom: -1px;
  padding: 12px clamp(14px, 3vw, 24px);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-weight: 500;
  font-size: 14px;
  color: var(--slate);
}
.tab:hover { color: var(--charcoal); }
.tab[aria-selected='true'] { color: var(--brand-strong); border-bottom-color: var(--parrot); }

/* ── Entrance animation (disabled by prefers-reduced-motion above) ── */
@keyframes hw-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: hw-fade-up 0.45s ease both; animation-delay: calc(var(--i, 0) * 50ms); }

/* ═══ Confirm dialog (common.js → confirmDialog) ═══ */
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.confirm-dialog {
  width: min(400px, calc(100% - 32px));
  margin: auto;
  padding: 28px 24px 24px;
  border: 0;
  border-radius: var(--radius-xl);
  background: #fff;
  color: var(--charcoal);
  text-align: center;
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.25), 0 2px 8px rgb(15 23 42 / 0.08);
  animation: confirm-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.confirm-dialog::backdrop {
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: confirm-fade 0.2s ease both;
}
.confirm-dialog.is-closing { animation: confirm-out 0.16s ease both; }
.confirm-dialog.is-closing::backdrop { animation: confirm-fade 0.16s ease reverse both; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes confirm-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes confirm-fade { from { opacity: 0; } }

.confirm-badge {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--danger-50);
  color: var(--danger);
}
/* soft halo ring */
.confirm-badge::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  border: 6px solid rgb(220 38 38 / 0.06);
}
.confirm-dialog.tone-primary .confirm-badge { background: var(--parrot-50); color: var(--brand-strong); }
.confirm-dialog.tone-primary .confirm-badge::before { border-color: rgb(140 198 63 / 0.12); }

.confirm-title { margin-bottom: 8px; font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.3; }
.confirm-text { font-size: 14.5px; line-height: 1.6; color: var(--slate); }
.confirm-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-50);
  font-size: 13px;
  color: #991b1b;
}
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.confirm-actions .btn { min-height: 48px; border-radius: var(--radius); font-size: 15px; }
.confirm-actions .btn[aria-busy='true'] { opacity: 0.85; cursor: progress; }
@media (max-width: 360px) {
  .confirm-actions { grid-template-columns: 1fr; }
  .confirm-actions .btn-outline { order: 2; }
}
