/* ===== Page background & layout ===== */
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(76, 110, 245, 0.16), transparent 60%),
    radial-gradient(900px 420px at 5% 110%, rgba(112, 72, 232, 0.1), transparent 60%),
    linear-gradient(180deg, #f7f9ff 0%, #eef1fa 100%);
  background-attachment: fixed;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1rem 1.25rem;
}

/* ===== Hero header ===== */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #4c6ef5, #7048e8);
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 10px 24px rgba(76, 110, 245, 0.35);
}

.hero-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Cards ===== */
.card {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 14px 34px rgba(53, 70, 123, 0.14);
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(76, 110, 245, 0.12);
  color: #4c6ef5;
}

.icon-badge-alt {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.badge-live {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.badge-live[data-state='loading'] {
  background: rgba(240, 173, 78, 0.18);
  color: #b97d00;
}

.badge-live[data-state='error'] {
  background: rgba(220, 53, 69, 0.12);
  color: #c92a3a;
}

/* ===== Single ULID display ===== */
.ulid-display {
  background: #f6f8fe;
  border: 1.5px dashed rgba(76, 110, 245, 0.35);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  word-break: break-all;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ulid-display:hover {
  border-color: #4c6ef5;
  background: #f0f3ff;
}

.ulid-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.05rem, 1rem + 1vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #364fc7;
}

/* ===== Batch list ===== */
.batch-list {
  flex: 1;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid rgba(33, 37, 41, 0.08);
  border-radius: 12px;
  background: #fbfcff;
  padding: 0.35rem;
}

.batch-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
}

.batch-row:hover {
  background: rgba(76, 110, 245, 0.07);
}

.batch-index {
  color: #adb5bd;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.4ch;
}

.batch-value {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: #364fc7;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.batch-copy {
  border: 0;
  background: transparent;
  color: #868e96;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.batch-copy:hover {
  background: rgba(76, 110, 245, 0.12);
  color: #4c6ef5;
}

.batch-copy:disabled {
  opacity: 0.55;
  cursor: default;
}

.batch-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 180px;
  color: #adb5bd;
  text-align: center;
  padding: 1.5rem;
}

.batch-empty i {
  font-size: 1.75rem;
}

/* ===== Toast ===== */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #212529;
  color: #fff;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 12px 28px rgba(33, 37, 41, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1080;
  max-width: calc(100vw - 2rem);
}

.toast-wrap.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon i {
  color: #51cf66;
}

.toast-wrap.is-error .toast-icon i {
  color: #ff8787;
}

/* ===== Footer ===== */
.page-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  text-align: center;
  color: #868e96;
  font-size: 0.875rem;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 575.98px) {
  .page {
    padding: 1.5rem 0.75rem 1rem;
  }

  .hero {
    margin-bottom: 1.5rem;
  }

  .hero-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: 15px;
  }

  .batch-list {
    max-height: 320px;
  }
}
