@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;600;700&display=swap');

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

body {
  font-family: "Roboto", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url('{{ asset("assets/img/background/Main.webp") }}') center / cover no-repeat fixed;
  color: #fff;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1;
}

.container {
  width: 768px;
  max-width: 95%;
  min-height: 520px;
  background: #fff;
  color: #202020;
  border-radius: 6px;
  box-shadow: 0 2px 16px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.1);
  overflow: hidden;
  position: relative;
  z-index: 2;
  display: flex;
}

.form-container {
  position: absolute;
  inset: 0;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .6s cubic-bezier(.25,.1,.2,1), opacity .6s;
  overflow: hidden;
}

.sign-in {
  width: 50%;
  left: 0;
  z-index: 2;
  background: #fff;
  gap: 18px;
}

.sign-in .form-button {
  margin-top: 6px;
}

.sign-in a {
  margin-top: -4px;
}

.container.active .sign-in {
  transform: translateX(100%);
}

.sign-up {
  width: 50%;
  left: 0;
  opacity: 0;
  z-index: 1;
  background: #fff;
  padding: 44px 40px 40px;
  gap: 16px;
}

.container.active .sign-up {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
}

.form-container h1 {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 2px;
  letter-spacing: -.02em;
}

.form-container p,
.form-container span {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
  color: #202020;
  opacity: .7;
}

.form-container span {
  display: block;
  margin: 4px 0;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: #242424;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.sign-in input[type="email"],
.sign-in input[type="password"] {
  padding: 14px 16px;
  font-size: 16px;
  margin-bottom: 14px;
}

.form-container input:focus {
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33,150,243,.18);
}

.form-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 8px;
}

.form-check-input {
  width: 15px;
  height: 15px;
  accent-color: #2196f3;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.form-check-label {
  font-size: 13px;
  font-weight: 400;
  color: #202020;
  opacity: .8;
  cursor: pointer;
  user-select: none;
  line-height: 1.3;
}

.toggle-panel .button.hidden {
  display: inline-block;
  border-radius: 4px;
  padding: 13px 28px;
  color: #fff;
  border: 2px solid rgba(255,255,255,.85);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  box-shadow: none;
  appearance: none;
  margin-bottom: 10px;
  transition: background .25s, box-shadow .25s, transform .25s;
  text-decoration: none;
  vertical-align: top;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}

.toggle-panel .button.hidden:hover {
  background: rgba(255,255,255,.15);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transform: translateY(-2px) !important;
}

.form-button {
  display: block;
  border-radius: 4px;
  padding: 13px 24px;
  color: #fff;
  border: none;
  background: #202020;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  appearance: none;
  margin: 4px auto 0;
  width: 100%;
  max-width: 260px;
  transition: box-shadow .25s, transform .25s, background .2s;
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}

.form-button:hover {
  background: #333;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  transform: translateY(-2px) !important;
}

.form-button:active {
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transform: translateY(0) !important;
}

.form-container a {
  font-size: 13px;
  color: #202020;
  text-decoration: none;
  opacity: .7;
  transition: opacity .15s;
  display: block;
  text-align: center;
  margin-top: 2px;
}

.form-container a:hover {
  opacity: 1;
}

.toggle-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  background: #202020;
  overflow: hidden;
  border-radius: 150px 0 0 100px;
  transition: transform .6s cubic-bezier(.25,.1,.2,1), border-radius .6s;
  z-index: 1000;
  color: #fff;
}

.container.active .toggle-container {
  transform: translateX(-100%);
  border-radius: 0 150px 100px 0;
}

.toggle {
  width: 200%;
  height: 100%;
  position: relative;
  left: -100%;
  transition: transform .6s cubic-bezier(.25,.1,.2,1);
}

.container.active .toggle {
  transform: translateX(50%);
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 30px;
}

.toggle-panel h1 {
  font-size: 30px;
  font-weight: 300;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}

.toggle-panel p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 24px;
  opacity: .85;
}

.toggle-left {
  transform: translateX(-200%);
}

.container.active .toggle-left {
  transform: translateX(0);
}

.toggle-right {
  right: 0;
}

.container.active .toggle-right {
  transform: translateX(200%);
}

.rol-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.rol-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 4px;
  background: #fff;
  color: #202020;
  font-size: 13px;
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
  transition: all .2s ease;
  opacity: .55;
}

.rol-btn:hover {
  opacity: .8;
  border-color: rgba(0,0,0,.25);
}

.rol-btn.active {
  background: #202020;
  color: #fff;
  border-color: #202020;
  opacity: 1;
  font-weight: 500;
}

.rol-aviso {
  width: 100%;
  font-size: 11.5px;
  color: #666;
  background: #f5f5f5;
  border-left: 3px solid #bbb;
  border-radius: 4px;
  padding: 7px 10px;
  margin: 4px 0 2px;
  line-height: 1.5;
}

.field-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.field-wrap input {
  margin-bottom: 0 !important;
}

.field-error {
  font-size: 11px;
  color: #c62828;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .2s ease, opacity .2s ease, margin .2s ease;
  display: block;
  padding-left: 2px;
}

.field-error.visible {
  max-height: 32px;
  opacity: 1;
  margin: 3px 0 4px;
}

.field-wrap input.input-error {
  border-color: #c62828;
  box-shadow: 0 0 0 2px rgba(198,40,40,.12);
}

.field-wrap input.input-ok {
  border-color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46,125,50,.1);
}

.alert-toast {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: #c62828;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  padding: 8px 14px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 100;
  animation: fadeInUp .25s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
  body {
    min-height: 100dvh;
    padding: 0;
  }

  .container {
    width: 95%;
    max-width: 400px;
    min-height: auto;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  .form-container,
  .sign-in,
  .sign-up {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 24px 20px !important;
    gap: 10px !important;
    display: none;
  }

  .sign-in { display: flex !important; }
  .container.active .sign-in { display: none !important; }
  .container.active .sign-up { display: flex !important; }

  .toggle-container { display: none; }

  .form-container h1 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .form-button,
  .toggle-panel .button.hidden {
    width: 100% !important;
    max-width: 100% !important;
    padding: 13px !important;
    font-size: 15px;
  }

  .form-check { margin: 8px 0 10px; }

  #goToRegister,
  #goToLogin {
    font-weight: 500;
    opacity: 1;
    color: #202020;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-top: 6px;
  }

  .sign-in input[type="email"],
  .sign-in input[type="password"] {
    padding: 12px 14px !important;
    font-size: 15px !important;
    margin-bottom: 0 !important;
  }
}

@media (min-width: 768px) {
  .hideForTabletAndDesktop { display: none !important; }
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
  padding-right: 44px;
  margin-bottom: 0;
}

.sign-in .input-wrapper {
  margin-bottom: 14px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #888;
  display: flex;
  align-items: center;
  transition: color .15s;
  line-height: 0;
}

.toggle-password:hover { color: #202020; }
.toggle-password svg { fill: currentColor; pointer-events: none; }