/* ══════════════════════════════════════════════
   IOT & Technologies — Auth Pages (Login / Signup)
   Dark Gold Theme — Properly isolated from Bootstrap
   ══════════════════════════════════════════════ */

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

/* ── Variables ─────────────────────────────── */
:root {
  --auth-bg:          #080808;
  --auth-panel:       #111116;
  --auth-panel-hover: #16161c;
  --auth-border:      rgba(212, 175, 55, 0.2);
  --auth-border-focus:rgba(212, 175, 55, 0.6);
  --gold:             #d4af37;
  --gold-light:       #f0d060;
  --gold-dim:         rgba(212, 175, 55, 0.12);
  --text-primary:     #f0f0f0;
  --text-muted:       #888;
  --text-dim:         #bbb;
  --danger:           #ef4444;
  --danger-bg:        rgba(239, 68, 68, 0.12);
  --success:          #22c55e;
  --radius-card:      20px;
  --radius-input:     10px;
  --radius-btn:       10px;
  --shadow-card:      0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.08);
  --transition:       0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset for auth pages ──────────────────── */
body {
  background: var(--auth-bg) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  margin: 0 !important;
  padding-top: 110px !important; /* topbar(38) + navbar(72) */
  min-height: 100vh;
}

/* Kill bootstrap link styles inside auth */
.auth-page-wrap a,
.auth-card a {
  text-decoration: none !important;
  color: var(--gold-light) !important;
}
.auth-page-wrap a:hover,
.auth-card a:hover {
  color: var(--gold) !important;
  text-decoration: none !important;
}

/* ── Page wrapper: centers card vertically ── */
.auth-page-wrap {
  min-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 60px;
}

/* ── Card ───────────────────────────────────── */
.auth-card {
  background: var(--auth-panel);
  border: 1px solid var(--auth-border);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.auth-card--wide {
  max-width: 680px;
}

/* Gold top accent line */
.card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), transparent);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* ── Brand header ───────────────────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.auth-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.auth-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.auth-brand-sub {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Titles ─────────────────────────────────── */
.auth-title {
  font-size: 1.7rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.2 !important;
  font-family: 'Inter', sans-serif !important;
}
.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 24px 0;
}

/* ── Form fields ────────────────────────────── */
.field-group {
  margin-bottom: 16px;
}
.field-group label {
  display: block !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--text-dim) !important;
  margin-bottom: 7px !important;
}
.field-group input,
.field-group select,
.field-group textarea {
  width: 100% !important;
  padding: 11px 14px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: var(--radius-input) !important;
  color: var(--text-primary) !important;
  font-size: 0.95rem !important;
  font-family: 'Inter', sans-serif !important;
  outline: none !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
  box-shadow: none !important;
}
.field-group input::placeholder,
.field-group textarea::placeholder {
  color: rgba(255,255,255,0.25) !important;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.18) !important;
  background: rgba(212,175,55,0.04) !important;
}
.field-group select option {
  background: #1a1a24;
  color: var(--text-primary);
}
.field-group textarea {
  min-height: 90px;
  resize: vertical;
}

/* Input with eye icon */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-wrap input {
  padding-right: 42px !important;
}
.icon-btn {
  position: absolute !important;
  right: 10px !important;
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  padding: 4px !important;
  line-height: 0 !important;
  transition: color var(--transition) !important;
}
.icon-btn:hover {
  color: var(--gold) !important;
}

/* Field error */
.field-error {
  font-size: 0.8rem;
  color: #fca5a5;
  margin-top: 5px;
  display: none;
}
.field-error.show { display: block; }
.field-group input.input-error {
  border-color: var(--danger) !important;
}

.field-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Form row (2 columns) ───────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ── Buttons ────────────────────────────────── */
.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 20px !important;
  background: linear-gradient(135deg, var(--gold-light), var(--gold)) !important;
  color: #0a0a0a !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  font-family: 'Inter', sans-serif !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: transform var(--transition), box-shadow var(--transition) !important;
  box-shadow: 0 6px 20px rgba(212,175,55,0.25) !important;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 28px rgba(212,175,55,0.4) !important;
  color: #000 !important;
}
.btn-primary:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.btn-ghost {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 20px !important;
  background: transparent !important;
  border: 1px solid var(--auth-border) !important;
  color: var(--gold) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  font-family: 'Inter', sans-serif !important;
  border-radius: var(--radius-btn) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all var(--transition) !important;
}
.btn-ghost:hover {
  background: var(--gold-dim) !important;
  border-color: var(--gold) !important;
  color: var(--gold-light) !important;
  text-decoration: none !important;
}
.btn-google {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 11px 20px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  font-family: 'Inter', sans-serif !important;
  border-radius: var(--radius-btn) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all var(--transition) !important;
}
.btn-google:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.22) !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
}
.btn-google img {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}
.w-full {
  width: 100% !important;
}

/* Button layouts */
.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.btn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Alert / Error box ──────────────────────── */
.alert-error {
  background: var(--danger-bg);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.alert-error[hidden] { display: none !important; }

/* ── Divider ────────────────────────────────── */
.auth-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 22px 0 16px;
}

/* ── Forgot / misc links ────────────────────── */
.forgot-block {
  margin-bottom: 14px;
}
.forgot-block a {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
}

/* ── Footer note ────────────────────────────── */
.auth-footer-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
  margin-bottom: 0;
}

/* ── Password checklist ─────────────────────── */
.pw-checklist {
  list-style: none !important;
  padding: 8px 0 4px !important;
  margin: 0 !important;
}
.pw-checklist li {
  font-size: 0.82rem;
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 3px 0;
  color: var(--text-muted);
}
.pw-checklist .ok { color: var(--success) !important; }
.pw-checklist .bad { color: #ff8a8a !important; }

/* ── Password strength meter ────────────────── */
.password-meter {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444, #22c55e);
  transition: width 0.25s ease;
  border-radius: 6px;
}

/* ── Hidden utility ─────────────────────────── */
.hidden { display: none !important; }
