/* Container */
.auth-container {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}

/* Brand */
.auth-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.brand-icon { flex-shrink: 0; }
.brand-name {
  font-size: 28px; font-weight: 800; letter-spacing: -1px;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-tagline { font-size: 13px; color: var(--text-muted); margin-top: 1px; }

/* Card */
.auth-card {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Tabs */
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  padding: 16px; background: transparent;
  border: none; color: var(--text-muted);
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition); z-index: 1;
}
.auth-tab.active { color: var(--text-primary); }
.tab-indicator {
  position: absolute; bottom: 0; left: 0;
  width: 50%; height: 2px;
  background: var(--grad-brand);
  border-radius: 2px 2px 0 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Forms */
.auth-form {
  display: none; padding: 28px;
  flex-direction: column; gap: 18px;
  animation: formIn 0.3s ease;
}
.auth-form.active { display: flex; }
@keyframes formIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Fields */
.field-group { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.field-hint { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.field-wrap {
  position: relative; display: flex; align-items: center;
}
.field-icon {
  position: absolute; left: 14px;
  width: 16px; height: 16px; color: var(--text-muted);
  pointer-events: none; flex-shrink: 0;
}
.field-input {
  width: 100%; padding: 12px 44px 12px 42px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif; font-size: 15px;
  transition: var(--transition); outline: none;
}
.field-input:focus { border-color: var(--purple); background: rgba(255,255,255,0.08); box-shadow: 0 0 0 3px rgba(168,85,247,0.15); }
.field-input::placeholder { color: var(--text-muted); }
.field-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #1a0f2e inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  border-color: var(--purple) !important;
}

.toggle-pass {
  position: absolute; right: 12px;
  background: transparent; border: none; cursor: pointer;
  padding: 4px; color: var(--text-muted); opacity: 0.5;
  transition: var(--transition);
}
.toggle-pass:hover { opacity: 1; }
.toggle-pass svg { width: 16px; height: 16px; display: block; }

/* Error */
.error-msg {
  font-size: 13px; color: #f87171;
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius-sm);
  padding: 0; max-height: 0; overflow: hidden;
  transition: all 0.3s;
}
.error-msg:not(:empty) { padding: 10px 14px; max-height: 80px; }

/* Button */
.btn-auth {
  width: 100%; padding: 13px;
  background: var(--grad-brand); color: white;
  border: none; border-radius: 30px;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: var(--transition); position: relative;
  box-shadow: 0 4px 24px rgba(168,85,247,0.4);
  display: flex; align-items: center; justify-content: center;
  min-height: 48px;
}
.btn-auth:hover:not(:disabled) { box-shadow: 0 6px 30px rgba(168,85,247,0.6); transform: translateY(-1px); }
.btn-auth:disabled { opacity: 0.8; cursor: not-allowed; transform: none; }
.btn-spinner { display: none; align-items: center; justify-content: center; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 20px; height: 20px; animation: spin 0.8s linear infinite; }

/* Switch */
.auth-switch {
  text-align: center; font-size: 13px; color: var(--text-muted);
}
.auth-switch a { color: var(--pink); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* Footer */
.auth-footer {
  margin-top: 24px; font-size: 12px; color: var(--text-muted); text-align: center;
}

/* Device Conflict Modal */
.device-conflict-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.device-conflict-modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  width: 90%; max-width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: formIn 0.3s ease;
}
