/* ==========================================================================
   FORNO & BRASA - LOGIN UNIFICADO MULTI-TENANT (DESIGN SYSTEM)
   ========================================================================== */

:root {
  --primary: #ff5722;
  --primary-hover: #ea580c;
  --primary-glow: rgba(255, 87, 34, 0.35);
  --primary-subtle: rgba(255, 87, 34, 0.12);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #080b11;
  color: #f8fafc;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(255, 152, 0, 0.05) 40%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  transition: background 0.4s ease;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
}

.login-card {
  background: rgba(13, 19, 31, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--primary-subtle);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.logo-container {
  display: inline-block;
  position: relative;
  margin-bottom: 12px;
}

.login-logo {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: all 0.3s ease;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 0.84rem;
  color: #94a3b8;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.forgot-link {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.18s ease, text-decoration 0.18s ease;
}

.forgot-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.input-field-wrap input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}

.input-field-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(15, 23, 42, 1);
}

.btn-login-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: all 0.2s;
  margin-top: 6px;
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 6px 22px var(--primary-glow);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.btn-login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-feedback {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.login-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.login-feedback.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.72rem;
  color: #475569;
}

/* ==========================================================================
   MODAL DE RECUPERAÇÃO DE SENHA (SMTP EM 2 ETAPAS)
   ========================================================================== */

.reset-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.reset-modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--primary-subtle);
  position: relative;
  animation: slideUp 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.reset-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
}

.reset-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--primary-glow);
}

.reset-header-text {
  flex: 1;
}

.reset-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.reset-modal-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.btn-close-reset {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.btn-close-reset:hover {
  color: #ffffff;
}

.reset-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reset-modal-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
}

.step2-info-banner {
  background: rgba(30, 41, 59, 0.8);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.step2-info-banner strong {
  color: #ffffff;
}

.input-code-digits {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem !important;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  color: var(--primary) !important;
}

.reset-resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  gap: 10px;
}

.reset-resend-text {
  color: #94a3b8;
  font-size: 0.78rem;
}

.btn-resend-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-resend-link:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.12);
  text-decoration: underline;
}

.btn-resend-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

.reset-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-reset-cancel {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-reset-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-reset-primary {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all 0.18s;
}

.btn-reset-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-reset-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
