/* ========================================
   SkinAI — Auth Pages CSS
   ======================================== */

:root {
  --auth-primary: #ce4328;
  --auth-primary-hover: #b83a22;
  --auth-primary-light: rgba(206, 67, 40, 0.08);
  --auth-bg: #f5f6fa;
  --auth-card-bg: #ffffff;
  --auth-text: #1a1a2e;
  --auth-text-light: #6b7280;
  --auth-border: #e5e7eb;
  --auth-input-bg: #f9fafb;
  --auth-input-focus: #fff;
  --auth-success: #059669;
  --auth-success-bg: rgba(5, 150, 105, 0.08);
  --auth-error: #dc2626;
  --auth-error-bg: rgba(220, 38, 38, 0.08);
  --auth-radius: 16px;
  --auth-radius-sm: 10px;
  --auth-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Page Layout ── */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

/* ── Card ── */
.auth-card {
  background: var(--auth-card-bg);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  animation: authFadeUp 0.4s ease;
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 28px;
  justify-content: center;
}

.auth-logo img {
  height: 32px;
  width: auto;
}

.auth-logo span {
  font-size: 22px;
  font-weight: 700;
  color: var(--auth-primary);
  letter-spacing: -0.5px;
}

/* ── Title ── */
.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
  color: var(--auth-text);
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--auth-text-light);
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ── Tabs ── */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--auth-input-bg);
  border-radius: var(--auth-radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text-light);
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--auth-text);
}

.auth-tab.active {
  background: var(--auth-card-bg);
  color: var(--auth-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.auth-tab svg {
  flex-shrink: 0;
}

/* ── Alert Messages ── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--auth-radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.4;
}

.auth-alert svg {
  flex-shrink: 0;
}

.auth-alert-error {
  background: var(--auth-error-bg);
  color: var(--auth-error);
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.auth-alert-success {
  background: var(--auth-success-bg);
  color: var(--auth-success);
  border: 1px solid rgba(5, 150, 105, 0.15);
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-optional {
  font-weight: 400;
  color: var(--auth-text-light);
  font-size: 12px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--auth-input-bg);
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  padding: 0 14px;
  transition: all 0.2s ease;
}

.auth-input-wrap:focus-within {
  border-color: var(--auth-primary);
  background: var(--auth-input-focus);
  box-shadow: 0 0 0 3px var(--auth-primary-light);
}

.auth-input-wrap svg {
  flex-shrink: 0;
  color: var(--auth-text-light);
  transition: color 0.2s;
}

.auth-input-wrap:focus-within svg {
  color: var(--auth-primary);
}

.auth-input-wrap input,
.auth-input-wrap select {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--auth-text);
  outline: none;
  width: 100%;
}

.auth-input-wrap select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.auth-input-wrap input::placeholder {
  color: #b0b5c0;
}

/* ── Two Column Row ── */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Password Toggle ── */
.auth-pwd-toggle {
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--auth-text-light);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.auth-pwd-toggle:hover {
  color: var(--auth-primary);
}

/* ── Submit Button ── */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--auth-primary);
  color: #fff;
  border: 0;
  border-radius: var(--auth-radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.auth-btn:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(206, 67, 40, 0.25);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.auth-btn:hover svg {
  transform: translateX(3px);
}

/* ── Form Extras ── */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--auth-text-light);
  cursor: pointer;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
  cursor: pointer;
}

.auth-forgot {
  font-size: 13px;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-forgot:hover {
  color: var(--auth-primary-hover);
  text-decoration: underline;
}

/* ── Links Section ── */
.auth-links {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--auth-border);
}

.auth-links p {
  font-size: 13px;
  color: var(--auth-text-light);
  margin: 6px 0;
}

.auth-links a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: var(--auth-primary-hover);
  text-decoration: underline;
}

/* ── Footer ── */
.auth-footer {
  margin-top: 24px;
  text-align: center;
}

.auth-footer a {
  font-size: 13px;
  color: var(--auth-text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: var(--auth-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .auth-page {
    padding: 16px 12px;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 14px;
  }

  .auth-card h1 {
    font-size: 20px;
  }

  .auth-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-tabs {
    flex-direction: row;
  }

  .auth-tab {
    padding: 8px 10px;
    font-size: 12px;
  }

  .auth-btn {
    padding: 13px 20px;
    font-size: 14px;
  }
}
