/* ============================================================
   doublesixOS — auth.css
   Shared styles for login & signup pages
   ============================================================ */

/* ── Form Fields (shared) ── */
.form-group {
  margin-bottom: 1.125rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.875rem;
  background: var(--bg-base);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input::placeholder { color: var(--text-placeholder); }

.form-input:focus {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

.form-input.input-error {
  border-color: var(--brand-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-select {
  padding-left: 2.875rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A90B0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.input-icon-left {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-placeholder);
  font-size: 0.875rem;
  pointer-events: none;
}

.input-icon-right {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-placeholder);
  font-size: 0.875rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition-fast);
}

.input-icon-right:hover { color: var(--brand-primary); }

.field-error {
  font-size: 0.775rem;
  color: var(--brand-danger);
  margin-top: 0.375rem;
  display: block;
  min-height: 1em;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Google Button ── */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg);
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-google:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-2);
  box-shadow: var(--shadow-sm);
}

.google-icon {
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.25rem;
  color: var(--text-placeholder);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ── Submit Button ── */
.btn-submit {
  width: 100%;
  padding: 0.9375rem;
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-brand);
  margin-bottom: 1.5rem;
}

.btn-submit:hover:not(:disabled) {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(var(--brand-primary-rgb), 0.4);
}

.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ── Auth Switch Link ── */
.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--brand-primary);
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.auth-switch a:hover { opacity: 0.75; }

/* ── OTP Inputs ── */
.otp-inputs {
  display: flex;
  gap: 0.5rem;
  margin-block: 1rem;
}

.otp-digit {
  flex: 1;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}

.otp-digit:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb),0.1);
}

/* ── Auth Brand (shared logo treatment) ── */
.auth-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-brand-name-light {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.auth-brand-name span,
.auth-brand-name-light span {
  color: var(--brand-primary);
}

/* ── Checkbox ── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.checkbox-label input {
  accent-color: var(--brand-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.checkbox-label a { color: var(--brand-primary); font-weight: 600; }

/* ── Hidden helper ── */
.hidden { display: none !important; }

/* ── Responsive: shared auth ── */
@media (max-width: 600px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}