/* Final visual override for Portal do Suporte Obras.PE.
   Keep this file loaded last. It only fixes login, header and account actions. */

body.locked .topbar,
body.locked .tabs,
body.locked main,
body.locked .profile,
body.locked .profile-menu,
body.locked .profile-tools,
body.locked .nav-account-actions {
  display: none !important;
}

body.locked .login-screen {
  min-height: 100vh !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 430px) !important;
  place-items: center !important;
  padding: 28px !important;
  background: linear-gradient(135deg, #004a7f 0%, #00629d 100%) !important;
}

.login-screen::before,
.login-screen::after,
.login-card::before,
.login-card::after,
.login-card h1::before,
.login-card h1::after,
.topbar .brand strong::before,
.topbar .brand strong::after {
  content: none !important;
  display: none !important;
}

.login-card {
  width: min(430px, 100%) !important;
  padding: 30px 36px 36px !important;
  border-radius: 18px !important;
  background: #fff !important;
  border: 1px solid rgba(216, 226, 238, .95) !important;
  box-shadow: 0 26px 80px rgba(0, 30, 70, .34) !important;
}

.login-mark {
  width: 220px !important;
  height: 138px !important;
  display: block !important;
  margin: 0 auto 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: url("/download.png?v=20260622-menu-clean2") center / contain no-repeat !important;
  color: transparent !important;
  box-shadow: none !important;
}

.login-card h1 {
  display: block !important;
  color: #003f72 !important;
  font-size: 27px !important;
  line-height: 1.08 !important;
  margin: 0 0 10px !important;
}

.login-card p {
  color: #43566f !important;
  margin: 0 0 22px !important;
}

.topbar {
  min-height: 86px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px 28px !important;
  background: #005a96 !important;
  color: #fff !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 50 !important;
}

.topbar::before,
.topbar::after {
  content: none !important;
  display: none !important;
}

.topbar .brand {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 14px !important;
}

.topbar .brand::before {
  content: none !important;
  display: none !important;
}

.topbar .brand > div {
  display: grid !important;
  justify-items: center !important;
  width: 100% !important;
  gap: 0 !important;
  line-height: 1 !important;
}

.topbar .brand-mark,
.topbar .brand img:not(.header-logo),
.global-search,
.topbar .profile,
.topbar .profile-menu,
.profile-tools {
  display: none !important;
}

.topbar .brand .header-logo {
  display: block !important;
  width: 58px !important;
  height: 50px !important;
  flex: 0 0 58px !important;
  object-fit: contain !important;
  object-position: center !important;
}

.topbar .brand strong {
  display: block !important;
  color: #fff !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  font-weight: 900 !important;
  line-height: .95 !important;
  margin: 0 !important;
}

.topbar .brand small,
.topbar .brand span#apiStatus {
  display: block !important;
  margin-top: 1px !important;
  color: rgba(255, 255, 255, .88) !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.tabs {
  min-height: 56px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 18px 8px 24px !important;
  background: #fff !important;
  border-bottom: 1px solid #d8e2ee !important;
  box-shadow: 0 8px 18px rgba(0, 35, 75, .06) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  overflow-x: auto !important;
}

.tabs button {
  flex: 0 0 auto !important;
  min-height: 36px !important;
  border-radius: 999px !important;
  border: 1px solid #c9d8e8 !important;
  background: #fff !important;
  color: #0a3766 !important;
  font-weight: 800 !important;
}

.tabs button.active,
.tabs button[aria-selected="true"] {
  background: #005a96 !important;
  border-color: #005a96 !important;
  color: #fff !important;
}

.nav-account-actions {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  position: sticky !important;
  right: 0 !important;
  background: #fff !important;
  padding-left: 16px !important;
  z-index: 90 !important;
}

.nav-account-actions #profileBtn,
.nav-account-actions #logoutBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  min-width: 96px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  background: #005a96 !important;
  border: 1px solid #005a96 !important;
  color: #fff !important;
  font-weight: 900 !important;
  opacity: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 8px 18px rgba(0, 90, 150, .16) !important;
}

.nav-account-actions #profileBtn:hover,
.nav-account-actions #logoutBtn:hover {
  background: #003f72 !important;
  border-color: #003f72 !important;
}

.profile-modal.hidden {
  display: none !important;
}

.profile-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
}

.profile-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(3, 24, 49, .58) !important;
  backdrop-filter: blur(3px) !important;
}

.profile-modal-card {
  position: relative !important;
  width: min(460px, 100%) !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px 16px !important;
  padding: 28px !important;
  border-radius: 18px !important;
  background: #fff !important;
  border: 1px solid #d8e2ee !important;
  box-shadow: 0 30px 90px rgba(0, 22, 48, .34) !important;
}

.profile-modal-card::before {
  content: "" !important;
  width: 82px !important;
  height: 82px !important;
  grid-column: 1 / -1 !important;
  justify-self: center !important;
  margin-top: -4px !important;
  border-radius: 999px !important;
  background: #e9f2fb url("/logo-obras-icon.svg?v=20260623-profile-icon1") center / 70% auto no-repeat !important;
  border: 4px solid #fff !important;
  box-shadow: 0 14px 34px rgba(0, 63, 114, .18) !important;
}

.profile-modal-title {
  grid-column: 1 / -1 !important;
  display: block !important;
  text-align: center !important;
  padding-right: 0 !important;
}

.profile-modal-title p {
  margin: 0 0 4px !important;
  color: #6b7c93 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

.profile-modal-title h2 {
  margin: 0 !important;
  color: #003f72 !important;
  font-size: 28px !important;
  line-height: 1.1 !important;
}

.profile-modal-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  border: 1px solid #c9d8e8 !important;
  background: #fff !important;
  color: #003f72 !important;
  font-size: 22px !important;
  line-height: 1 !important;
}

.profile-modal-card label {
  display: grid !important;
  gap: 7px !important;
  color: #43566f !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.profile-modal-card label:nth-of-type(1),
.profile-modal-card label:nth-of-type(2),
.profile-modal-card label:nth-of-type(3),
.profile-modal-card label:nth-of-type(4) {
  grid-column: 1 / -1 !important;
}

.profile-modal-card label:nth-of-type(3)::after {
  content: "Cole o link de uma imagem, se quiser trocar a foto." !important;
  color: #6b7c93 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.profile-modal-card input {
  height: 44px !important;
  border-radius: 10px !important;
  border: 1px solid #c9d8e8 !important;
  background: #f8fbff !important;
  padding: 0 13px !important;
  color: #0c1f33 !important;
  font: inherit !important;
  outline: none !important;
}

.profile-modal-card input:focus {
  border-color: #005a96 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(0, 90, 150, .12) !important;
}

.profile-modal-actions {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 6px !important;
}

.profile-modal-actions button {
  min-height: 42px !important;
  border-radius: 10px !important;
  padding: 0 18px !important;
  font-weight: 900 !important;
}

.profile-modal-actions .ghost {
  background: #fff !important;
  border: 1px solid #c9d8e8 !important;
  color: #003f72 !important;
}

.profile-modal-actions button[type="submit"] {
  background: #005a96 !important;
  border: 1px solid #005a96 !important;
  color: #fff !important;
}

#profileModalStatus {
  grid-column: 1 / -1 !important;
  min-height: 18px !important;
  color: #167447 !important;
  text-align: right !important;
}

@media (max-width: 760px) {
  .topbar {
    min-height: 78px !important;
    padding: 12px 16px !important;
  }

  .topbar .brand {
    gap: 9px !important;
  }

  .topbar .brand .header-logo {
    width: 42px !important;
    height: 38px !important;
    flex-basis: 42px !important;
  }

  .topbar .brand strong {
    font-size: 24px !important;
  }

  .tabs {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    padding: 8px 12px !important;
  }

  .nav-account-actions {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    padding-left: 0 !important;
  }

  .profile-modal-card {
    padding: 24px 18px !important;
  }
}
