/* =============== */
/* Base + Reset    */
/* =============== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #000 100%);
  color: #e5e7eb;
}

/* =============== */
/* App Layout      */
/* =============== */

.dv-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

/* Status-based themes */
.dv-status-ok {
  background: radial-gradient(circle at top, #022c22 0, #020617 40%, #000 100%);
}

.dv-status-warn {
  background: radial-gradient(circle at top, #450a0a 0, #020617 40%, #000 100%);
}

.dv-status-info {
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #000 100%);
}

/* =============== */
/* Header          */
/* =============== */

.dv-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.dv-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0, #22c55e 0, #16a34a 45%, #022c22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.55);
}

.dv-logo-text-mark {
  font-weight: 700;
  font-size: 16px;
  color: #ecfdf5;
}

.dv-logo-block {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.dv-logo-title {
  font-size: 18px;
  font-weight: 600;
}

.dv-logo-subtitle {
  font-size: 11px;
  color: #94a3b8;
}

/* Status pill */

.dv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dv-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.dv-pill-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.dv-pill-ok {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.dv-pill-warn {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

/* =============== */
/* Main Card       */
/* =============== */

.dv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dv-card-wrapper {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.dv-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 16px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, #111827 0, #020617 70%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.9);
  min-height: 150px;
  position: relative;
  overflow: hidden;
}

/* Glow overlays based on status */
.dv-app.dv-status-ok .dv-card::before,
.dv-app.dv-status-warn .dv-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  opacity: 0.12;
  pointer-events: none;
}

.dv-app.dv-status-ok .dv-card::before {
  background: radial-gradient(circle at top, #22c55e 0, transparent 60%);
}

.dv-app.dv-status-warn .dv-card::before {
  background: radial-gradient(circle at top, #f97373 0, transparent 60%);
}

.dv-card-icon {
  flex-shrink: 0;
}

.dv-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, #1d4ed8 0, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.5);
}

.dv-icon-ok {
  background: radial-gradient(circle at 30% 0, #22c55e 0, #022c22 60%);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
}

.dv-icon-warn {
  background: radial-gradient(circle at 30% 0, #f97373 0, #450a0a 60%);
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.6);
}

.dv-icon-info {
  background: radial-gradient(circle at 30% 0, #1d4ed8 0, #020617 60%);
}

.dv-icon-symbol {
  font-size: 26px;
}

.dv-card-text {
  flex: 1;
  min-width: 0;
}

.dv-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dv-sub {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.dv-details {
  font-size: 14px;
}

/* Details text styles */

.dv-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 2px;
}

.dv-value {
  font-size: 14px;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.dv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.dv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 11px;
  color: #e5e7eb;
}

.dv-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.dv-footer-note {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 8px;
}

/* =============== */
/* Helper section  */
/* =============== */

.dv-helper {
  max-width: 480px;
  width: 100%;
  margin: 16px auto 0;
}

.dv-helper-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.dv-helper-icon {
  flex-shrink: 0;
}

/* =============== */
/* Footer          */
/* =============== */

.dv-footer {
  max-width: 480px;
  width: 100%;
  margin: 18px auto 0;
  font-size: 11px;
  color: #6b7280;
}

/* =============== */
/* Loading overlay */
/* =============== */

.dv-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  background: rgba(15, 23, 42, 0.55);
  z-index: 20;
  flex-direction: column;
  gap: 8px;
}

.dv-hidden {
  display: none;
}

.dv-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.4);
  border-top-color: #22c55e;
  animation: dv-spin 0.8s linear infinite;
}

.dv-loading-text {
  font-size: 13px;
  color: #e5e7eb;
}

/* =============== */
/* Animations      */
/* =============== */

@keyframes dv-spin {
  to {
    transform: rotate(360deg);
  }
}

.dv-animate-pop {
  animation: dv-pop 0.35s ease-out;
}

@keyframes dv-pop {
  0% {
    transform: scale(0.96);
    opacity: 0;
  }
  55% {
    transform: scale(1.02);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.dv-animate-shake {
  animation: dv-shake 0.35s ease;
}

@keyframes dv-shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

/* =============== */
/* Small screens   */
/* =============== */

@media (max-width: 380px) {
  .dv-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .dv-pill {
    margin-left: auto;
  }

  .dv-title {
    font-size: 20px;
  }

  .dv-card {
    padding: 16px 12px;
    gap: 12px;
  }
}
/* ========================= */
/* NEXT STEP instruction bar */
/* ========================= */

.dv-next-step-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.3;
  animation: dv-next-pop 260ms ease-out;
}

.dv-next-step-icon {
  font-size: 15px;
}

.dv-next-step-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.dv-next-step-text {
  font-weight: 500;
  white-space: normal;
}

/* Variants */
.dv-next-step-info {
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #dbeafe;
}

.dv-next-step-ok {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #bbf7d0;
}

.dv-next-step-warn {
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fee2e2;
}

/* Subtle pop animation */
@keyframes dv-next-pop {
  from {
    transform: translateY(4px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
