/* ============================================================
   INES PRIME OS — Auth Pages CSS v2.0
   Figma-level SaaS login/register UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --auth-brand:        #22C55E;
  --auth-brand-dk:     #16A34A;
  --auth-brand-glow:   rgba(34,197,94,.2);
  --auth-dark:         #0F172A;
  --auth-dark-2:       #1E293B;
  --auth-text:         #0F172A;
  --auth-muted:        #64748B;
  --auth-border:       #E2E8F0;
  --auth-bg:           #F8FAFC;
  --auth-white:        #FFFFFF;
  --auth-danger:       #EF4444;
  --auth-danger-bg:    #FEF2F2;
  --auth-success-bg:   #F0FDF4;
  --auth-success:      #16A34A;
  --auth-radius:       14px;
  --auth-radius-sm:    9px;
  --auth-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --auth-shadow-lg:    0 24px 48px rgba(15,23,42,.14), 0 8px 20px rgba(15,23,42,.08);
}

/* ── Reset ───────────────────────────────────────────────── */
.ines-auth-body {
  margin: 0; padding: 0;
  font-family: var(--auth-font);
  min-height: 100vh;
  background: var(--auth-dark);
  -webkit-font-smoothing: antialiased;
}
.ines-auth-body *, .ines-auth-body *::before, .ines-auth-body *::after { box-sizing: border-box; }

/* ── Full page layout ─────────────────────────────────────── */
.ines-auth-page {
  display: flex;
  min-height: 100vh;
}

/* ── Left brand panel ────────────────────────────────────── */
.ines-auth-panel--brand {
  width: 420px;
  flex-shrink: 0;
  background: var(--auth-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 40px;
  position: relative;
  overflow: hidden;
}

/* Gradient mesh background */
.ines-auth-panel--brand::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% -10%, rgba(34,197,94,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 110%, rgba(59,130,246,.12) 0%, transparent 60%);
  pointer-events: none;
}

/* Grid texture */
.ines-auth-panel--brand::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Brand logo + text */
.ines-auth-brand { position: relative; z-index: 1; }

.ines-auth-brand__icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--auth-brand) 0%, #16A34A 100%);
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(34,197,94,.35);
}

.ines-auth-brand__name {
  margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.04em;
}

.ines-auth-brand__tagline {
  margin: 0; font-size: 13.5px; color: rgba(255,255,255,.45); font-weight: 400; line-height: 1.5;
}

/* Feature bullets */
.ines-auth-features {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 22px;
}

.ines-auth-feature { display: flex; align-items: flex-start; gap: 14px; }

.ines-auth-feature__icon {
  font-size: 20px; width: 44px; height: 44px;
  background: rgba(255,255,255,.06);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid rgba(255,255,255,.08);
}

.ines-auth-feature strong {
  display: block; font-size: 13.5px; font-weight: 700; color: #fff;
  margin-bottom: 3px; letter-spacing: -.01em;
}

.ines-auth-feature p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.45); line-height: 1.5; }

.ines-auth-brand__footer { position: relative; z-index: 1; font-size: 12px; color: rgba(255,255,255,.25); margin: 0; }

/* ── Right form panel ────────────────────────────────────── */
.ines-auth-panel--form {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: #F8FAFC;
  position: relative;
}

/* Subtle dot grid */
.ines-auth-panel--form::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
  background-size: 28px 28px; opacity: .45; pointer-events: none;
}

/* ── Auth card ───────────────────────────────────────────── */
.ines-auth-card {
  width: 100%; max-width: 420px;
  background: var(--auth-white);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow-lg);
  border: 1px solid var(--auth-border);
  padding: 38px 36px;
  position: relative; z-index: 1;
  animation: authCardIn 350ms cubic-bezier(.34,1.2,.64,1);
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card header */
.ines-auth-card__header { margin-bottom: 26px; }
.ines-auth-card__title {
  margin: 0 0 8px; font-size: 24px; font-weight: 800;
  color: var(--auth-text); letter-spacing: -.04em;
}
.ines-auth-card__sub { margin: 0; font-size: 14px; color: var(--auth-muted); }

/* ── Alerts ──────────────────────────────────────────────── */
.ines-auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; margin-bottom: 18px; line-height: 1.5;
}
.ines-auth-alert--error   { background: var(--auth-danger-bg); color: var(--auth-danger); border: 1px solid rgba(239,68,68,.2); }
.ines-auth-alert--success { background: var(--auth-success-bg); color: var(--auth-success); border: 1px solid rgba(22,163,74,.2); }

/* ── Google button ───────────────────────────────────────── */
.ines-auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: var(--auth-white);
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--auth-text); text-decoration: none;
  cursor: pointer; transition: all 150ms; margin-bottom: 22px;
  font-family: var(--auth-font);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.ines-auth-google-btn:hover {
  background: #F8FAFC; border-color: #CBD5E1;
  box-shadow: 0 3px 8px rgba(0,0,0,.08); color: var(--auth-text);
}

/* ── Divider ─────────────────────────────────────────────── */
.ines-auth-divider { position: relative; text-align: center; margin: 0 0 22px; }
.ines-auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--auth-border);
}
.ines-auth-divider span {
  position: relative; background: var(--auth-white);
  padding: 0 14px; font-size: 12px; color: var(--auth-muted);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}

/* ── Form ────────────────────────────────────────────────── */
.ines-auth-form { display: flex; flex-direction: column; gap: 18px; }
.ines-auth-field { display: flex; flex-direction: column; gap: 7px; }

.ines-auth-label { font-size: 13px; font-weight: 600; color: var(--auth-text); letter-spacing: -.01em; }
.ines-auth-label-row { display: flex; align-items: center; justify-content: space-between; }

.ines-auth-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  font-size: 14px; color: var(--auth-text);
  background: var(--auth-white); outline: none;
  font-family: var(--auth-font);
  transition: border-color 150ms, box-shadow 150ms;
  -webkit-appearance: none; appearance: none;
}
.ines-auth-input:focus {
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px var(--auth-brand-glow);
}
.ines-auth-input.is-invalid {
  border-color: var(--auth-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.ines-auth-input::placeholder { color: #94A3B8; }

.ines-auth-input-wrap { position: relative; display: flex; align-items: center; }
.ines-auth-input-wrap .ines-auth-input { padding-right: 44px; }

.ines-auth-toggle-pw {
  position: absolute; right: 12px; background: none; border: none;
  cursor: pointer; padding: 4px; color: #94A3B8; display: flex; align-items: center;
  transition: color 130ms;
}
.ines-auth-toggle-pw:hover { color: var(--auth-text); }

.ines-auth-field-error { font-size: 12px; color: var(--auth-danger); min-height: 16px; }

/* Password strength */
.ines-auth-strength {
  height: 4px; background: var(--auth-border); border-radius: 99px;
  overflow: hidden; margin-top: 5px;
}
.ines-auth-strength__bar {
  height: 100%; border-radius: 99px; width: 0;
  transition: width 350ms cubic-bezier(.4,0,.2,1), background 350ms;
}
.ines-auth-strength__bar[data-strength="1"] { width: 25%; background: #EF4444; }
.ines-auth-strength__bar[data-strength="2"] { width: 50%; background: #F59E0B; }
.ines-auth-strength__bar[data-strength="3"] { width: 75%; background: #3B82F6; }
.ines-auth-strength__bar[data-strength="4"] { width: 100%; background: var(--auth-brand); }

/* Remember checkbox */
.ines-auth-remember { margin-top: 2px; }
.ines-auth-checkbox {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13.5px; color: var(--auth-muted); user-select: none;
}
.ines-auth-checkbox input[type="checkbox"] {
  width: 16px; height: 16px; border-radius: 4px;
  accent-color: var(--auth-brand); cursor: pointer;
}

/* Terms */
.ines-auth-terms {
  font-size: 12px; color: var(--auth-muted); text-align: center; margin: 0; line-height: 1.6;
}

/* ── Submit button ───────────────────────────────────────── */
.ines-auth-submit-btn {
  width: 100%; padding: 13px 20px;
  background: var(--auth-brand); color: #fff; border: none;
  border-radius: var(--auth-radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all 200ms cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(34,197,94,.35);
  font-family: var(--auth-font); letter-spacing: -.02em; margin-top: 4px;
}
.ines-auth-submit-btn:hover:not(:disabled) {
  background: var(--auth-brand-dk); transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34,197,94,.4);
}
.ines-auth-submit-btn:active:not(:disabled) { transform: translateY(0); }
.ines-auth-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* Spinner */
.ines-auth-spinner { animation: authSpin 900ms linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }

/* ── Links ───────────────────────────────────────────────── */
.ines-auth-link { color: var(--auth-brand); text-decoration: none; font-weight: 600; transition: color 130ms; }
.ines-auth-link:hover { color: var(--auth-brand-dk); text-decoration: underline; }
.ines-auth-link--sm { font-size: 12.5px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .ines-auth-panel--brand { display: none; }
  .ines-auth-panel--form  {
    padding: 32px 20px;
    background: var(--auth-dark);
  }
  .ines-auth-panel--form::before { display: none; }
  .ines-auth-card {
    box-shadow: var(--auth-shadow-lg);
    border-color: rgba(255,255,255,.08);
    max-width: 440px;
  }
}

@media (max-width: 480px) {
  .ines-auth-card { padding: 28px 22px; border-radius: 20px; }
  .ines-auth-card__title { font-size: 22px; }
}
