/* lautandigital.id */

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

:root {
  --primary:     #4f46e5;
  --primary-hover: #4338ca;
  --success:     #16a34a;
  --danger:      #dc2626;
  --bg:          #f1f5f9;
  --card-bg:     #ffffff;
  --text:        #1e293b;
  --muted:       #64748b;
  --border:      #cbd5e1;
  --border-focus:#4f46e5;
  --radius:      14px;
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.10);
  --transition:  0.2s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  padding: 24px 16px;
}

/* ── Card ── */
.card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  overflow: hidden;
}

/* ── Icon ── */
.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #ede9fe;
  border-radius: 50%;
  margin-bottom: 20px;
  color: var(--primary);
}

.shield-icon {
  width: 32px;
  height: 32px;
}

/* ── Typography ── */
.title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.email {
  font-weight: 600;
  color: var(--primary);
}

/* ── OTP Inputs ── */
.otp-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.otp-box {
  width: 52px;
  height: 60px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  caret-color: var(--primary);
}

.otp-box:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.otp-box.filled {
  border-color: var(--primary);
  background: #eef2ff;
}

.otp-box.error {
  border-color: var(--danger);
  background: #fef2f2;
  animation: shake 0.35s ease;
}

.otp-separator {
  font-size: 1.2rem;
  color: var(--border);
  user-select: none;
  margin: 0 2px;
}

/* ── Error message ── */
.error-msg {
  min-height: 20px;
  font-size: 0.82rem;
  color: var(--danger);
  margin-bottom: 20px;
  transition: opacity var(--transition);
}

/* ── Verify button ── */
.btn-verify {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  letter-spacing: 0.01em;
}

.btn-verify:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-verify:active:not(:disabled) {
  transform: translateY(0);
}

.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-verify.loading {
  opacity: 0.8;
  cursor: wait;
}

/* ── Resend row ── */
.resend-row {
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-resend {
  background: none;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition);
}

.btn-resend:disabled {
  color: var(--muted);
  cursor: not-allowed;
  font-weight: 400;
}

.btn-resend:not(:disabled):hover {
  text-decoration: underline;
}

/* ── Success overlay ── */
.success-overlay {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.success-overlay svg {
  width: 72px;
  height: 72px;
  color: var(--success);
}

.success-overlay p {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

.success-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Footer ── */
.credit {
  margin-top: 28px;
  font-size: 0.78rem;
  color: var(--muted);
}

.credit a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.credit a:hover {
  text-decoration: underline;
}

/* ── Shake animation ── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card {
    padding: 36px 24px 32px;
  }

  .otp-box {
    width: 44px;
    height: 52px;
    font-size: 1.3rem;
  }

  .otp-inputs {
    gap: 7px;
  }
}
