html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

:root {
  --brand-blue: #3e3c74;
  --brand-blue-deep: #343267;
  --accent: #a64786;
  --panel: #ffffff;
  --panel-line: #e7e8ef;
  --right-bg: #efeff4;
  --text: #1d2230;
  --muted: #70768a;
  --shadow: 0 28px 80px rgba(27, 32, 54, 0.14);
}

* {
  box-sizing: border-box;
}

body.login-body,
body.desktop-only-body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--right-bg);
  color: var(--text);
  overflow-x: hidden;
}

.login-shell {
  min-height: 100vh;
  display: flex;
}

.login-left {
  flex: 0 0 46%;
  min-width: 360px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.login-right {
  flex: 1;
  background: var(--right-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.login-card-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card {
  width: min(410px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 30px 30px 26px;
}

.login-head {
  margin-bottom: 20px;
  text-align: center;
}

.login-head h1 {
  margin: 0 0 8px;
  font-size: 31px;
  line-height: 1.05;
  font-weight: 780;
  letter-spacing: -0.4px;
}

.login-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-brand-stack {
  width: min(360px, 76%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.login-brand-stack--mobile-block {
  width: 100%;
  gap: 18px;
}

.brand-sur,
.brand-dipind {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-sur {
  max-width: 210px;
}

.brand-dipind {
  max-width: 240px;
}

.brand-divider {
  width: min(220px, 64%);
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin: 0 0 7px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.form-control,
.form-group input,
.form-group select,
.select2-container--default .select2-selection--single {
  width: 100%;
  min-height: 48px;
  border-radius: 13px;
  border: 1px solid #d8dce7;
  background: #fff;
  font-size: 14px;
}

.form-group input,
.form-group select,
.select2-container--default .select2-selection--single {
  padding-left: 14px;
  padding-right: 14px;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
  outline: 0;
  border-color: rgba(166, 71, 134, 0.72);
  box-shadow: 0 0 0 4px rgba(166, 71, 134, 0.12);
}

.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  padding-left: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 46px;
  color: var(--text);
  padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #949ab0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
  right: 10px;
}

.select2-dropdown {
  border: 1px solid #d8dce7;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(27, 32, 54, 0.14);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--accent);
}

.btn-lila {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-lila:hover,
.btn-lila:focus {
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}

#mensaje-error {
  margin: 2px 0 16px;
  border: 1px solid #f3c7cf;
  background: #fff3f6;
  color: #b42f54;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.desktop-only-wrap {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-deep));
  display: grid;
  place-items: center;
  padding: 20px;
}

.desktop-only-card {
  width: min(520px, 100%);
  border-radius: 24px;
  padding: 28px 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.desktop-only-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 1200px) {
  .login-left {
    flex-basis: 42%;
    min-width: 320px;
    padding: 26px;
  }

  .login-card {
    width: min(430px, 100%);
  }
}

@media (max-width: 991.98px) {
  .login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(250px, 34%) minmax(0, 1fr);
  }

  .login-left {
    min-width: 0;
    padding: 20px;
  }

  .login-right {
    padding: 22px 18px;
  }

  .login-brand-stack {
    width: min(220px, 78%);
  }

  .login-card,
  .login-under-messages {
    width: min(420px, 100%);
  }
}

.desktop-only-logos {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.desktop-only-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.desktop-only-logo-sur {
  width: min(150px, 34vw);
}

.desktop-only-logo-dipind {
  width: min(170px, 38vw);
}

.desktop-only-divider {
  width: 1px;
  height: 54px;
  background: rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
}


body.login-body,
body.desktop-only-body {
  overflow-x: hidden;
}

.login-body {
  overflow-y: hidden;
}

.login-shell {
  position: relative;
  z-index: 2;
}

.login-left {
  padding: 24px;
}

.login-brand-stack {
  width: min(264px, 56%);
  gap: 8px;
}

.brand-sur {
  max-width: 132px;
}

.brand-dipind {
  max-width: 156px;
}

.brand-divider {
  width: min(168px, 58%);
  opacity: .85;
}

.login-card {
  width: min(390px, 100%);
  border-radius: 20px;
  padding: 28px 28px 24px;
  margin: 0;
}

.login-head h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.25px;
  text-align: center;
}

.btn-lila {
  font-weight: 580;
}

.login-focus-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 34, 48, 0.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
  z-index: 15;
  pointer-events: none;
}

.login-focus-overlay.show {
  opacity: 1;
  visibility: visible;
}

.login-right,
.login-card-wrap,
.login-card,
.select2-container,
.select2-dropdown {
  position: relative;
  z-index: 20;
}

.login-under-messages {
  width: min(390px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.login-page-message {
  max-width: 100%;
  width: fit-content;
  min-width: 264px;
  border-radius: 11px;
  padding: 10px 16px;
  font-size: 12.75px;
  line-height: 1.35;
  text-align: center;
  border: 1px solid transparent;
  box-shadow: none;
  margin-inline: auto;
}

.login-page-message--error {
  background: #e4c9cf;
  color: #7f3240;
  border-color: #cfa7b1;
}

.login-page-message--info {
  background: #cfd9ea;
  color: #37527f;
  border-color: #afbfd8;
}

#mensaje-error {
  margin: 0;
}

.desktop-only-body {
  overflow: hidden;
}

.desktop-only-wrap {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.desktop-only-card {
  width: min(520px, calc(100vw - 28px));
  transform: translateY(-2vh);
}

.desktop-only-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.desktop-only-divider {
  width: 1px;
  height: 82px;
  align-self: center;
  background: rgba(255,255,255,.22);
}

.desktop-only-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.desktop-only-logo-sur {
  width: 118px;
}

.desktop-only-logo-dipind {
  width: 136px;
}



@media (max-width: 991.98px) {
  .desktop-only-card {
    transform: translateY(-4vh);
    padding: 24px 20px;
  }

  .desktop-only-logo-sur {
    width: 102px;
  }

  .desktop-only-logo-dipind {
    width: 120px;
  }
}


.dipind-copy {
  font-size: .92em;
  vertical-align: baseline;
}

.desktop-only-divider {
  height: 96px;
}



.login-footer {
  position: fixed;
  right: 16px;
  bottom: 12px;
  width: auto;
  padding: 0;
  text-align: right;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .05em;
  color: rgba(62,60,116,.54);
  background: transparent;
  user-select: none;
  z-index: 50;
}

.screen-footer {
  position: fixed;
  right: 16px;
  bottom: 12px;
  width: auto;
  padding: 0;
  text-align: right;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .05em;
  color: rgba(120,124,136,.9);
  background: transparent;
  user-select: none;
  z-index: 50;
}


@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .login-left {
    padding: 18px 14px;
  }

  .login-brand-stack {
    width: min(180px, 92%);
    gap: 6px;
  }

  .brand-sur {
    max-width: 108px;
  }

  .brand-dipind {
    max-width: 128px;
  }

  .login-card {
    width: min(360px, 100%);
    padding: 24px 22px 22px;
  }
}

@media (max-width: 680px) {
  .login-shell {
    display: flex;
    flex-direction: column;
  }

  .login-left {
    flex: 0 0 auto;
    min-height: 180px;
    padding: 20px 16px;
  }

  .login-right {
    flex: 1 1 auto;
    padding: 18px 14px 50px;
  }

  .login-brand-stack {
    width: 100%;
    max-width: 220px;
  }

  .login-card,
  .login-under-messages {
    width: min(420px, 100%);
  }

  .login-footer {
    right: 12px;
    bottom: 10px;
  }
}


@media (min-width: 681px) and (max-width: 991.98px) {
  .login-shell {
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  }

  .login-left {
    background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-deep));
  }

  .login-right {
    background: #f3f3f7;
    padding-inline: 22px;
  }
}
