@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600&display=swap');

:root {
  --primary: #F97316;
  --primary-dark: #C2410C;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #f8fafc;
}

* {
  box-sizing: border-box;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
}

.bg-geom {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--primary-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.08) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(var(--primary-rgb), 0.06) 0, rgba(var(--primary-rgb), 0.06) 3px, transparent 3px),
    radial-gradient(circle at 80% 30%, rgba(var(--primary-rgb), 0.06) 0, rgba(var(--primary-rgb), 0.06) 3px, transparent 3px);
  background-size: 60px 60px, 60px 60px, 160px 160px, 200px 200px;
  opacity: 0.6;
  z-index: 0;
}

.container,
.card {
  position: relative;
  z-index: 1;
}

.container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 48px;
  padding: 40px 80px;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero img {
  max-width: 520px;
  width: 100%;
  height: auto;
}

.card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.logo img {
  max-width: 180px;
  height: auto;
}

.title {
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  margin: 0 0 6px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.input-field {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.input-group input {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 12px 14px 12px 42px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.button {
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.button.loading {
  opacity: 0.75;
  pointer-events: none;
}

.button.loading::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255, 255, 255, 1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.button.secondary.loading::after {
  border: 2px solid rgba(var(--primary-rgb), 0.4);
  border-top-color: rgba(var(--primary-rgb), 0.9);
}

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

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.code-inputs input {
  text-align: center;
  padding: 12px 0;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.button.primary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08)) , var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0)) , var(--primary-dark);
}

.button.secondary {
  background: rgba(var(--primary-rgb), 0.18);
  color: var(--primary);
  border: none;
}

.button.secondary:hover {
  background: rgba(var(--primary-rgb), 0.24);
}

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.page-loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(var(--primary-rgb), 0.25);
  border-top-color: rgba(var(--primary-rgb), 1);
  animation: spin 0.8s linear infinite;
}

body.page-loading .page-loader {
  opacity: 1;
  pointer-events: all;
}

.link {
  text-align: center;
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.link:focus {
  outline: none;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  display: none;
}

.alert.success {
  background: #ecfdf3;
  color: #15803d;
}

.alert.error {
  background: #fff1f2;
  color: #b91c1c;
}

.alert.show {
  display: block;
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }

  .hero {
    display: none;
  }

  .card {
    margin: 0 auto;
  }
}
