/* Snap risk page â€” refined tokens, calmer risk table, aligned with app shell */

.snap-create {
  --sc-bg: var(--theme-gray-50);
  --sc-surface: var(--theme-white);
  --sc-border: var(--theme-gray-100);
  --sc-text: var(--theme-black);
  --sc-muted: var(--theme-gray-500);
  --sc-accent: var(--theme-black);
  --sc-accent-soft: var(--theme-gray-50);
  --sc-risk-header: var(--theme-white);
  --sc-risk-header-bg: var(--theme-gray-900);
  --sc-risk-border: var(--theme-gray-600);
  --sc-rpn: var(--theme-gray-900);
  --sc-rpn-bg: var(--theme-gray-50);
  --sc-focus: var(--theme-red-bright);
  --sc-radius: 16px;
  --sc-radius-sm: 10px;
  --sc-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.07);
}

/*
 * Single-page snap layout: fill AppShell main, scroll preview + form in columns (desktop).
 * Mobile: natural document scroll on `.dashboard-main`.
 */
.dashboard-main.snap-create {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  padding-bottom: 8px;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--sc-bg);
  display: flex;
  flex-direction: column;
}

@media (min-width: 1025px) {
  .app-shell-content-main .dashboard-main.snap-create {
    overflow: hidden;
  }
}

/* â”€â”€ Header â”€â”€ */
.snap-create-header {
  margin: 0;
  flex-shrink: 0;
  padding: 14px var(--app-page-pad-x, 20px) 0;
}

.snap-create-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px 20px;
  flex-wrap: wrap;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--sc-border);
}

.snap-create-header-text {
  flex: 1;
  min-width: 0;
}

.snap-create-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

.snap-create-title {
  margin: 0 0 8px;
  font-size: clamp(1.28rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--sc-text);
  line-height: 1.2;
}

.snap-create-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--sc-muted);
  font-weight: 500;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.snap-create-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid var(--sc-border);
  background: var(--sc-surface);
  border-radius: var(--sc-radius-sm);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--theme-gray-600);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.snap-create-back:hover {
  background: var(--sc-accent-soft);
  border-color: var(--theme-gray-200);
}

.snap-create-back:focus-visible {
  outline: 2px solid var(--sc-focus);
  outline-offset: 2px;
}

.snap-create-back-icon {
  font-size: 19px;
  line-height: 1;
  margin-top: -1px;
  opacity: 0.85;
}

.snap-create-error {
  background: var(--theme-red-soft);
  border: 1px solid var(--theme-red-border);
  color: var(--theme-red-deep);
  padding: 12px 16px;
  border-radius: var(--sc-radius-sm);
  font-size: 14px;
  margin: 0 20px 12px;
  line-height: 1.45;
  flex-shrink: 0;
}

/* â”€â”€ Card: fills main below header; split uses remaining viewport height on desktop â”€â”€ */
.snap-create-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  border-top: 1px solid var(--sc-border);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .snap-create-card {
    flex: 0 1 auto;
    min-height: auto;
    overflow: visible;
  }
}

/* Two columns: preview | form; each column scrolls independently on wide screens */
.snap-create-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 46vw) minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 1025px) {
  .snap-create-split {
    /* One row fills flex height so left/right scroll areas get a bounded height */
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .snap-create-split {
    grid-template-columns: 1fr;
    flex: 0 1 auto;
    min-height: auto;
  }
}

.snap-create-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--sc-border);
  background: var(--sc-accent-soft);
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .snap-create-left {
    border-right: none;
    border-bottom: 1px solid var(--sc-border);
    overflow: visible;
    min-height: auto;
  }
}

.snap-create-right {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: transparent;
}

@media (max-width: 1024px) {
  .snap-create-right {
    flex: 0 1 auto;
    min-height: auto;
  }
}

/* Media (top of left column) */
.snap-create-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px var(--app-page-pad-x, 18px) 18px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--sc-border);
  background: linear-gradient(180deg, var(--theme-gray-50) 0%, var(--sc-accent-soft) 100%);
}

.snap-create-detail-block {
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--sc-border);
  flex-shrink: 0;
}

.snap-create-detail-block:last-of-type {
  border-bottom: none;
  padding-bottom: 22px;
}

.snap-create-block-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-gray-600);
}

.snap-create-block-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--sc-muted);
  line-height: 1.45;
}

.snap-create-media-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

.snap-create-media-frame {
  aspect-ratio: 4 / 3;
  width: 100%;
  min-height: 300px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--theme-black), var(--theme-gray-900));
  border: 1px solid var(--theme-gray-200);
  box-shadow: 0 4px 20px rgba(14,165,233,0.15), inset 0 0 0 1px rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.snap-create-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.snap-create-img-placeholder {
  min-height: 200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--theme-gray-400);
  font-size: 14px;
}

.snap-create-media-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.snap-create-edit-mark {
  border: 1px solid var(--theme-red-bright);
  background: var(--theme-white);
  color: var(--theme-red-deep);
  border-radius: var(--sc-radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.snap-create-edit-mark:hover:not(:disabled) {
  background: var(--theme-gray-50);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.snap-create-edit-mark:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.snap-create-edit-mark:focus-visible {
  outline: 2px solid var(--sc-focus);
  outline-offset: 2px;
}

.snap-create-edit-legacy-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--sc-muted);
  max-width: 42ch;
}

.snap-create-edit-legacy-note strong {
  color: var(--theme-gray-600);
  font-weight: 700;
}

.snap-create-dl {
  margin: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--sc-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--theme-gray-50);
}

.snap-create-dl-item {
  display: grid;
  grid-template-columns: minmax(100px, 32%) 1fr;
  gap: 14px 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sc-border);
  align-items: start;
}

.snap-create-dl-item:last-child {
  border-bottom: none;
}

.snap-create-dl-item dt {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--sc-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  padding-top: 2px;
}

.snap-create-dl-item dd {
  margin: 0;
  font-size: 15px;
  color: var(--sc-text);
  line-height: 1.5;
  word-break: break-word;
}

/* Risk form (right column): header fixed, body scrolls */
.snap-create-risk-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-top: none;
  background: transparent;
  border-left: 3px solid transparent;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

@media (max-width: 1024px) {
  .snap-create-risk-section {
    flex: 0 1 auto;
    min-height: auto;
    overflow: visible;
  }
}

.snap-create-risk-section--has-cache {
  border-left-color: var(--theme-maroon, #7a1530);
  box-shadow: inset 6px 0 0 rgba(122, 21, 48, 0.06);
}

.snap-create-risk-head {
  padding: 20px 22px 14px;
  background: var(--sc-bg);
  border-bottom: 1px solid var(--sc-border);
  flex-shrink: 0;
}

.snap-create-risk-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.snap-create-risk-head-text {
  flex: 1;
  min-width: 0;
}

.snap-create-risk-head h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sc-text);
  letter-spacing: -0.02em;
}

.snap-create-risk-lead {
  margin: 0;
  font-size: 14px;
  color: var(--sc-muted);
  line-height: 1.55;
  max-width: none;
}

.snap-create-form-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  padding: 16px 20px 24px;
}

@media (max-width: 1024px) {
  .snap-create-form-scroll {
    flex: 0 1 auto;
    min-height: auto;
    overflow: visible;
  }
}

/* ORAC sections: multiple columns on wide form area; one column on narrow */
.snap-create-form-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  align-content: start;
}

.snap-create-form-sections-grid .snap-create-form-section {
  margin-bottom: 0;
}

.snap-create-form-loading {
  margin: 0;
  font-size: 15px;
  color: var(--sc-muted);
}

.snap-create-form-msg {
  margin: 0;
  font-size: 15px;
  color: var(--sc-muted);
  line-height: 1.55;
}

.snap-create-form-msg--error {
  color: var(--theme-red-deep);
  background: var(--theme-red-soft);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--theme-red-border);
}

.snap-create-form-msg--muted {
  font-size: 14px;
  font-style: italic;
  color: var(--theme-gray-400);
}

.snap-create-form-section {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border-radius: 12px;
  border-left: 3px solid var(--theme-red-bright);
  background: var(--theme-white);
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
  transition: box-shadow 0.2s;
}
.snap-create-form-section:hover {
  box-shadow: 0 2px 10px rgba(14,165,233,0.1);
}



.snap-create-form-section--extra {
  border: 1px dashed var(--theme-gray-200);
  border-radius: 14px;
  padding: 16px 16px 18px;
  background: var(--theme-gray-50);
}

.snap-create-extra-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.snap-create-extra-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-red-deep);
  background: var(--theme-gray-50);
  border: 1px solid var(--theme-gray-200);
  padding: 4px 8px;
  border-radius: 6px;
}

.snap-create-extra-title-input {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.snap-create-extra-remove {
  flex-shrink: 0;
  border: 1px solid var(--theme-red-border);
  background: var(--theme-white);
  color: var(--theme-red);
  border-radius: var(--sc-radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.snap-create-extra-remove:hover {
  background: var(--theme-red-soft);
  border-color: var(--theme-red-muted);
}

.snap-create-extra-remove:focus-visible {
  outline: 2px solid var(--sc-focus);
  outline-offset: 2px;
}

.snap-create-section-title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--theme-gray-600);
  letter-spacing: -0.02em;
}

.snap-create-section-title--inline {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.snap-create-q-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.snap-create-q-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snap-create-q-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--sc-text);
  line-height: 1.4;
}

.snap-create-field-control {
  max-width: 100%;
}

.snap-create-table-wrap {
  flex: 0 1 auto;
  overflow: visible;
  background: var(--theme-gray-50);
  padding: 0 0 4px;
  min-height: auto;
}

.snap-create-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1080px;
  font-size: 13px;
}

.snap-create-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(90deg, var(--theme-gray-900) 0%, var(--theme-black) 100%);
  color: var(--theme-gray-100);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  padding: 14px 12px;
  border-bottom: 2px solid var(--theme-gray-600);
  vertical-align: bottom;
  white-space: normal;
  line-height: 1.35;
  max-width: 200px;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.snap-create-th-index,
.snap-create-td-index {
  width: 44px;
  min-width: 44px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--theme-gray-600);
  background: var(--theme-gray-50) !important;
}

.snap-create-table tbody tr:nth-child(even) td {
  background: var(--theme-gray-50);
}

.snap-create-table tbody tr:nth-child(odd) td {
  background: var(--theme-white);
}

.snap-create-table tbody td {
  border-bottom: 1px solid var(--sc-border);
  padding: 10px 10px;
  vertical-align: top;
  transition: background 0.12s ease;
}

.snap-create-table tbody tr:hover td {
  background: var(--theme-gray-50) !important;
}

.snap-create-rpn {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  background: var(--sc-rpn-bg) !important;
  color: var(--sc-rpn);
  min-width: 56px;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--theme-gray-100);
}

.snap-create-input,
.snap-create-textarea,
.snap-create-select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--theme-gray-200);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  font-family: inherit;
  background: var(--theme-white);
  color: var(--sc-text);
  min-height: 38px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.snap-create-select {
  cursor: pointer;
  padding-right: 28px;
}

.snap-create-input:focus,
.snap-create-textarea:focus,
.snap-create-select:focus {
  outline: none;
  border-color: var(--theme-red-bright);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.18);
  background: var(--theme-white);
}

.snap-create-textarea {
  resize: vertical;
  min-height: 56px;
}

/* Footer (under form, right column) */
.snap-create-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 22px 18px;
  border-top: 1px solid var(--sc-border);
  background: var(--sc-accent-soft);
  flex-shrink: 0;
}

.snap-create-clear {
  border: 1px solid var(--sc-border);
  background: var(--sc-surface);
  border-radius: var(--sc-radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--theme-gray-600);
  margin-right: auto;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.snap-create-clear:hover {
  background: var(--theme-gray-50);
  border-color: var(--theme-gray-200);
}

.snap-create-clear:focus-visible {
  outline: 2px solid var(--sc-focus);
  outline-offset: 2px;
}

.snap-create-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.snap-create-submit {
  border: none;
  border-radius: var(--sc-radius-sm);
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  background: linear-gradient(135deg, var(--theme-red-bright) 0%, var(--theme-gray-600) 100%);
  color: var(--theme-white);
  box-shadow: 0 4px 14px rgba(14,165,233,0.32);
  transition: box-shadow 0.18s ease, transform 0.1s ease;
  letter-spacing: 0.01em;
}

.snap-create-submit:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(14,165,233,0.45);
  transform: translateY(-1px);
}

.snap-create-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.snap-create-submit:focus-visible {
  outline: 2px solid var(--sc-focus);
  outline-offset: 2px;
}

.snap-create-submit-secondary {
  background: var(--sc-surface);
  color: var(--theme-gray-600);
  border: 1px solid var(--sc-border);
  box-shadow: none;
}

.snap-create-submit-secondary:hover:not(:disabled) {
  filter: none;
  background: var(--theme-gray-50);
  border-color: var(--theme-gray-200);
  box-shadow: none;
}

.snap-create-cache-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--theme-gray-600);
  margin: 10px 0 0;
  max-width: 320px;
}

.snap-create-left-cache {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-maroon, #7a1530);
  background: rgba(122, 21, 48, 0.08);
  border: 1px solid rgba(122, 21, 48, 0.28);
  border-radius: var(--sc-radius-sm);
  max-width: 320px;
  line-height: 1.4;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.snap-create-left-cache-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(122, 21, 48, 0.18);
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.snap-create-left-cache--flash {
  background: rgba(34, 139, 34, 0.14);
  border-color: rgba(34, 139, 34, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.22);
}

.snap-create-queue-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-maroon, #7a1530);
  background: rgba(122, 21, 48, 0.08);
  border: 1px solid rgba(122, 21, 48, 0.28);
  border-radius: var(--sc-radius-sm);
  line-height: 1.45;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.snap-create-queue-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(122, 21, 48, 0.18);
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.snap-create-queue-badge--flash {
  animation: snap-create-cache-flash 0.85s ease-out 2;
  background: rgba(34, 139, 34, 0.14);
  border-color: rgba(34, 139, 34, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.22);
}

@keyframes snap-create-cache-flash {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.015);
  }
  100% {
    transform: scale(1);
  }
}

.snap-create-q-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.snap-create-q-field--combined-child {
  margin-left: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--sc-border, var(--theme-gray-100));
  padding-bottom: 10px;
  padding-top: 10px;
}

.snap-create-footer-actions--wrap {
  justify-content: flex-end;
}

/* SAT-style RPN: computed field colour bands (x < 8 low, 8 <= x < 32 medium, x >= 32 high) */
.snap-create-rpn-input.snap-create-rpn-band--low {
  border-color: rgba(34, 139, 34, 0.55);
  background: rgba(34, 139, 34, 0.08);
}

.snap-create-rpn-input.snap-create-rpn-band--med {
  border-color: rgba(200, 150, 0, 0.65);
  background: rgba(255, 200, 0, 0.12);
}

.snap-create-rpn-input.snap-create-rpn-band--high {
  border-color: rgba(192, 0, 0, 0.55);
  background: rgba(220, 38, 38, 0.1);
}

@media (max-width: 600px) {
  .snap-create-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .snap-create-error {
    margin-left: 12px;
    margin-right: 12px;
  }

  .snap-create-dl-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* In-page confirm dialogs (replaces window.confirm) */
.snap-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  animation: snap-confirm-fade 0.2s ease;
}

@keyframes snap-confirm-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.snap-confirm-dialog {
  width: min(100%, 420px);
  background: var(--sc-surface, var(--theme-white));
  border: 1px solid var(--sc-border, var(--theme-gray-100));
  border-radius: var(--sc-radius, 16px);
  box-shadow: var(--sc-shadow, 0 12px 40px rgba(15, 23, 42, 0.18));
  padding: 22px 22px 18px;
}

.snap-confirm-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sc-text, var(--theme-black));
}

.snap-confirm-body {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--sc-muted, var(--theme-gray-600));
}

.snap-confirm-body strong {
  color: var(--sc-text, var(--theme-black));
  font-weight: 600;
}

.snap-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.snap-confirm-btn {
  font: 600 14px system-ui, sans-serif;
  padding: 10px 18px;
  border-radius: var(--sc-radius-sm, 10px);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.snap-confirm-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.snap-confirm-btn--secondary {
  background: var(--sc-bg, var(--theme-gray-50));
  border-color: var(--sc-border, var(--theme-gray-100));
  color: var(--sc-text, var(--theme-black));
}

.snap-confirm-btn--secondary:hover:not(:disabled) {
  background: var(--theme-gray-100);
}

.snap-confirm-btn--primary {
  background: linear-gradient(135deg, var(--theme-red-bright) 0%, var(--theme-gray-700) 100%);
  color: var(--theme-white);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.snap-confirm-btn--primary:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.snap-confirm-btn--danger {
  background: var(--theme-white);
  border-color: rgba(220, 38, 38, 0.45);
  color: #b91c1c;
}

.snap-confirm-btn--danger:hover:not(:disabled) {
  background: rgba(254, 226, 226, 0.5);
}
