:root {
  /* edgeDx brand */
  --edx-orange: #f17a22;
  --edx-orange-dark: #d46312;
  --edx-cyan: #00aeef;
  --edx-cyan-dim: #008fc4;
  --edx-gray: #939598;
  --edx-ink: #1a1c1e;
  --edx-muted: #6b7075;
  --edx-surface: #f3f6f9;
  --edx-card: #ffffff;
  --edx-ok: #1f8a4c;
  --edx-warn: #c47d0e;
  --edx-dark: #0a0a0a;
  --edx-panel: #12151a;

  --phone-radius: 28px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 174, 239, 0.22), transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(241, 122, 34, 0.18), transparent 45%),
    linear-gradient(165deg, #1a1d22 0%, #0a0a0a 55%, #11151a 100%);
  color: var(--edx-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.phone {
  width: 390px;
  max-width: 100%;
  min-height: 780px;
  background: #111;
  border-radius: var(--phone-radius);
  padding: 12px;
  box-shadow: var(--shadow);
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 2;
}

.screen {
  background: var(--edx-surface);
  border-radius: 20px;
  min-height: 756px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--edx-ink);
}

.app-header {
  background: linear-gradient(135deg, var(--edx-orange) 0%, var(--edx-orange-dark) 55%, #b84e0c 100%);
  color: #fff;
  padding: 14px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.app-header .brand-copy {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.app-header p {
  margin: 4px 0 0;
  opacity: 0.92;
  font-size: 13px;
}

.content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--edx-card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 174, 239, 0.08);
  border: 1px solid rgba(0, 174, 239, 0.08);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.muted {
  color: var(--edx-muted);
  font-size: 13px;
}

.amount {
  font-size: 34px;
  font-weight: 800;
  color: var(--edx-orange-dark);
  letter-spacing: -0.02em;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.qr-wrap canvas,
.qr-wrap img {
  border-radius: 12px;
  border: 8px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.btn-primary {
  background: var(--edx-orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--edx-orange-dark);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(0, 174, 239, 0.12);
  color: var(--edx-cyan-dim);
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill-live {
  background: rgba(0, 174, 239, 0.18);
  color: var(--edx-cyan-dim);
}

.pill-pending {
  background: #fff3d6;
  color: var(--edx-warn);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #e8eef3;
}

.row:last-child {
  border-bottom: none;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 174, 239, 0.15);
  color: var(--edx-cyan-dim);
  display: grid;
  place-items: center;
  font-size: 36px;
  margin: 8px auto 12px;
}

.log {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: #0d1116;
  color: #b8e8f8;
  border-radius: 12px;
  padding: 12px;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.5;
}

.log .event {
  margin-bottom: 6px;
}

.log .time {
  color: var(--edx-orange);
}

.pulse {
  animation: pulse 1.2s ease-out 1;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(241, 122, 34, 0.55);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(241, 122, 34, 0);
  }
}

.error {
  background: #fde8e8;
  color: #9b1c1c;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.setup {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.setup-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.setup-brand img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.setup h1 {
  margin: 0;
}

.setup .powered {
  margin: 0;
  font-size: 12px;
  color: var(--edx-gray);
}

.setup .powered span {
  color: var(--edx-orange);
  font-weight: 700;
}

.setup a {
  color: var(--edx-cyan-dim);
  font-weight: 600;
}

.setup-grid {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.setup-grid label {
  font-size: 13px;
  font-weight: 600;
}

.setup-grid input {
  padding: 10px 12px;
  border: 1px solid #cfd6dd;
  border-radius: 10px;
  font-size: 15px;
}

.setup-grid input:focus {
  outline: 2px solid rgba(0, 174, 239, 0.35);
  border-color: var(--edx-cyan);
}

.link-cards {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.link-cards a {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--edx-surface);
  text-decoration: none;
  border-left: 3px solid var(--edx-orange);
  color: var(--edx-ink);
}

.link-cards a:hover {
  background: rgba(0, 174, 239, 0.08);
}
