/**
 * SaaS — Área cliente (login + portal autenticado) + admin auth.
 *
 * Fastluza: logótipo company com .img-responsive (~645×130) invade o menu
 * e o avatar «thumb» aparece enorme. Forçar tamanhos de navbar em todo
 * body.customers (não só customers_login).
 */

/* —— Header área cliente (todas as páginas do Balcão) —— */
body.customers .navbar a.navbar-brand {
  max-width: min(240px, 42vw);
  padding-top: 18px !important;
  padding-bottom: 18px !important;
  height: auto !important;
  overflow: hidden;
}

body.customers .navbar a.navbar-brand img {
  /* vence .img-responsive { height: auto } no logótipo largo */
  height: 34px !important;
  max-height: 34px !important;
  width: auto !important;
  max-width: 220px !important;
}

body.customers .navbar .client-profile-image-small,
body.customers .navbar img.client-profile-image-small {
  height: 32px !important;
  width: 32px !important;
  max-height: 32px !important;
  max-width: 32px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

body.customers .navbar-default .navbar-nav > li.customers-nav-item-profile > a {
  padding-top: 26px;
  padding-bottom: 26px;
  line-height: 32px !important;
}

/* —— Login / register / forgot (extra) —— */
body.customers.customers_login .eev-clients-login {
  clear: both;
}

body.customers.customers_login .eev-clients-login .login-heading,
body.customers.customers_login .login-heading {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.25;
  clear: both;
}

body.customers.customers_login .eev-clients-login .panel_s,
body.customers.customers_login .panel_s {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

body.customers.customers_login .mtop40 {
  margin-top: 24px !important;
}

@media (max-width: 767px) {
  body.customers .navbar a.navbar-brand {
    max-width: calc(100% - 56px);
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  body.customers .navbar a.navbar-brand img {
    height: 30px !important;
    max-height: 30px !important;
    max-width: min(170px, 55vw) !important;
    width: auto !important;
  }

  body.customers.customers_login #content > .container,
  body.customers.register #content > .container,
  body.customers.forgot-password #content > .container,
  body.customers.reset-password #content > .container {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  body.customers.customers_login .mtop40,
  body.customers.register .mtop40,
  body.customers.forgot-password .mtop40 {
    margin-top: 12px !important;
    padding-left: 0;
    padding-right: 0;
  }

  body.customers.customers_login .mtop40 > [class*="col-"],
  body.customers.register .mtop40 > [class*="col-"],
  body.customers.forgot-password .mtop40 > [class*="col-"],
  body.customers.customers_login .row > [class*="col-"],
  body.customers.register .row > [class*="col-"],
  body.customers.forgot-password .row > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.customers.customers_login .login-heading,
  body.customers.customers_login h1,
  body.customers.register h1,
  body.customers.forgot-password h1,
  body.customers.reset-password h1 {
    font-size: 22px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.02em;
    text-align: center;
    padding: 0 4px;
    margin-bottom: 1rem !important;
  }

  body.customers.customers_login .panel_s,
  body.customers.register .panel_s,
  body.customers.forgot-password .panel_s,
  body.customers.reset-password .panel_s {
    margin-bottom: 1rem;
  }

  body.customers.customers_login .panel_s .panel-body,
  body.customers.register .panel_s .panel-body,
  body.customers.forgot-password .panel_s .panel-body,
  body.customers.reset-password .panel_s .panel-body {
    padding: 20px 16px !important;
  }

  body.customers.customers_login .form-control,
  body.customers.register .form-control,
  body.customers.forgot-password .form-control,
  body.customers.reset-password .form-control,
  body.customers.customers_login .bootstrap-select > .dropdown-toggle,
  body.customers.register .bootstrap-select > .dropdown-toggle {
    min-height: 44px;
    font-size: 16px !important; /* evita zoom iOS */
  }

  body.customers.customers_login .eev-password-toggle,
  body.login_admin .eev-password-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  body.customers.customers_login .bootstrap-select,
  body.customers.register .bootstrap-select {
    width: 100% !important;
  }

  body.customers.customers_login .btn-primary,
  body.customers.customers_login .btn-default,
  body.customers.register .btn-primary,
  body.customers.register .btn-default,
  body.customers.forgot-password .btn-primary,
  body.customers.reset-password .btn-primary {
    min-height: 46px;
    font-size: 16px !important;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body.customers.customers_login .input-group-addon,
  body.customers.register .input-group-addon {
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  body.customers.customers_login .find-tenant-form .input-group,
  body.customers.customers_login .email-verification-form .input-group {
    display: flex;
    flex-wrap: wrap;
  }

  body.customers.customers_login .find-tenant-form .input-group .form-control,
  body.customers.customers_login .email-verification-form .input-group .form-control {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.customers.customers_login .login-heading,
  body.customers.customers_login h1,
  body.customers.register h1 {
    font-size: 20px !important;
  }

  body.customers.customers_login #content > .container,
  body.customers.register #content > .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* —— Admin / staff login —— */
@media (max-width: 767px) {
  body.login_admin,
  body.authentication,
  body.forgot-password,
  body.reset-password,
  body.set-password,
  body.two-factor-authentication-code {
    overflow-x: hidden;
  }

  body.login_admin .authentication-form-wrapper,
  body.authentication .authentication-form-wrapper {
    width: 100%;
    max-width: 100%;
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-top: 1.25rem !important;
    margin-left: auto;
    margin-right: auto;
  }

  body.login_admin .company-logo::before,
  body.authentication .company-logo::before,
  body.forgot-password .company-logo::before,
  body.reset-password .company-logo::before,
  body.set-password .company-logo::before {
    width: 168px !important;
    max-height: 52px !important;
  }

  body.login_admin .company-logo::after,
  body.authentication .company-logo::after {
    font-size: 13px !important;
    max-width: 280px;
    padding: 0 8px;
  }

  body.login_admin .authentication-form-wrapper > .text-center h1,
  body.authentication .authentication-form-wrapper > .text-center h1,
  body.login_admin h1.tw-text-neutral-800,
  body.authentication h1.tw-text-neutral-800 {
    font-size: 1.2rem !important;
    padding: 0 4px;
  }

  body.login_admin .tw-bg-white,
  body.authentication .tw-bg-white,
  body.login_admin .authentication-form-wrapper > div[class*="tw-bg-white"],
  body.authentication .authentication-form-wrapper > div[class*="tw-bg-white"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  body.login_admin .form-control,
  body.authentication .form-control {
    min-height: 44px;
    font-size: 16px !important;
  }

  body.login_admin .btn-primary,
  body.authentication .btn-primary {
    min-height: 46px;
    font-size: 16px !important;
  }

  body.login_admin .tw-inline-flex.tw-justify-between {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
}
