/* ==========================================================================
   DIGITAS LOGIN TEMPLATE - ESTILOS PRINCIPALES
   Optimizado para: Safari, Chrome, Firefox, Edge y Dispositivos Móviles
   ========================================================================== */

:root {
  /* Colores Corporativos Digitas (digitas.cl & Publicis Groupe) */
  --digitas-coral: #FF1053;
  --digitas-coral-hover: #E00A45;
  --digitas-coral-light: rgba(255, 16, 83, 0.08);
  --digitas-coral-glow: rgba(255, 16, 83, 0.28);
  
  --digitas-yellow: #FCB900;
  --digitas-sky: #32D6FF;
  --digitas-blue: #3452FF;
  --digitas-purple: #7C00FF;
  
  /* Neutros & Superficies */
  --text-primary: #1E1F26;
  --text-secondary: #6E6F67;
  --text-muted: #94A3B8;
  
  --bg-card: #FFFFFF;
  --border-light: #E2E8F0;
  --border-focus: #FF1053;
  
  /* Tipografía */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Radios & Sombras */
  --radius-card: 28px;
  --radius-pill: 9999px;
  --shadow-card: 0 25px 70px -15px rgba(255, 16, 83, 0.12), 0 15px 35px -10px rgba(30, 31, 38, 0.06);
  --shadow-btn: 0 10px 24px -5px rgba(255, 16, 83, 0.38);
  --shadow-google: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   RESET & REGLAS CROSS-BROWSER (Safari, Chrome, Firefox, Edge)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  width: 100%;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: #FEE7EE;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Reseteo y compatibilidad de inputs para Safari / iOS */
input, button, select, textarea {
  font-family: inherit;
  font-size: 16px; /* 16px obligatorio para prevenir el zoom automático molesto en iOS Safari */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
}

/* Fix para Safari y Chrome al autocompletar credenciales */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================================
   FONDO AMBIENTAL (Ondas pastel de referencia)
   ========================================================================== */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, #FFF5F7 0%, #FEE5EC 55%, #FDD2DE 100%);
  transform: translateZ(0); /* Aceleración por hardware para Safari y Edge */
}

.ambient-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  -webkit-filter: blur(60px);
  opacity: 0.6;
}

.shape-1 {
  width: 580px;
  height: 580px;
  background: #FFAAC2;
  top: -160px;
  right: -100px;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

.shape-2 {
  width: 650px;
  height: 650px;
  background: #FFD4DF;
  bottom: -200px;
  left: -120px;
  animation: floatAmbient 22s ease-in-out infinite alternate-reverse;
}

.shape-3 {
  width: 380px;
  height: 380px;
  background: #FEE0E9;
  top: 40%;
  left: 20%;
  opacity: 0.4;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.05); }
  100% { transform: translate(-20px, 25px) scale(0.95); }
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL & TARJETA
   ========================================================================== */
.login-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.login-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  width: 100%;
  max-width: 1080px;
  /* Altura fija y estable en escritorio para garantizar CERO salto entre pestañas o vistas */
  min-height: 630px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  transform: translateZ(0);
}

/* ==========================================================================
   PANEL VISUAL (Columna Izquierda: Arte Abstracto Borde a Borde)
   ========================================================================== */
.visual-panel {
  position: relative;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2.25rem 2.5rem 2.5rem 2.8rem;
  overflow: hidden;
  border-right: 1px solid #F1F5F9;
}

/* Cabecera del panel: Branding Publicis Groupe */
.brand-badge {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 18px 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(226, 232, 240, 0.95);
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.publicis-official-logo {
  height: 42px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

/* Sello de marca "BY Digitas" sobre la forma roja inferior */
.by-digitas-badge {
  position: absolute;
  bottom: 24px;
  right: 26px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.by-text {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  text-transform: uppercase;
  opacity: 0.95;
  line-height: 1;
}

.by-digitas-logo {
  height: 13px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.by-digitas-divider {
  width: 1px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.35);
}

.by-digitas-unicorn {
  height: 16px;
  width: 16px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Ilustración vectorial abstracta que cubre exactamente de borde a borde */
.illustration-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.art-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Animaciones sutiles de confeti y doodle */
.doodle-loop {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: drawLoop 2.8s ease-out forwards;
}

@keyframes drawLoop {
  0% { stroke-dashoffset: 1200; opacity: 0.2; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

.floating-item {
  transform-origin: center;
  animation: floatItem 5s ease-in-out infinite alternate;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 1.1s; }
.delay-3 { animation-delay: 1.9s; }
.delay-4 { animation-delay: 2.7s; }

@keyframes floatItem {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
  100% { transform: translateY(5px) rotate(-1.5deg); }
}

/* Textos de bienvenida centrados en el espacio libre */
.welcome-content {
  position: relative;
  z-index: 3;
  margin-top: 4.8rem;
  max-width: 380px;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 2.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.welcome-text {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 330px;
}

/* ==========================================================================
   PANEL DE FORMULARIOS & VISTAS (Columna Derecha)
   ========================================================================== */
.form-panel {
  position: relative;
  z-index: 2;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3.4rem 3.5rem 2.5rem 3.5rem;
}

.form-container {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Vistas con transición suave */
.auth-view {
  width: 100%;
  animation: fadeInView 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Encabezados de formulario anclados firmemente */
.form-header {
  margin-bottom: 1.5rem;
}

.form-title {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.15;
}

.form-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 0.45rem;
}

/* ==========================================================================
   TABS DE MÉTODO DE AUTENTICACIÓN (Contraseña / Magic Link)
   ========================================================================== */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: #F8FAFC;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  position: relative;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-button:hover:not(.active) {
  color: var(--text-primary);
}

.tab-button.active {
  background-color: #FFFFFF;
  color: var(--digitas-coral);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Contenedor de pestañas con altura exactamente idéntica para CERO salto */
.tab-content-wrapper {
  position: relative;
  height: 242px;
  min-height: 242px;
}

.tab-content-wrapper .auth-form {
  height: 100%;
  justify-content: space-between;
}

/* ==========================================================================
   FORMULARIOS & INPUTS ESTILO PÍLDORA
   ========================================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  animation: fadeInTab 0.25s ease-out forwards;
}

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

/* ==========================================================================
   8. ESTILOS FUNCIONALES: 2FA, APP LAUNCHER Y PANEL DE ADMINISTRACIÓN
   ========================================================================== */

/* 2FA OTP Inputs */
.otp-inputs-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1.5rem 0 1rem;
}

.otp-box {
  width: 45px;
  height: 52px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: monospace;
  color: #1E1F26;
  background: #F4F6F0;
  border: 1.5px solid #D9DDD4;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.otp-box:focus {
  outline: none;
  background: #FFFFFF;
  border-color: #FF1053;
  box-shadow: 0 0 0 3px rgba(255, 16, 83, 0.15);
}

/* App Launcher */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.app-card {
  background: #FFFFFF;
  border: 1.5px solid #ECEEE9;
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: #FF1053;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.app-card-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.app-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E1F26;
  margin-bottom: 4px;
}

.app-card-desc {
  font-size: 0.75rem;
  color: #6E6F67;
  line-height: 1.35;
}

.app-card-badge {
  margin-top: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #32D6FF;
  background: rgba(50, 214, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Admin Tabs */
.admin-tab-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6E6F67;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.admin-tab-btn.active {
  color: #FF1053;
  border-bottom-color: #FF1053;
}

.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECEEE9;
  color: #1E1F26;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
}

.domain-chip-remove {
  cursor: pointer;
  color: #FF1053;
  font-weight: 800;
}

.admin-item-card {
  background: #FFFFFF;
  border: 1px solid #ECEEE9;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Scrollbars finas para listas */
.apps-grid::-webkit-scrollbar,
#admin-apps-list::-webkit-scrollbar,
#admin-users-list::-webkit-scrollbar {
  width: 4px;
}
.apps-grid::-webkit-scrollbar-thumb,
#admin-apps-list::-webkit-scrollbar-thumb,
#admin-users-list::-webkit-scrollbar-thumb {
  background: #D9DDD4;
  border-radius: 4px;
}


.input-group {
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pill-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
  height: 52px;
}

.pill-input-wrapper:hover {
  border-color: #CBD5E1;
}

.pill-input-wrapper:focus-within {
  border-color: var(--digitas-coral);
  box-shadow: 0 0 0 4px var(--digitas-coral-glow);
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 1.25rem;
  color: #94A3B8;
  transition: color 0.25s ease;
  flex-shrink: 0;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

.pill-input-wrapper:focus-within .input-icon {
  color: var(--digitas-coral);
}

.pill-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 1.25rem 0 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.pill-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

/* Botón alternar visibilidad de contraseña */
.toggle-password {
  background: transparent;
  border: none;
  cursor: pointer;
  padding-right: 1.25rem;
  color: #94A3B8;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toggle-password:hover {
  color: var(--text-primary);
}

.eye-icon {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   UTILIDADES DEL FORMULARIO (Recordarme & Olvido de contraseña)
   ========================================================================== */
.form-utils {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -0.2rem;
  font-size: 0.85rem;
  gap: 10px;
}

/* Checkbox estilizado */
.checkbox-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-light);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-checkmark svg {
  width: 12px;
  height: 12px;
  stroke: #FFFFFF;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.checkbox-container input:checked ~ .custom-checkmark {
  background-color: var(--digitas-coral);
  border-color: var(--digitas-coral);
}

.checkbox-container input:checked ~ .custom-checkmark svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-container:hover .custom-checkmark {
  border-color: var(--digitas-coral);
}

.checkbox-label {
  font-weight: 500;
}

.forgot-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.forgot-link:hover {
  color: var(--digitas-coral);
  text-decoration: underline;
}

/* ==========================================================================
   BOTÓN PRINCIPAL DE ACCIÓN (Píldora Coral Digitas)
   ========================================================================== */
.submit-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  background-color: var(--digitas-coral);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.25rem;
}

.submit-pill-btn:hover {
  background-color: var(--digitas-coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(255, 16, 83, 0.46);
}

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

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.submit-pill-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Espaciador de Magic Link para calibrar altura idéntica */
.form-spacer-magic {
  height: 10px;
}

.magic-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.1rem;
}

.magic-description strong {
  color: var(--text-primary);
}

.magic-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 0.5rem;
  animation: fadeIn 0.3s ease;
}

.feedback-icon {
  width: 20px;
  height: 20px;
  stroke: #059669;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   DIVISOR SOCIAL
   ========================================================================== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 1.5rem 0 1.25rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background-color: #E2E8F0;
}

.divider-text {
  font-size: 0.82rem;
  color: #94A3B8;
  font-weight: 500;
  white-space: nowrap;
}

/* ==========================================================================
   BOTÓN GOOGLE
   ========================================================================== */
.google-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-google);
  transition: all 0.25s ease;
}

.google-pill-btn:hover {
  border-color: #CBD5E1;
  background-color: #F8FAFC;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   PIE DE FORMULARIO
   ========================================================================== */
.form-footer {
  margin-top: 1.6rem;
  text-align: center;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.create-account-link {
  color: var(--digitas-coral);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.create-account-link:hover {
  text-decoration: underline;
  color: var(--digitas-coral-hover);
}

/* ==========================================================================
   RESPONSIVIDAD Y ADAPTABILIDAD MOBILE
   ========================================================================== */
@media (max-width: 960px) {
  .login-wrapper {
    padding: 1.5rem 1rem;
  }

  .login-card {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
    border-radius: 24px;
  }

  .visual-panel {
    min-height: 175px;
    padding: 1.5rem 1.5rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid #F1F5F9;
    position: relative;
    overflow: hidden;
  }

  .illustration-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.22;
  }

  .welcome-content {
    position: relative;
    z-index: 2;
    margin-top: 0.85rem;
    max-width: 100%;
  }

  .welcome-title {
    font-size: 1.7rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
  }

  .welcome-text {
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 320px;
    color: var(--text-secondary);
  }

  .form-panel {
    padding: 2.25rem 2rem 2.5rem;
  }

  .form-container {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .login-wrapper {
    padding: 1rem 0.75rem;
  }

  .login-card {
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
  }

  .visual-panel {
    min-height: 160px;
    padding: 1.25rem 1.25rem 1.25rem;
  }

  .illustration-canvas {
    opacity: 0.18;
  }

  .brand-badge {
    padding: 6px 12px 6px 8px;
    margin-bottom: 0.4rem;
  }

  .publicis-official-logo {
    height: 26px;
  }

  .by-digitas-badge {
    bottom: 12px;
    right: 14px;
    padding: 4px 10px 4px 8px;
    gap: 6px;
  }

  .by-text {
    font-size: 0.65rem;
  }

  .by-digitas-logo {
    height: 11px;
  }

  .by-digitas-unicorn {
    height: 13px;
    width: 13px;
  }

  .welcome-content {
    margin-top: 0.35rem;
  }

  .welcome-title {
    font-size: 1.45rem;
    margin-bottom: 0.2rem;
  }

  .welcome-text {
    font-size: 0.82rem;
    line-height: 1.35;
    max-width: 270px;
  }

  .form-panel {
    padding: 1.75rem 1.25rem 2rem;
  }

  .form-container {
    max-width: 100%;
    min-height: auto;
  }

  .form-title {
    font-size: 1.75rem;
  }

  .pill-input-wrapper {
    height: 48px;
  }

  .submit-pill-btn {
    height: 48px;
    font-size: 0.95rem;
  }

  .google-pill-btn {
    height: 46px;
    font-size: 0.9rem;
  }

  .form-utils {
    font-size: 0.76rem;
    gap: 6px;
  }

  .forgot-link {
    font-size: 0.76rem;
  }
}
