/* =============================================
   INOV INTRANET — AUTH STYLES
   Login · Register · Recover Password
   ============================================= */

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

:root {
  --navy:        #0C1A35;
  --navy-mid:    #152744;
  --navy-light:  #1E3A6E;
  --gold:        #C9A24C;
  --gold-light:  #E2BA6A;
  --gold-pale:   #FDF6E8;
  --white:       #FFFFFF;
  --surface:     #F5F7FB;
  --border:      #DDE4EF;
  --text-1:      #0C1A35;
  --text-2:      #3D5168;
  --text-3:      #6B7A8D;
  --green:       #0D9488;
  --red:         #DC2626;
  --radius:      10px;
  --shadow-lg:   0 20px 60px rgba(12,26,53,0.18), 0 0 1px rgba(12,26,53,0.1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--text-1);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(201,162,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(30,58,110,0.6) 0%, transparent 60%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== AUTH CARD ===== */
.auth-wrapper {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px;
  box-shadow: var(--shadow-lg);
}

/* Logo */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}
.auth-logo-mark {
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
}
.auth-logo-mark::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 5px;
  border: 2px solid var(--white);
}
.auth-logo-mark svg { width: 28px; height: 28px; fill: white; }
.auth-logo-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.3px;
}
.auth-logo-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Heading */
.auth-heading {
  text-align: center;
  margin-bottom: 28px;
}
.auth-heading h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.auth-heading p {
  font-size: 0.875rem;
  color: var(--text-3);
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group select {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-1);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(12,26,53,0.08);
}
.form-group input.error { border-color: var(--red); }
.form-group .field-error {
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 5px;
  display: none;
}
.form-group input.error + .field-error { display: block; }

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap input {
  padding-left: 42px;
}
.input-icon-wrap .i-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  display: flex;
}
.input-icon-wrap .i-toggle {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 2px;
  display: flex;
}
.input-icon-wrap .i-toggle:hover { color: var(--navy); }

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

/* Extras below field */
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
}
.link-muted {
  font-size: 0.82rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.link-muted:hover { color: var(--gold); }

/* Buttons */
.btn-auth {
  width: 100%;
  height: 48px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  letter-spacing: 0.2px;
}
.btn-auth:hover {
  background: var(--navy-light);
  box-shadow: 0 6px 20px rgba(12,26,53,0.25);
  transform: translateY(-1px);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Divider */
.auth-divider {
  text-align: center;
  margin: 22px 0;
  position: relative;
  color: var(--text-3);
  font-size: 0.78rem;
}
.auth-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  background: var(--white);
  padding: 0 12px;
  position: relative;
}

/* Footer link */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.83rem;
  color: var(--text-3);
}
.auth-footer a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-footer a:hover { color: var(--navy); }

/* Alert */
.auth-alert {
  display: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 18px;
}
.auth-alert.error { background: #FEF2F2; border: 1px solid #FECACA; color: var(--red); }
.auth-alert.success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #15803D; }
.auth-alert.show { display: flex; align-items: center; gap: 10px; }

/* Back link */
.auth-back {
  text-align: center;
  margin-top: 20px;
  font-size: 0.83rem;
}
.auth-back a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}
.auth-back a:hover { color: var(--gold); }

/* Password strength */
.pwd-strength {
  margin-top: 8px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.pwd-strength-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.pwd-strength-bar.weak   { width: 25%; background: var(--red); }
.pwd-strength-bar.fair   { width: 50%; background: #F59E0B; }
.pwd-strength-bar.good   { width: 75%; background: #3B82F6; }
.pwd-strength-bar.strong { width: 100%; background: var(--green); }

/* Steps (register) */
.auth-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}
.step-dot.active { background: var(--navy); transform: scale(1.3); }
.step-dot.done   { background: var(--gold); }

/* Policy text */
.policy-text {
  font-size: 0.75rem;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
  margin-top: 16px;
}
.policy-text a { color: var(--gold); text-decoration: none; }

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
}
