/**
 * Madruga Mix — login / auth cliente
 * Mesmo visual da loja (mm-delivery)
 */

html.mm-auth {
  --mm-bg: #111114;
  --mm-surface: #1a1a1f;
  --mm-card: #232329;
  --mm-border: rgba(255, 255, 255, 0.1);
  --mm-gold: #fbbf24;
  --mm-gold-hot: #f59e0b;
  --mm-text: #f4f4f5;
  --mm-muted: #b4b4bc;
  --mm-radius: 18px;
}

html.mm-auth body.mm-auth-page {
  margin: 0;
  min-height: 100dvh;
  font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif;
  background: var(--mm-bg);
  color: var(--mm-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 28px;
  position: relative;
}

.mm-auth-page .mm-delivery-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(251, 191, 36, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(239, 68, 68, 0.07), transparent 50%),
    var(--mm-bg);
}

.mm-auth-wrap {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
}

.mm-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mm-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--mm-border);
  background: rgba(26, 26, 31, 0.6);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.mm-auth-back:hover {
  color: var(--mm-gold);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(35, 35, 41, 0.8);
}

.mm-auth-card {
  background: linear-gradient(160deg, rgba(35, 35, 41, 0.98), rgba(26, 26, 31, 0.99));
  border: 1px solid var(--mm-border);
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.mm-auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.mm-auth-brand img {
  max-height: 72px;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 14px;
}

.mm-auth-brand h1 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mm-auth-brand p {
  margin: 0;
  color: var(--mm-muted);
  font-size: 0.88rem;
}

.mm-auth-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
}

.mm-auth-sub {
  margin: 0 0 20px;
  color: var(--mm-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mm-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.mm-auth-alert--danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.mm-auth-alert--info {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--mm-text);
}

.mm-auth-alert--warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.mm-auth-field {
  margin-bottom: 16px;
}

.mm-auth-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e4e4e7;
}

.mm-auth-input-wrap {
  position: relative;
}

.mm-auth-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mm-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.mm-auth-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: var(--mm-surface);
  color: var(--mm-text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.mm-auth-input--plain {
  padding-left: 14px;
}

.mm-auth-input::placeholder {
  color: #8b8b95;
}

.mm-auth-input:focus {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.mm-auth-phone-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--mm-surface);
  border: 1px solid var(--mm-border);
  margin-bottom: 16px;
}

.mm-auth-phone-box strong {
  font-size: 0.95rem;
}

.mm-auth-phone-box a {
  color: var(--mm-gold);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.mm-auth-hint {
  display: block;
  margin-top: 6px;
  color: var(--mm-muted);
  font-size: 0.78rem;
}

.mm-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.mm-auth-btn--primary {
  background: linear-gradient(135deg, var(--mm-gold), var(--mm-gold-hot));
  color: #0a0a0a;
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.35);
  margin-top: 8px;
}

.mm-auth-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(251, 191, 36, 0.45);
  color: #0a0a0a;
}

.mm-auth-btn--ghost {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: var(--mm-text);
}

.mm-auth-btn--ghost:hover {
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--mm-gold);
}

.mm-auth-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--mm-border);
  text-align: center;
}

.mm-auth-footer a {
  color: var(--mm-gold);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.mm-auth-footer a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .mm-auth-btn--primary:hover {
    transform: none;
  }
}
