/* ==========================================================================
   Reusable components shared by the storefront and the admin dashboard.
   ========================================================================== */

/* ---------------------------------- buttons ------------------------------- */

.btn {
  --btn-pad-y: 11px;
  --btn-pad-x: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-mid) var(--ease-out),
    transform var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-cta);
}

.btn--primary:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta), var(--shadow-sm);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: var(--surface-glass-2);
  border-color: var(--hairline-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent-line);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--whatsapp-ink);
}

.btn--whatsapp:hover {
  background: color-mix(in srgb, var(--whatsapp) 88%, white);
  transform: translateY(-1px);
}
.btn--whatsapp[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--quiet {
  padding-inline: var(--sp-3);
  color: var(--text-muted);
}

.btn--quiet:hover {
  color: var(--text);
}

.btn--danger {
  background: var(--danger-wash);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  color: var(--danger);
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--danger) 20%, transparent);
}

.btn--sm {
  --btn-pad-y: 7px;
  --btn-pad-x: 14px;
  font-size: var(--fs-sm);
}

.btn--lg {
  --btn-pad-y: 14px;
  --btn-pad-x: 28px;
  font-size: var(--fs-md);
}

.btn--block {
  width: 100%;
}

.btn--square {
  --btn-pad-x: var(--btn-pad-y);
  border-radius: var(--r-md);
}

/* Loading state: swaps the label for a spinner without changing width. */
.btn.is-loading {
  pointer-events: none;
  color: transparent;
  position: relative;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--hairline-strong);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 640ms linear infinite;
}

/* The primary button has dark ink on a light accent fill, so a pale spinner
   would be invisible on it. */
.btn--primary.is-loading::after {
  border-color: color-mix(in srgb, var(--text-on-accent) 28%, transparent);
  border-top-color: var(--text-on-accent);
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

/* ------------------------------- icon buttons ----------------------------- */

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--text-muted);
  transition:
    color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
  background: var(--surface-3);
}

.icon-btn--ok:hover {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  background: var(--ok-wash);
}

.icon-btn--danger:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: var(--danger-wash);
}

/* --------------------------------- surfaces -------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}

/* A true frosted pane: translucent, blurred, and edged with a gradient hairline
   that is lit at the top-left and fades to nothing at the bottom-right.

   That gradient edge is the whole trick. It previously used `--inset-top`, a
   flat 1px line across the top only, which gives a pane no direction for its
   light to come from - so it read as a plain box no matter how translucent the
   fill was. */
.panel--glass {
  position: relative;
  background: var(--surface-glass-2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* The gradient edge below replaces the flat border inherited from .panel.
     Kept transparent rather than removed so box-sizing keeps the same metrics. */
  border-color: transparent;
  box-shadow: var(--shadow-lift);
}

.panel--glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    155deg,
    var(--accent-line),
    var(--hairline-strong) 38%,
    transparent 72%
  );
  /* Punches the middle out so only the 1px padding band paints, leaving a
     gradient border rather than a gradient fill. */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.panel--pad {
  padding: var(--sp-5);
}

/* A 1px accent -> transparent gradient hairline drawn behind the element. */
.gradient-frame {
  position: relative;
  isolation: isolate;
}

.gradient-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), transparent 62%);
  opacity: 0.4;
  transition: opacity var(--t-mid) var(--ease-out);
}

.gradient-frame:hover::before {
  opacity: 0.75;
}

/* --------------------------------- badges ---------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-glass-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.badge--accent {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}

/* The discount tag beside a price. An outline tag, not a solid shout - the
   price itself is already the loudest thing in the card. */
.badge--off {
  padding: 3px 8px;
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

/* -------------------------------- status pill ------------------------------ */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--pending {
  color: var(--warn);
  background: var(--warn-wash);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
  box-shadow: 0 0 12px -4px rgba(251, 191, 36, 0.2);
}

.status--approved {
  color: var(--ok);
  background: var(--ok-wash);
  border-color: color-mix(in srgb, var(--ok) 32%, transparent);
  box-shadow: 0 0 12px -4px rgba(74, 222, 128, 0.15);
}

.status--rejected {
  color: var(--danger);
  background: var(--danger-wash);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  box-shadow: 0 0 12px -4px rgba(248, 113, 113, 0.15);
}

/* ------------------------------- filter pills ----------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition:
    color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-mid) var(--ease-out);
}

.pill:hover {
  color: var(--text);
  border-color: var(--hairline-strong);
}

.pill[aria-pressed='true'] {
  color: var(--text-on-accent);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-cta);
}

.pill__count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}

.pill[aria-pressed='true'] .pill__count {
  color: color-mix(in srgb, var(--text-on-accent) 68%, transparent);
}

/* -------------------------------- logo glyph ------------------------------ */

.logo-glyph {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--glyph-size, 18px);
  height: var(--glyph-size, 18px);
}

.logo-glyph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-glyph__fallback {
  display: none;
  font-size: calc(var(--glyph-size, 18px) * 0.85);
  line-height: 1;
  color: var(--brand, var(--accent-soft));
}

.logo-glyph.is-fallback img {
  display: none;
}

.logo-glyph.is-fallback .logo-glyph__fallback {
  display: block;
}

/* -------------------------------- logo tile ------------------------------- */

.logo-tile {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--brand, var(--accent)) 30%, transparent);
  background: color-mix(in srgb, var(--brand, var(--accent)) 10%, var(--surface-2));
  transition: transform var(--t-mid) var(--ease-out);
}

.logo-tile img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.logo-tile__fallback {
  display: none;
  font-size: 20px;
  color: var(--brand, var(--accent-soft));
}

.logo-tile.is-fallback img {
  display: none;
}

.logo-tile.is-fallback .logo-tile__fallback {
  display: block;
}

.logo-tile--sm {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
}

.logo-tile--sm img {
  width: 18px;
  height: 18px;
}

/* ------------------------------- check list ------------------------------- */

.check-list {
  display: grid;
  gap: 9px;
}

.check-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-2);
}

.check-list i {
  margin-top: 4px;
  font-size: 12px;
  color: var(--accent);
}

/* ---------------------------------- price --------------------------------- */

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
}

.price__was {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.price__now {
  font-family: var(--font-display);
  font-size: var(--fs-price);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}

/* --------------------------------- fields --------------------------------- */

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}

.field__label span {
  color: var(--accent);
}

.field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field__wrap > i {
  position: absolute;
  left: 14px;
  font-size: 13px;
  color: var(--text-faint);
  pointer-events: none;
  transition: color var(--t-fast) var(--ease-out);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  /* 16px keeps iOS from zooming on focus. */
  font-size: var(--fs-md);
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--text);
  transition:
    border-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}

.field__wrap > i + input,
.field__wrap > i + select {
  padding-left: 38px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-wash);
  background: var(--surface-3);
}

.field__wrap:focus-within > i {
  color: var(--accent);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.field__error {
  display: none;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--danger);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: color-mix(in srgb, var(--danger) 60%, transparent);
}

.field.is-invalid .field__error {
  display: block;
}

.field.is-invalid .field__hint {
  display: none;
}

.field-grid {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .field-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------------------- segmented control --------------------------- */

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}

.segmented__option {
  position: relative;
  display: block;
}

.segmented__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.segmented__face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 9px 6px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  transition:
    color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
}

.segmented__option:hover .segmented__face {
  color: var(--text-2);
  background: var(--surface-glass-2);
}

.segmented__option input:checked + .segmented__face {
  color: var(--accent);
  background: var(--accent-wash);
  border-color: var(--accent-line);
}

.segmented__option input:focus-visible + .segmented__face {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -------------------------------- dropzone -------------------------------- */

.dropzone {
  display: grid;
  place-items: center;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  border: 2px dashed var(--hairline-strong);
  border-radius: var(--r-md);
  background: var(--surface-glass-2);
  cursor: pointer;
  transition:
    border-color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}

.dropzone__icon {
  font-size: 20px;
  color: var(--accent);
}

.dropzone__title {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.dropzone__hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.dropzone__file {
  display: none;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: left;
}

.dropzone__file.is-visible {
  display: flex;
}

.dropzone__thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
  color: var(--text-muted);
}

.dropzone__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone__meta {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.dropzone__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.dropzone__size {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Hide the large dropzone area when a file is uploaded */
.dropzone.has-file {
  padding: var(--sp-2) var(--sp-3);
  gap: 0;
}

.dropzone.has-file .dropzone__icon,
.dropzone.has-file .dropzone__title,
.dropzone.has-file .dropzone__hint {
  display: none;
}

.dropzone.has-file::after {
  content: 'Change file';
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 500;
}

/* --------------------------------- coupon --------------------------------- */

.coupon-row {
  margin-block: var(--sp-4);
  padding-block: var(--sp-3);
  border-block: 1px dashed var(--hairline);
}

.coupon-input-group {
  display: flex;
  gap: var(--sp-2);
}

.coupon-input-group input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono, monospace);
}

.coupon-status {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.coupon-status.is-valid {
  color: var(--success, #22c55e);
}

.coupon-status.is-invalid {
  color: var(--danger, #ef4444);
}

.coupon-status i {
  font-size: 0.9em;
}

/* -------------------------------- accordion ------------------------------- */

/* Rules, not boxes. A card per question made the FAQ the heaviest block on the
   page; a hairline-separated list lets it recede until it is needed. The open
   row is marked by an accent underline rather than a filled panel. */
.acc {
  display: grid;
}

.acc__item {
  position: relative;
  border-bottom: 1px solid var(--hairline);
  transition: border-color var(--t-mid) var(--ease-out);
}

.acc__item::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: var(--accent);
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--t-mid) var(--ease-out);
}

.acc__item:hover {
  border-color: var(--hairline-strong);
}

.acc__item.is-open::after {
  scale: 1 1;
}

.acc__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-4) var(--sp-1);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color var(--t-fast) var(--ease-out);
}

.acc__item:hover .acc__trigger {
  color: var(--accent-soft);
}

.acc__icon {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-muted);
  transition:
    rotate var(--t-mid) var(--ease-out),
    color var(--t-mid) var(--ease-out);
}

.acc__item.is-open .acc__icon {
  rotate: 180deg;
  color: var(--accent);
}

/* 0fr -> 1fr animates the real content height with no JS measuring. */
.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-mid) var(--ease-out);
}

.acc__item.is-open .acc__panel {
  grid-template-rows: 1fr;
}

.acc__panel > div {
  overflow: hidden;
}

.acc__body {
  padding: 0 var(--sp-6) var(--sp-5) var(--sp-1);
  font-size: var(--fs-base);
  color: var(--text-2);
}

/* ---------------------------------- toast --------------------------------- */

.toast-stack {
  position: fixed;
  left: var(--sp-4);
  bottom: var(--sp-4);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--sp-2);
  width: min(330px, calc(100vw - 2 * var(--sp-4)));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 11px 13px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition:
    opacity var(--t-mid) var(--ease-out),
    transform var(--t-mid) var(--ease-out);
  pointer-events: auto;
}

.toast.is-in {
  opacity: 1;
  transform: none;
}

.toast__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-wash);
  animation: dot-pulse 2.4s var(--ease-in-out) infinite;
}

@keyframes dot-pulse {
  50% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent);
  }
}

.toast__text {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text-2);
}

.toast__text strong {
  color: var(--text);
}

.toast__meta {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

.toast__close {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--text-faint);
  font-size: 11px;
}

.toast__close:hover {
  color: var(--text);
  background: var(--surface-3);
}

@media (min-width: 640px) {
  .toast-stack {
    left: var(--sp-5);
    bottom: var(--sp-5);
  }
}

/* ---------------------------------- modal --------------------------------- */

.modal {
  /* Centred explicitly rather than via `inset: 0; margin: auto`. With only a
     max-height (no definite height) the auto margins collapse to zero, which
     pinned the dialog to the top-left instead of the middle. */
  position: fixed;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  margin: 0;
  width: min(960px, calc(100vw - 2 * var(--sp-3)));
  max-height: min(92vh, 940px);
  padding: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(0, 12, 26, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal[open] {
  animation: modal-in var(--t-mid) var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

/* Mobile: one scroll container for the whole modal.
   Desktop: the two columns scroll independently (see the media query below). */
.modal__grid {
  display: grid;
  grid-template-columns: 1fr;
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Prevent the grid from stretching beyond content height on desktop,
     which leaves dead space at the bottom when content is short. */
  align-content: start;
}

.modal__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 3;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  transition:
    color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}

.modal__close:hover {
  color: var(--text);
  background: var(--surface-3);
}

.modal__aside {
  padding: var(--sp-5);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--hairline);
}

.modal__main {
  padding: var(--sp-5);
}

@media (min-width: 900px) {
  .modal__grid {
    grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
    overflow: hidden;
  }

  .modal__aside {
    border-bottom: 0;
    border-right: 1px solid var(--hairline);
    padding: var(--sp-6) var(--sp-5);
    max-height: min(92vh, 940px);
    overflow-y: auto;
  }

  .modal__main {
    padding: var(--sp-6);
    max-height: min(92vh, 940px);
    overflow-y: auto;
  }
}

/* --------------------------------- notice --------------------------------- */

.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: var(--fs-sm);
  color: var(--text-2);
}

.notice i {
  margin-top: 3px;
  color: var(--text-muted);
}

.notice--danger {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  background: var(--danger-wash);
  color: var(--danger);
}

.notice--danger i {
  color: var(--danger);
}

.notice--ok {
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
  background: var(--ok-wash);
  color: var(--ok);
}

.notice--ok i {
  color: var(--ok);
}

.notice--info {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--accent);
}

.notice--info i {
  color: var(--accent);
}

.notice[hidden] {
  display: none;
}

/* ------------------------------- copy field ------------------------------- */

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.copy-row__label {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.copy-row__value {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text);
  word-break: break-all;
}

.copy-row button {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px;
  border-radius: var(--r-sm);
}

.copy-row button:hover {
  color: var(--accent);
  background: var(--accent-wash);
}

/* -------------------------------- skeleton -------------------------------- */

.skeleton {
  border-radius: var(--r-md);
  background: linear-gradient(
    100deg,
    var(--surface) 20%,
    var(--surface-2) 40%,
    var(--surface) 60%
  );
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

/* --------------------------------- empty ---------------------------------- */

.empty {
  display: grid;
  place-items: center;
  gap: var(--sp-3);
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  color: var(--text-muted);
}

.empty i {
  font-size: 26px;
  color: var(--text-faint);
}
