/* Redeem page - redesigned to match admin style */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #e8f1ff;
  --accent: #06b6d4;

  --bg-main: #f3f7ff;
  --bg-surface: #ffffff;

  --text-main: #0b1220;
  --text-muted: #5b6b84;
  --border-base: #dbe6f5;

  --success: #16a34a;
  --danger: #dc2626;

  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 22px 45px rgba(30, 64, 175, 0.16);

  --radius-md: 12px;
  --radius-lg: 18px;
}

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

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 10% -10%, rgba(37, 99, 235, 0.18), transparent 35%),
    radial-gradient(circle at 95% 0%, rgba(6, 182, 212, 0.16), transparent 30%),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  line-height: 1.5;
}

.container {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  align-items: start;
}

.header {
  grid-column: 1 / -1;
  text-align: left;
  padding: 18px 22px;
  border: 1px solid var(--border-base);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
}

.header h1 {
  font-size: 1.95rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.subtitle { color: var(--text-muted); }

.redeem-notice {
  margin-top: 14px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #fff1f2, #fff7ed);
  color: #9f1239;
  border: 1px solid #fecdd3;
  border-left: 5px solid #e11d48;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.12);
  overflow: hidden;
}

.notice-icon {
  flex: 0 0 auto;
  font-size: 1rem;
}

.notice-track {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.notice-track span {
  display: inline-block;
  padding-left: 100%;
  animation: notice-marquee 12s linear infinite;
}

@keyframes notice-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.step {
  display: none;
}

.step.active,
#step1,
#warrantyResult,
#step3 {
  display: block;
}

.card {
  background: var(--bg-surface);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

#step1 .card { box-shadow: var(--shadow-lg); }

.card h2 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfe0f6;
  border-radius: 12px;
  background: #fff;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: .2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.form-help {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: .78rem;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 20px rgba(37,99,235,0.22);
}

.btn-primary:hover { background: linear-gradient(135deg, var(--primary-hover), #0891b2); }

.btn-secondary {
  color: #1e2d4a;
  background: #fff;
  border: 1px solid #cfe0f6;
}

.warranty-section {
  margin-top: 20px !important;
  padding-top: 18px !important;
  border-top: 1px dashed #d5e3f5 !important;
}

.result-details {
  background: #f8fbff;
  border: 1px solid var(--border-base);
  border-radius: 12px;
  padding: 12px;
}

.result-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e4edf8;
}

.result-detail-item:last-child { border-bottom: none; }

.toast {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 200;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border-base);
  box-shadow: var(--shadow-sm);
  display: none;
}

.toast.show { display: block; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@media (max-width: 980px) {
  .container { grid-template-columns: 1fr; width: min(560px, 100%); }
  .header { text-align: center; }
}
