:root {
  --navy: #0f2349;
  --blue: #0b5da8;
  --green: #75ad72;
}

/* Acceso: identidad OnBroker sobre la oficina institucional. */
body.login {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(28px, 6vw, 92px) clamp(24px, 8vw, 150px);
  background:
    linear-gradient(90deg, rgba(7, 27, 53, .84) 0%, rgba(11, 61, 104, .62) 48%, rgba(49, 112, 91, .26) 100%),
    url("onbroker-office.webp") center center / cover no-repeat fixed;
}

.loginbox {
  width: min(520px, 100%);
  margin: 0;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 80px rgba(2, 18, 37, .34);
  backdrop-filter: blur(8px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.login-onbroker-logo {
  width: 94px;
  height: 94px;
  flex: 0 0 94px;
  object-fit: contain;
}

.login-brand b,
.login-brand small {
  display: block;
}

.login-brand b {
  color: #0f2349;
  font-size: 20px;
  line-height: 1.2;
}

.login-brand small {
  margin-top: 4px;
  color: #647386;
  font-size: 12px;
}

.login-client {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px 112px;
  color: #6c7a89;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.login-avalian,
.avalian-logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f2349;
}

.login-avalian {
  min-width: 112px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
}

.login-avalian img {
  display: block;
  width: 92px;
  height: 20px;
  object-fit: contain;
}

.loginbox h1 {
  margin: 0 0 5px;
  color: #0f2349;
  font-size: clamp(28px, 3vw, 34px);
  letter-spacing: -.025em;
}

.login-intro {
  margin: 0 0 24px;
  color: #66778a;
}

.loginbox form {
  gap: 16px;
}

.loginbox label {
  color: #172943;
}

.loginbox input {
  min-height: 52px;
  border-color: #c7d4e1;
  background: rgba(255, 255, 255, .98);
  transition: border-color .16s, box-shadow .16s;
}

.loginbox input:focus {
  outline: none;
  border-color: #0b5da8;
  box-shadow: 0 0 0 4px rgba(11, 93, 168, .13);
}

.loginbox button {
  min-height: 50px;
  margin-top: 2px;
  border-color: #0b5da8;
  background: #0b5da8;
  box-shadow: 0 8px 20px rgba(11, 93, 168, .2);
}

/* Aplicación: OnBroker principal y Avalian como cartera administrada. */
header.app-header {
  min-height: 86px;
  height: 86px;
  padding: 0 clamp(18px, 2.3vw, 36px);
  gap: clamp(14px, 2vw, 26px);
  overflow: visible;
  color: #0f2349;
  background: #fff;
  border-bottom: 0;
  box-shadow: 0 2px 14px rgba(15, 35, 73, .08);
}

header.app-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #0b5da8 0%, #2d88aa 55%, #a0ca77 100%);
}

.product-brand {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  min-width: 250px;
  color: #0f2349;
  text-decoration: none;
}

.product-logo {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  object-fit: contain;
}

.product-brand b,
.product-brand small {
  display: block;
}

.product-brand b {
  font-size: 16px;
  line-height: 1.15;
}

.product-brand small {
  margin-top: 3px;
  color: #6c7a89;
  font-size: 11px;
}

.client-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 18px;
  border-left: 1px solid #dce4ec;
  color: #6c7a89;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.avalian-logo-shell {
  min-width: 108px;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 10px;
}

.app-header .avalian-logo {
  width: 88px;
  height: 20px;
  object-fit: contain;
}

.app-header nav {
  gap: 3px;
}

.app-header nav a,
.app-header .user a {
  color: #18375f;
}

.app-header nav a:hover {
  color: #0b5da8;
  background: #edf5fb;
}

.app-header nav a.active {
  color: #fff;
  background: #0f2349;
}

.app-header .user {
  color: #0f2349;
}

.app-header .role-pill {
  color: #fff;
  background: #0f2349;
}

.assignment-bar {
  top: 86px;
}

footer {
  color: #68788a;
}

@media (max-width: 1240px) {
  .product-brand {
    min-width: 208px;
  }

  .client-brand {
    display: none;
  }
}

@media (max-width: 900px) {
  header.app-header {
    height: auto;
    min-height: 82px;
    padding: 8px 14px 12px;
  }

  .product-brand {
    min-width: 0;
  }

  .product-logo {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .app-header nav {
    padding-top: 3px;
  }

  .assignment-bar {
    top: 126px;
  }
}

@media (max-width: 700px) {
  body.login {
    justify-content: center;
    padding: 20px;
    background:
      linear-gradient(rgba(7, 27, 53, .79), rgba(7, 38, 69, .68)),
      url("onbroker-office.webp") 58% center / cover no-repeat;
  }

  .loginbox {
    padding: 28px 24px;
    border-radius: 18px;
  }

  .login-onbroker-logo {
    width: 82px;
    height: 82px;
    flex-basis: 82px;
  }

  .login-client {
    margin-left: 100px;
  }
}

@media (max-width: 520px) {
  .login-brand {
    gap: 12px;
  }

  .login-brand b {
    font-size: 18px;
  }

  .login-client {
    align-items: flex-start;
    flex-direction: column;
    margin-left: 94px;
  }

  .product-brand span {
    display: none;
  }

  .product-logo {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }
}

@media print {
  header.app-header {
    min-height: 58px;
    height: 58px;
    padding: 4px 18px;
    box-shadow: none;
  }

  header.app-header::after,
  .client-brand,
  .product-brand span {
    display: none;
  }

  .product-logo {
    width: 50px;
    height: 50px;
  }
}
