/* ---------- Auth Modal ---------- */

.auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.auth-modal {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: auth-slide-in 0.2s ease;
}

@keyframes auth-slide-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal h2 {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-h);
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--text-h);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
}

.auth-field input:disabled {
  opacity: 0.6;
}

.auth-btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 8px;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn-primary {
  background: var(--accent);
  color: #fff;
}

.auth-btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.auth-error {
  color: var(--error);
  font-size: 13px;
  margin: 0 0 8px;
}

.auth-success-msg {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.auth-renewal-msg {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  margin: -12px 0 16px;
}

.auth-toggle {
  text-align: center;
  font-size: 13px;
  color: var(--text);
  margin: 16px 0 0;
}

.auth-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-link:hover {
  opacity: 0.8;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.auth-close:hover {
  opacity: 1;
}
