@import url('/css/mobile-base.css');

:root {
  color-scheme: light;
  --bg-gradient-start: #0b1220;
  --bg-gradient-end: #101f3a;
  --card-bg: rgba(255, 255, 255, 0.97);
  --card-border: rgba(255, 255, 255, 0.35);
  --primary: #2152ff;
  --primary-hover: #163ac4;
  --danger: #d64550;
  --success: #1f9d55;
  --text-main: #1b2333;
  --text-muted: #5a6780;
  --shadow: 0 20px 45px rgba(9, 14, 28, 0.25);
  --radius-large: 18px;
  --radius-pill: 999px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: radial-gradient(circle at top, rgba(65, 105, 225, 0.18), rgba(5, 12, 30, 0.92)),
    linear-gradient(160deg, var(--bg-gradient-start), var(--bg-gradient-end));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-main);
}

.auth-shell {
  width: 100%;
  max-width: 420px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}


.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  padding: 36px;
  backdrop-filter: blur(24px);
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.auth-card p.description {
  margin: 0 0 24px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-card form {
  display: grid;
  gap: 18px;
}

.auth-card label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin-bottom: 6px;
}

.auth-card input,
.auth-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(27, 35, 51, 0.15);
  background: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-card input:focus,
.auth-card textarea:focus {
  outline: none;
  border-color: rgba(33, 82, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(33, 82, 255, 0.15);
}

.auth-card select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 12px 44px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(27, 35, 51, 0.2);
  background:
    linear-gradient(135deg, rgba(33, 82, 255, 0.08), rgba(33, 82, 255, 0)) padding-box,
    rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  background-image:
    url("data:image/svg+xml,%3Csvg width='16' height='10' viewBox='0 0 16 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l6 6 6-6' stroke='%232152FF' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0));
  background-repeat: no-repeat;
  background-position: right 16px center, 0 0;
}

.auth-card select:focus {
  outline: none;
  border-color: rgba(33, 82, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(33, 82, 255, 0.18);
}

.auth-card select:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.auth-card select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

select::-ms-expand {
  display: none;
}

.auth-card button.primary-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #3c6dff);
  color: #fff;
  transition: transform var(--transition), box-shadow var(--transition);
}

.auth-card button.secondary-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(33, 82, 255, 0.12);
  color: var(--primary);
  transition: background var(--transition), transform var(--transition);
}

.auth-card button.secondary-btn:hover {
  background: rgba(33, 82, 255, 0.22);
  transform: translateY(-1px);
}

.auth-card button.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(41, 89, 255, 0.35);
}

.auth-card button.primary-btn:disabled {
  background: rgba(27, 35, 51, 0.15);
  color: rgba(27, 35, 51, 0.6);
  cursor: not-allowed;
  box-shadow: none;
}

.inline-text {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

.inline-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.inline-text a:hover {
  text-decoration: underline;
}

.inline-text .link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.inline-text .link-button:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Password field with toggle button */
.password-field-wrapper {
  position: relative;
}

.password-input-group {
  position: relative;
}

.password-input-group input {
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--primary);
}

.toggle-password:focus {
  outline: 2px solid rgba(33, 82, 255, 0.3);
  outline-offset: 2px;
  border-radius: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(33, 82, 255, 0.12);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.notice {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.notice strong {
  color: var(--text-main);
}

.notice.danger {
  color: var(--danger);
}

.notice.success {
  color: var(--success);
}

.reset-section {
  margin-top: 24px;
  padding: 18px;
  border-radius: var(--radius-large);
  background: rgba(33, 82, 255, 0.06);
}

.reset-section .description.small {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.divider {
  width: 100%;
  height: 1px;
  background: rgba(27, 35, 51, 0.08);
  margin: 22px 0;
}

.action-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 14px;
}

.action-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.action-list li::before {
  content: '•';
  font-size: 18px;
  line-height: 1;
  color: var(--primary);
}

.badge-set {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(27, 35, 51, 0.08);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.currency-warning {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border-left: 4px solid #f97316;
  background: rgba(249, 115, 22, 0.14);
  color: #8a2a04;
  font-size: 0.9rem;
  line-height: 1.5;
}

.legal-text {
  margin-top: 24px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}

.legal-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.legal-text a:hover {
  text-decoration: underline;
}

.consent-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(33, 82, 255, 0.04);
  border: 1px solid rgba(33, 82, 255, 0.12);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
}

.checkbox-group label a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

.required-mark {
  color: var(--danger);
  font-weight: 600;
}

.tier-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(33, 82, 255, 0.16);
  background: rgba(33, 82, 255, 0.05);
  margin-bottom: 12px;
}

.tier-options__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.plan-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(33, 82, 255, 0.15);
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.plan-option:hover {
  border-color: rgba(33, 82, 255, 0.45);
  box-shadow: 0 12px 26px rgba(33, 82, 255, 0.12);
  transform: translateY(-1px);
}

.plan-option:focus-within {
  border-color: rgba(33, 82, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(33, 82, 255, 0.2);
}

.plan-option input[type="radio"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.plan-option__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-option__name {
  font-weight: 600;
  font-size: 15px;
}

.plan-option__price {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

.plan-option__note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.pricing-info {
  margin-top: 16px;
  padding: 14px;
  background: rgba(33, 82, 255, 0.06);
  border: 1px solid rgba(33, 82, 255, 0.15);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.pricing-info strong {
  font-weight: 600;
  color: var(--primary);
}

.pricing-info a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.pricing-info a:hover {
  text-decoration: underline;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
  body {
    padding: 24px 16px;
  }

  .auth-shell {
    max-width: 100%;
  }

  .brand-mark {
    font-size: 11px;
    letter-spacing: 3px;
  }

  .brand-mark::before {
    width: 32px;
    height: 32px;
  }

  .auth-card {
    padding: 32px 20px;
  }

  .auth-card h1 {
    font-size: 24px;
  }

  .auth-card p.description {
    font-size: 14px;
  }

  .auth-card input,
  .auth-card textarea {
    padding: 14px 16px;
    font-size: 16px; /* Prevents auto-zoom on iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .auth-card button.primary-btn,
  .auth-card button.secondary-btn {
    padding: 16px 18px;
    font-size: 16px;
    min-height: 48px; /* Better touch target */
  }

  .toggle-password {
    padding: 12px;
    min-width: 44px; /* iOS minimum touch target */
    min-height: 44px;
  }

  .consent-section {
    padding: 14px;
  }

  .checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
  }

  .checkbox-group label {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 20px 12px;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .auth-card h1 {
    font-size: 22px;
  }

  .inline-text {
    font-size: 13px;
  }

  .legal-text {
    font-size: 11px;
  }
}

/* Ensure inputs don't zoom on mobile */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Landscape mobile phones */
@media (max-width: 896px) and (orientation: landscape) {
  body {
    padding: 16px;
  }

  .auth-card {
    padding: 20px;
  }

  .brand-mark {
    margin-bottom: 16px;
  }
}
