/* ============================================================
   INTERNETDATASUB — AUTH PAGES STYLESHEET
   auth.css
   ============================================================
   TABLE OF CONTENTS
   01. CSS Variables & Reset
   02. Typography & Base
   03. Background & Page Layout
   04. Card
   05. Card Header
   06. Alerts / Flash Messages
   07. Form Elements (inputs, labels, groups)
   08. Password Toggle
   09. Buttons (submit, secondary)
   10. Spinner / Loading state
   11. Bottom Links & Dividers
   12. App Badges
   13. Footer Note
   14. Page-specific — Login
   15. Page-specific — Register
   16. Page-specific — Forgot Password
   17. Responsive
   ============================================================ */


/* ============================================================
   01. CSS VARIABLES & RESET
   ============================================================ */
:root {
  --brand:         #212e96;
  --brand-dark:    #1a2478;
  --brand-light:   #2d3eb8;
  --brand-glow:    rgba(33,46,150,0.12);
  --brand-glow-lg: rgba(33,46,150,0.22);
  --bg:            #F0F2FF;
  --white:         #ffffff;
  --text:          #111827;
  --muted:         #6b7280;
  --border:        rgba(33,46,150,0.12);
  --border-input:  rgba(0,0,0,0.09);
  --input-bg:      #F5F6FF;
  --shadow-sm:     0 2px 12px rgba(33,46,150,0.08);
  --shadow-md:     0 8px 32px rgba(33,46,150,0.12);
  --shadow-lg:     0 20px 60px rgba(33,46,150,0.18);
  --r-sm:          8px;
  --r-md:          12px;
  --r-lg:          18px;
  --r-xl:          24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


/* ============================================================
   02. TYPOGRAPHY & BASE
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@500;600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

h1, h2, h3, h4 {
  font-family: 'Clash Display', 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}


/* ============================================================
   03. BACKGROUND & PAGE LAYOUT
   ============================================================ */
body::before {
  content: '';
  position: fixed; top: -140px; right: -140px;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(33,46,150,0.13) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; bottom: -110px; left: -110px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(33,46,150,0.08) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Floating deco circles */
.auth-deco {
  position: fixed; border-radius: 50%;
  background: rgba(33,46,150,0.05);
  pointer-events: none; z-index: 0;
  animation: floatDeco 7s ease-in-out infinite;
}
.auth-deco-1 { width: 90px;  height: 90px;  top: 12%; left: 6%;   animation-delay: 0s;   }
.auth-deco-2 { width: 55px;  height: 55px;  top: 65%; right: 8%;  animation-delay: 2s;   }
.auth-deco-3 { width: 130px; height: 130px; bottom: 15%; left: 12%; animation-delay: 4s; }
@keyframes floatDeco {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.04); }
}

.auth-page {
  position: relative; z-index: 1;
  width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}


/* ============================================================
   04. CARD
   ============================================================ */
.auth-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: slideUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(28px);
}
.auth-card.wide { max-width: 520px; }

@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }


/* ============================================================
   05. CARD HEADER
   ============================================================ */
.auth-card-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  padding: 36px 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-card-header::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.auth-card-header::after {
  content: ''; position: absolute; bottom: -70px; left: -30px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.auth-logo { display: inline-block; margin-bottom: 18px; position: relative; z-index: 1; }
.auth-logo img { height: 38px; width: auto; }

.auth-icon-circle {
  width: 68px; height: 68px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 28px;
  position: relative; z-index: 1;
  animation: popIn 0.5s 0.3s ease both;
}
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.auth-card-header h1 {
  font-family: 'Clash Display', sans-serif;
  font-size: 21px; font-weight: 700; color: #fff;
  margin-bottom: 7px; letter-spacing: -0.3px; position: relative; z-index: 1;
}
.auth-card-header p {
  font-size: 13px; color: rgba(255,255,255,0.72);
  line-height: 1.6; max-width: 300px; margin: 0 auto;
  position: relative; z-index: 1;
}


/* ============================================================
   06. ALERTS / FLASH MESSAGES
   ============================================================ */
.mp-alert {
  border-radius: var(--r-md); padding: 12px 16px;
  font-size: 14px; font-weight: 500; margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px; line-height: 1.5;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.mp-alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.mp-alert-danger  { background:#fef2f2; border:1px solid #fecaca; color:#dc2626; }
.mp-alert-warning { background:#fffbeb; border:1px solid #fde68a; color:#92400e; }
.mp-alert-success { background:#f0fdf4; border:1px solid #bbf7d0; color:#15803d; }


/* ============================================================
   07. FORM ELEMENTS
   ============================================================ */
.auth-card-body { padding: 32px 40px 28px; }

.form-section-label {
  font-size: 11px; font-weight: 700; color: #bbb;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 20px 0 12px; display: flex; align-items: center; gap: 8px;
}
.form-section-label::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.07);
}

.form-group-ids { margin-bottom: 16px; }
.form-group-ids label {
  display: block; font-size: 12px; font-weight: 700;
  color: #666; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 6px;
}

.ids-input {
  width: 100%; background: var(--input-bg);
  border: 1.5px solid var(--border-input); border-radius: var(--r-md);
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--text);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ids-input::placeholder { color: #c0c0c0; }
.ids-input:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.ids-input.invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important; }
.ids-input.valid   { border-color: #16a34a !important; }

/* Remove number arrows */
.ids-input[type=number]::-webkit-outer-spin-button,
.ids-input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ids-input[type=number] { -moz-appearance: textfield; }

/* Field error message */
.field-error {
  display: none; color: #dc2626; font-size: 12px;
  margin-top: 5px; font-weight: 500;
}

/* 2-column row */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }


/* ============================================================
   08. PASSWORD TOGGLE
   ============================================================ */
.pw-wrap { position: relative; }
.pw-wrap .ids-input { padding-right: 46px; }
.toggle-pw {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #bbb;
  font-size: 17px; padding: 4px; display: flex; align-items: center;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--brand); }


/* ============================================================
   09. BUTTONS
   ============================================================ */
.btn-ids-primary {
  width: 100%; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff; border: none; border-radius: var(--r-md); padding: 14px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 10px; letter-spacing: 0.2px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}
.btn-ids-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--brand-glow-lg);
}
.btn-ids-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ids-secondary {
  width: 100%; background: #fff; color: var(--brand);
  border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 13px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-ids-secondary:hover {
  background: var(--brand-glow); border-color: var(--brand);
  transform: translateY(-1px);
}


/* ============================================================
   10. SPINNER / LOADING STATE
   ============================================================ */
.ids-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ============================================================
   11. BOTTOM LINKS & DIVIDERS
   ============================================================ */
.ids-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0 14px;
}
.ids-divider span { flex: 1; height: 1px; background: rgba(0,0,0,0.08); }
.ids-divider p { font-size: 12px; color: #bbb; white-space: nowrap; }

.ids-link-row {
  text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 6px;
}
.ids-link-row a {
  color: var(--brand); font-weight: 700;
  text-decoration: none; transition: opacity 0.2s;
}
.ids-link-row a:hover { opacity: 0.75; }

.ids-meta-row {
  display: flex; align-items: center;
  justify-content: space-between; margin: 14px 0 18px;
}
.ids-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); cursor: pointer;
}
.ids-remember input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.ids-forgot { font-size: 13px; color: var(--brand); font-weight: 600; text-decoration: none; transition: opacity 0.2s; }
.ids-forgot:hover { opacity: 0.75; }

/* Terms row */
.ids-terms-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ids-terms-row input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.ids-terms-row label { font-size: 13px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.ids-terms-row a { color: var(--brand); font-weight: 600; text-decoration: none; }


/* ============================================================
   12. APP BADGES
   ============================================================ */
.ids-app-badges { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.ids-app-badges a { display: block; transition: transform 0.2s, opacity 0.2s; }
.ids-app-badges a:hover { transform: translateY(-2px); opacity: 0.85; }
.ids-app-badges img { height: 36px; width: auto; display: block; }


/* ============================================================
   13. FOOTER NOTE
   ============================================================ */
.auth-card-footer {
  text-align: center; padding: 14px 40px 22px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 12px; color: #ccc;
}
.auth-card-footer a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth-card-footer a:hover { opacity: 0.75; }


/* ============================================================
   14. PAGE-SPECIFIC — LOGIN
   ============================================================ */
/* No extra styles needed — uses shared components */


/* ============================================================
   15. PAGE-SPECIFIC — REGISTER
   ============================================================ */
.ids-referral-notice {
  background: rgba(33,46,150,0.06); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 13px; color: var(--brand-dark);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.ids-newsletter-note {
  font-size: 12px; color: #bbb; line-height: 1.6;
  margin-bottom: 16px; font-style: italic;
}
.server-error-box {
  display: none; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--r-sm); padding: 12px 16px;
  color: #dc2626; font-size: 14px; font-weight: 500;
  margin-bottom: 16px; line-height: 1.6;
}


/* ============================================================
   16. PAGE-SPECIFIC — FORGOT PASSWORD
   ============================================================ */
/* No extra styles needed — uses shared components */


/* ============================================================
   17. RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .auth-card-header { padding: 28px 24px 22px; }
  .auth-card-body   { padding: 26px 24px 22px; }
  .auth-card-footer { padding: 14px 24px 20px; }
  .form-row-2       { grid-template-columns: 1fr; }
}
