/* =====================================================
   TOPBAR
===================================================== */

.topbar {
  height: 92px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 36px;

  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  max-height: 72px;
  max-width: 220px;

  object-fit: contain;

  transition:
    transform .3s ease,
    filter .3s ease;
}

.brand img:hover {
  transform: scale(1.03);
}

/* =====================================================
   BOTÃ“N TEMA
===================================================== */

.theme-toggle {
  width: 50px;
  height: 50px;

  border-radius: 50%;

  border: 1px solid var(--border);

  background: var(--card);

  color: var(--text);

  display: grid;
  place-items: center;

  font-size: 19px;

  backdrop-filter: blur(22px);

  box-shadow:
    0 10px 30px rgba(0,0,0,.08);

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    background .35s ease;
}

.theme-toggle:hover {
  transform:
    translateY(-2px)
    rotate(5deg);

  box-shadow:
    0 14px 36px rgba(0,0,0,.12);
}

html[data-theme="dark"] .theme-toggle {
  box-shadow:
    0 0 25px rgba(0,149,255,.08);
}

/* =====================================================
   LAYOUT PRINCIPAL
===================================================== */

.portal-layout {
  min-height: calc(100vh - 170px);

  width: min(1460px, 94%);

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    minmax(260px, 320px)
    minmax(430px, 570px)
    minmax(260px, 320px);

  justify-content: center;
  align-items: center;

  gap: clamp(38px, 4vw, 72px);
}

/* =====================================================
   COLUMNAS LATERALES
===================================================== */

.side-column {
  display: flex;

  flex-direction: column;

  gap: 26px;
}

/* AnimaciÃ³n inicial */

.left-column {
  animation:
    entranceLeft .75s ease both;
}

.right-column {
  animation:
    entranceRight .75s ease both;
}

@keyframes entranceLeft {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes entranceRight {
  from {
    opacity: 0;
    transform: translateX(25px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =====================================================
   BASE TARJETAS
===================================================== */

.widget,
.mini-widget,
.welcome-widget,
.login-card {
  background: var(--card);

  border:
    1px solid var(--border);

  box-shadow:
    var(--shadow);

  backdrop-filter:
    blur(26px)
    saturate(120%);

  -webkit-backdrop-filter:
    blur(26px)
    saturate(120%);

  transition:
    background .4s ease,
    border .4s ease,
    box-shadow .3s ease,
    transform .3s ease;
}

.widget:hover,
.mini-widget:hover,
.welcome-widget:hover {
  transform: translateY(-4px);
}

/* Dark mode premium */

html[data-theme="dark"]
.widget,

html[data-theme="dark"]
.mini-widget,

html[data-theme="dark"]
.welcome-widget,

html[data-theme="dark"]
.login-card {
  background:
    linear-gradient(
      145deg,
      rgba(12, 23, 36, .88),
      rgba(6, 14, 24, .92)
    );

  border-color:
    rgba(130, 170, 210, .13);
}

/* =====================================================
   LOGIN CENTRAL
===================================================== */

.login-card {
  border-radius: 30px;

  padding:
    48px
    48px
    42px;

  text-align: center;

  position: relative;

  overflow: hidden;

  animation:
    entranceCenter .75s
    cubic-bezier(.22,.8,.25,1)
    both;

  box-shadow:
    0 28px 70px rgba(20, 45, 70, .14);
}

html[data-theme="dark"] .login-card {
  box-shadow:
    0 35px 90px rgba(0,0,0,.48),
    0 0 45px rgba(0,149,255,.045);
}

@keyframes entranceCenter {
  from {
    opacity: 0;

    transform:
      translateY(18px)
      scale(.985);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}

/* Borde brillante */

.login-card::before {
  content: "";

  position: absolute;

  inset: 0;

  border-radius: inherit;

  padding: 1px;

  background:
    linear-gradient(
      135deg,
      rgba(0,149,255,.55),
      rgba(80,212,54,.22),
      transparent 35%,
      transparent 60%,
      rgba(255,180,0,.20),
      rgba(255,22,64,.32)
    );

  -webkit-mask:
    linear-gradient(#fff 0 0)
      content-box,
    linear-gradient(#fff 0 0);

  -webkit-mask-composite:
    xor;

  mask-composite:
    exclude;

  pointer-events: none;
}

/* Efecto interior */

.login-card::after {
  content: "";

  position: absolute;

  width: 280px;
  height: 280px;

  right: -160px;
  top: -160px;

  border-radius: 50%;

  background:
    rgba(0,149,255,.06);

  filter: blur(20px);

  pointer-events: none;
}

/* =====================================================
   LOGO LOGIN
===================================================== */

.login-logo {
  max-width: 310px;
  width: 72%;
  max-height: 150px;

  object-fit: contain;

  margin-bottom: 12px;

  transition: transform .3s ease;
}

.login-logo:hover {
  transform: scale(1.025);
}

/* =====================================================
   TEXTOS LOGIN
===================================================== */

.portal-label {
  display: block;

  color: var(--blue);

  margin-bottom: 14px;

  font-size: 15px;

  font-weight: 500;

  letter-spacing: .2px;
}

.login-card h1 {
  margin: 0;

  font-size:
    clamp(34px, 3.6vw, 48px);

  line-height: 1.1;

  letter-spacing: -.8px;
}

.login-card h1 span {
  color: var(--green);
}

.login-description {
  margin:
    14px 0
    34px;

  color: var(--text-muted);

  font-size: 17px;
}

/* =====================================================
   FORMULARIO
===================================================== */

#loginForm {
  text-align: left;
}

#loginForm label {
  display: block;

  margin-bottom: 10px;

  font-weight: 650;

  font-size: 14px;
}

/* Input */

.input-wrapper {
  min-height: 60px;

  display: flex;
  align-items: center;

  gap: 14px;

  padding:
    0
    18px;

  border-radius: 13px;

  background: var(--input);

  border:
    1px solid var(--border);

  transition:
    border .25s ease,
    box-shadow .25s ease,
    transform .25s ease,
    background .35s ease;

  position: relative;
}

.input-wrapper > span {
  opacity: .7;
}

.input-wrapper:hover {
  border-color:
    rgba(0,149,255,.28);
}

.input-wrapper:focus-within {
  border-color:
    rgba(0,149,255,.72);

  box-shadow:
    0 0 0 4px
    rgba(0,149,255,.10),
    0 8px 24px
    rgba(0,149,255,.07);

  transform:
    translateY(-1px);
}

html[data-theme="dark"]
.input-wrapper:focus-within {
  box-shadow:
    0 0 0 4px
      rgba(0,149,255,.11),
    0 0 25px
      rgba(0,149,255,.07);
}

.input-wrapper input {
  border: none;

  outline: none;

  background: transparent;

  color: var(--text);

  flex: 1;

  width: 100%;

  font-size: 15px;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

/* =====================================================
   BOTÃ“N LOGIN
===================================================== */

.login-button {
  width: 100%;

  min-height: 60px;

  margin-top: 24px;

  border: none;

  border-radius: 13px;

  background:
    linear-gradient(
      100deg,
      #078ef5 0%,
      #00a8df 38%,
      #25bf7a 68%,
      #52d735 100%
    );

  background-size: 150% auto;

  color: white;

  font-weight: 750;

  font-size: 16px;

  display: flex;

  align-items: center;
  justify-content: center;

  gap: 12px;

  box-shadow:
    0 12px 30px
    rgba(0,149,255,.22);

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    background-position .45s ease;

  position: relative;

  overflow: hidden;
}

.login-button::before {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      110deg,
      transparent 25%,
      rgba(255,255,255,.18) 50%,
      transparent 75%
    );

  transform:
    translateX(-130%);

  transition:
    transform .55s ease;
}

.login-button:hover {
  transform:
    translateY(-3px);

  background-position:
    right center;

  box-shadow:
    0 18px 42px
    rgba(0,149,255,.30);
}

.login-button:hover::before {
  transform:
    translateX(130%);
}

.login-button span {
  transition:
    transform .25s ease;
}

.login-button:hover span {
  transform:
    translateX(5px);
}

.login-button:active {
  transform:
    translateY(0)
    scale(.995);
}

/* =====================================================
   SEGURIDAD
===================================================== */

.security {
  margin-top: 30px;

  display: flex;

  justify-content: center;
  align-items: center;

  gap: 12px;

  color: var(--text-muted);

  font-size: 14px;
}

.security > span {
  font-size: 23px;
}

.security div {
  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 3px;
}

.security strong {
  color: var(--text);

  font-weight: 650;
}

/* =====================================================
   WIDGETS
===================================================== */

.widget {
  border-radius: 20px;

  padding: 23px;
}

.widget-header {
  display: flex;

  align-items: center;

  gap: 14px;
}

.widget-header div {
  flex: 1;
}

.widget h3,
.widget p {
  margin: 0;
}

.widget h3 {
  font-size: 16px;
}

.widget p {
  color: var(--text-muted);

  margin-top: 4px;

  font-size: 13px;
}

.widget a {
  display: inline-flex;

  align-items: center;

  margin-top: 22px;

  font-size: 13px;

  font-weight: 550;
}

.widget-icon {
  font-size: 30px;
}

.badge {
  background:
    linear-gradient(
      145deg,
      #ff1640,
      #dd0032
    );

  color: white;

  min-width: 26px;
  height: 26px;

  display: grid;

  place-items: center;

  border-radius: 50%;

  font-size: 12px;

  box-shadow:
    0 5px 15px
    rgba(255,22,64,.22);
}

/* =====================================================
   ESTADO EQUIPO
===================================================== */

.widget-title {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 20px;
}

.status-title {
  color: var(--green);

  font-size: 12px;
}

.team-member {
  display: flex;

  align-items: center;

  gap: 12px;

  margin: 17px 0;

  transition:
    transform .22s ease;
}

.team-member:hover {
  transform:
    translateX(4px);
}

.avatar {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  display: grid;

  place-items: center;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      var(--blue),
      var(--green)
    );

  color: white;

  font-weight: 700;

  font-size: 13px;

  box-shadow:
    0 7px 18px
    rgba(0,149,255,.14);
}

.team-member div:last-child {
  display: flex;

  flex-direction: column;

  gap: 4px;
}

.team-member strong {
  font-size: 14px;
}

.team-member span {
  font-size: 12px;
}

.online {
  color: var(--green);
}

.meeting {
  color: var(--yellow);
}

/* =====================================================
   MINI WIDGETS
===================================================== */

.mini-widget,
.welcome-widget {
  border-radius: 19px;

  padding:
    17px
    20px;

  display: flex;

  align-items: center;

  gap: 14px;
}

.mini-widget > span,
.welcome-widget > span {
  font-size: 27px;
}

.mini-widget div,
.welcome-widget div {
  display: flex;

  flex-direction: column;

  gap: 4px;
}

.mini-widget strong,
.welcome-widget strong {
  font-size: 14px;
}

.mini-widget small,
.welcome-widget small {
  color: var(--text-muted);

  font-size: 12px;
}

/* =====================================================
   CALENDARIO
===================================================== */

.month {
  color: var(--blue);

  display: block;

  margin-bottom: 17px;

  font-size: 14px;
}

.calendar {
  display: grid;

  grid-template-columns:
    repeat(7, 1fr);

  gap: 10px;

  align-items: center;

  text-align: center;

  font-size: 12px;

  margin-bottom: 25px;
}

.calendar span {
  min-height: 27px;

  display: grid;
  place-items: center;
}

.today {
  background:
    linear-gradient(
      145deg,
      #029bf8,
      #087fe0
    );

  color: white;

  border-radius: 50%;

  width: 29px;
  height: 29px;

  justify-self: center;

  box-shadow:
    0 5px 15px
    rgba(0,149,255,.25);
}

/* =====================================================
   EVENTOS
===================================================== */

.events h4 {
  margin:
    0
    0
    15px;

  font-size: 14px;
}

.event {
  display: flex;

  align-items: flex-start;

  gap: 12px;

  margin: 15px 0;
}

.event-dot {
  width: 9px;
  height: 9px;

  flex:
    0
    0
    9px;

  border-radius: 50%;

  margin-top: 5px;
}

.event-dot.red {
  background: var(--red);

  box-shadow:
    0 0 10px
    rgba(255,22,64,.20);
}

.event-dot.yellow {
  background: var(--yellow);

  box-shadow:
    0 0 10px
    rgba(255,180,0,.18);
}

.event-dot.green {
  background: var(--green);

  box-shadow:
    0 0 10px
    rgba(80,212,54,.18);
}

.event div {
  display: flex;

  flex-direction: column;

  gap: 4px;
}

.event strong {
  font-size: 13px;
}

.event small {
  color: var(--text-muted);

  font-size: 11px;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  text-align: center;

  color: var(--text-muted);

  padding:
    25px
    20px
    28px;

  font-size: 12px;
}

/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 1180px) {
  .portal-layout {
    grid-template-columns:
      minmax(420px, 620px);
  }

  .side-column {
    display: none;
  }

  .login-card {
    width: 100%;
  }
}

/* =====================================================
   RESPONSIVE MÃ“VIL
===================================================== */

@media (max-width: 650px) {
  .topbar {
    height: 78px;

    padding:
      14px
      18px;
  }

  .brand img {
    max-width: 145px;
    max-height: 55px;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .portal-layout {
    min-height:
      calc(100vh - 130px);

    width: 92%;

    grid-template-columns: 1fr;
  }

  .login-card {
    padding:
      34px
      23px
      31px;

    border-radius: 24px;
  }

  .login-logo {
    max-width: 220px;

    width: 70%;
  }

  .login-card h1 {
    font-size: 32px;
  }

  .login-description {
    font-size: 15px;

    margin-bottom: 28px;
  }

  .security {
    font-size: 12px;
  }

  body::before,
  body::after {
    opacity: .55;
  }
}
/* =====================================================
   AJUSTES FINALES V2
===================================================== */

/* Logo superior izquierdo */

.brand img {
  max-height: 82px;
  max-width: 250px;
}

/* Logo central */

.login-logo {
  width: 78%;
  max-width: 340px;
  max-height: 165px;
}

/* Levantar ligeramente todo el contenido */

.portal-layout {
  transform: translateY(-10px);
}

/* Un poco m¨¢s de profundidad a la tarjeta central */

html[data-theme="dark"] .login-card {
  background:
    linear-gradient(
      145deg,
      rgba(10, 25, 40, .94),
      rgba(5, 13, 23, .97)
    );

  border-color: rgba(0,149,255,.18);

  box-shadow:
    0 35px 90px rgba(0,0,0,.52),
    0 0 55px rgba(0,149,255,.06);
}

html[data-theme="light"] .login-card {
  background:
    rgba(255,255,255,.88);

  box-shadow:
    0 30px 75px rgba(28,65,95,.14);
}

/* Mejor presencia del bot¨®n */

.login-button {
  letter-spacing: .1px;
}

html[data-theme="dark"] .login-button {
  box-shadow:
    0 15px 38px rgba(0,149,255,.22),
    0 0 30px rgba(0,149,255,.07);
}

/* En m¨®vil no desplazamos el layout */

@media (max-width: 650px) {
  .portal-layout {
    transform: none;
  }
}