:root {
  --main-pink: #EC7000;
  --text-primary: #333;
  --text-secondary: #555;
  --border-light: #DDD;
  --background-white: #FFF;
  --error-red-text: #DC3545;
  --error-pink-border: #FAE0C8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--background-white);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.right-panel {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

header {
  padding: 60px 24px 36px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo-icon {
  width: 48px;
  height: auto;
  margin-left: 4px;
}

.card-footer {
  display: none;
}

.welcome-back {
  text-align: left;
}

.welcome-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.saved-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #E8E8E8;
  border-radius: 12px;
  background-color: #FAFAFA;
  margin-bottom: 24px;
}

.saved-user-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background-color: #FFF3E6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saved-user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.saved-user-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.saved-user-cpf {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.switch-account-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--main-pink);
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid var(--main-pink);
  border-radius: 8px;
  padding: 8px 16px;
  transition: background-color 0.2s ease;
}

.switch-account-link:hover {
  background-color: #FFF3E6;
}

.btn-secondary {
  display: block;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--main-pink);
  text-decoration: none;
  padding: 14px;
  border: 1.5px solid #E0E0E0;
  border-radius: 12px;
  margin-top: 12px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #FFF3E6;
  border-color: var(--main-pink);
}

.login-container {
  padding: 0 28px;
  flex: 1;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.input-group {
  margin-bottom: 20px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid #E8E8E8;
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #FAFAFA;
}

.input-wrapper:focus-within {
  border-color: var(--main-pink);
  box-shadow: 0 0 0 3px rgba(236, 112, 0, 0.1);
  background-color: #fff;
}

.input-group input {
  width: 100%;
  padding: 16px 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  background-color: transparent;
  outline: none;
}

.input-group input::placeholder {
  color: #AAA;
}

.error-icon {
  display: none;
  position: absolute;
  right: 14px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23DC3545'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.error-message {
  color: var(--error-red-text);
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
  display: none;
  padding-left: 4px;
}

.input-group.error .input-wrapper {
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--error-pink-border);
}

.input-group.error .error-icon {
  display: block;
}

.input-group.error input {
  padding-right: 40px;
}

.input-group.error .error-message {
  display: block;
}

.remember-group {
  display: flex;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 32px;
}

.remember-label {
  margin-left: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-submit {
  width: 100%;
  background-color: var(--main-pink);
  color: white;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  margin-bottom: 40px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  text-decoration: none;
  display: block;
  text-align: center;
}

.btn-submit:hover {
  background-color: #D06300;
}

.btn-submit:disabled,
.btn-submit.disabled {
  background-color: #ccc;
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-submit:disabled:hover,
.btn-submit.disabled:hover {
  background-color: #ccc;
}

.chat-promo {
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 40px;
  display: none;
}

.chat-promo strong {
  color: var(--main-pink);
  font-weight: 700;
}

footer {
  text-align: center;
  padding: 24px 24px 32px;
}

.privacy-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: none;
}

.cnpj-info {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  opacity: 0.8;
}

.footer-link {
  font-size: 12px;
  color: var(--main-pink);
  font-weight: 700;
  text-decoration: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked+.slider {
  background-color: var(--main-pink);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background-color: #fff;
  margin: auto;
  padding: 24px;
  border-radius: 10px;
  max-width: 90%;
  width: 600px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-container h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.modal-container h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 8px;
}

.modal-container p,
.modal-container li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.modal-container ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
  color: #000;
}

.loading-overlay {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(90, 90, 90, 0.3);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-modal {
  background-color: #fff;
  border-radius: 12px;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top-color: var(--main-pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-modal strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loading-modal p {
  font-size: 14px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .loading-overlay {
    align-items: flex-end;
  }

  .loading-modal {
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 24px 24px 32px 24px;
  }
}

.left-panel {
  display: none;
}

.woman-image {
  display: none;
}

.left-panel-logo {
  display: none;
}

.form-card {
  padding: 0;
}

@media (min-width: 992px) {
  body {
    background-color: #ECECEC;
    padding: 0;
    margin: 0;
    height: 100dvh;
    overflow: hidden;
  }

  .split-layout-container {
    display: flex;
    height: 100%;
    position: relative;
    overflow: hidden;
  }

  .left-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 38%;
    background-color: var(--main-pink);
    color: var(--background-white);
    position: relative;
    padding: clamp(24px, 4vh, 48px) clamp(24px, 3vw, 48px);
    padding-bottom: 20%;
    overflow: visible;
    z-index: 1;
  }

  .left-panel-logo {
    display: block;
    margin-bottom: clamp(16px, 3vh, 40px);
  }

  .panel-logo {
    width: clamp(48px, 5vw, 80px);
    height: auto;
    filter: brightness(0) invert(1);
  }

  .cta-content {
    text-align: left;
    z-index: 4;
    position: relative;
    max-width: 320px;
  }

  .cta-content h2 {
    font-size: clamp(24px, 2.5vw, 38px);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0;
    color: #fff;
  }

  .cta-content p {
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-top: clamp(8px, 1.5vh, 20px);
    max-width: 280px;
  }

  .cta-content h2 strong {
    font-weight: 700;
  }

  .cta-highlight {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }

  .woman-image {
    display: block;
    position: absolute;
    bottom: 0;
    left: 38%;
    transform: translateX(-50%);
    height: 79%;
    width: auto;
    object-fit: contain;
    object-position: bottom;
    z-index: 5;
    pointer-events: none;
  }

  .right-panel {
    flex: 1;
    max-width: none;
    min-height: auto;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(20px, 4vh, 48px) clamp(32px, 5vw, 80px);
    background-color: #ECECEC;
    z-index: 1;
  }

  header,
  .login-container,
  footer {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  header {
    padding-top: 0;
    padding-bottom: clamp(8px, 1.5vh, 20px);
  }

  .logo-wrapper,
  .logo-icon {
    display: none;
  }

  .left-panel .panel-logo {
    filter: brightness(0) invert(1);
  }

  .form-card {
    background-color: #fff;
    border-radius: 16px;
    padding: clamp(24px, 3vh, 40px) clamp(24px, 2.5vw, 36px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  }

  .login-container {
    flex: 0;
  }

  .chat-promo {
    display: block;
    margin-bottom: 0;
    margin-top: 24px;
  }

  footer {
    display: none;
  }

  .card-footer {
    display: block;
    text-align: center;
    margin-top: 24px;
  }

  .card-footer .cnpj-info {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .card-footer .footer-link {
    font-size: 12px;
  }
}

@media (min-width: 992px) and (max-height: 700px) {
  .left-panel {
    padding: 16px 24px;
  }

  .left-panel-logo {
    margin-bottom: 12px;
  }

  .panel-logo {
    width: 44px;
  }

  .cta-content h2 {
    font-size: 22px;
  }

  .cta-content p {
    font-size: 12px;
    margin-top: 8px;
  }

  .form-card {
    padding: 24px 24px;
  }

  h1 {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .input-group input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .remember-group {
    margin-top: 14px;
    margin-bottom: 20px;
  }

  .btn-submit {
    padding: 12px;
    font-size: 14px;
    margin-bottom: 20px;
  }

  .right-panel {
    padding: 16px 40px;
  }

  footer {
    padding-top: 12px;
  }

  .cnpj-info {
    font-size: 10px;
  }
}