html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: #faf9f5;
  color: #1b3a5b;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

img,
svg {
  max-width: 100%;
}

.container,
.container-fluid {
  min-width: 0;
}

.site-main {
  min-height: 52vh;
}

.site-brand,
.site-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-brand {
  text-decoration: none;
}

.site-brand-logo {
  width: 240px;
  height: 62px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.profile-avatar-fallback {
  display: contents;
}

.profile-avatar-fallback[hidden] {
  display: none !important;
}

.profile-avatar-initials {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.profile-avatar-blur {
  filter: blur(9px);
  transform: scale(1.05);
}

.ep-avatar svg,
.su-avatar svg,
.myp-avatar svg,
.mp-avatar svg,
.bp-avatar svg,
.sh-avatar svg,
.db-match-avatar svg,
.ib-avatar svg,
.ib-msg-avatar svg,
.bu-avatar svg,
.admin-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.az-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.az-select {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  z-index: 5;
}

.az-select.is-open {
  z-index: 999;
}

.az-select::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #98a3af;
  border-bottom: 2px solid #98a3af;
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
}

.az-select.is-open::after {
  border-color: #14897e;
  transform: translateY(-35%) rotate(225deg);
}

.az-select + .ep-caret,
.az-select + .su-caret,
.az-select + .rg-caret,
.az-select + .bp-filter-caret {
  display: none !important;
}

.bp-filter:has(.az-select) > .bp-filter-caret {
  display: none !important;
}

.az-select-button {
  width: 100%;
  min-height: 42px;
  display: block;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1b3a5b;
  font: inherit;
  text-align: left;
  padding: 0 24px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.az-select-button.is-placeholder {
  color: #98a3af;
}

.az-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #cfded9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(27, 58, 91, 0.18);
  scrollbar-width: thin;
  scrollbar-color: #b8d8d1 #f3f7f5;
}

.az-select-menu::-webkit-scrollbar {
  width: 8px;
}

.az-select-menu::-webkit-scrollbar-track {
  background: #f3f7f5;
  border-radius: 999px;
}

.az-select-menu::-webkit-scrollbar-thumb {
  background: #b8d8d1;
  border-radius: 999px;
}

.az-select.is-open .az-select-menu {
  display: grid;
  gap: 4px;
}

.az-select-search {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 6px;
  background: #ffffff;
}

.az-select-search-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d7e1de;
  border-radius: 8px;
  outline: 0;
  background: #f8fbfa;
  color: #1b3a5b;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 9px 12px;
}

.az-select-search-input::placeholder {
  color: #98a3af;
}

.az-select-search-input:focus {
  border-color: #14897e;
  box-shadow: 0 0 0 3px rgba(20, 137, 126, 0.12);
}

.az-select-option {
  position: relative;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1b3a5b;
  font-size: 0.94rem;
  font-weight: 600;
  text-align: left;
  padding: 9px 34px 9px 10px;
  cursor: pointer;
}

.az-select-option:hover,
.az-select-option:focus {
  outline: 0;
  background: #eef8f5;
  color: #0f7268;
}

.az-select-option.is-selected {
  background: #14897e;
  color: #ffffff;
}

.az-select-option.is-selected::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 14px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: translateY(-58%) rotate(45deg);
}

.az-select-empty {
  color: #98a3af;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 10px;
  text-align: center;
}

.admin-form-select + .az-select {
  width: 100%;
}

.admin-filter-panel .az-select {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid #cfd9df;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
}

.admin-filter-panel .az-select:focus-within {
  border-color: #14897e;
  box-shadow: 0 0 0 0.2rem rgba(20,137,126,0.15);
}

@media (max-width: 575px) {
  .site-brand-logo {
    width: min(56vw, 180px);
    height: 48px;
  }

  .navbar .container-fluid {
    gap: 8px;
  }

  .az-select-menu {
    max-height: min(280px, 58vh);
  }

  .bp-page,
  .sh-page,
  .ep-page,
  .su-page,
  .ib-page,
  .myp-page,
  .mp-page,
  .as-page,
  .pv-page,
  .nt-page,
  .bu-page,
  .da-page,
  .ct-page,
  .hiw-page,
  .sp-page,
  .ab-page,
  .pr-page,
  .bl-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
    border-radius: 0 !important;
  }

  .ep-card,
  .su-card,
  .bp-card,
  .sh-card,
  .ib-panel,
  .db-card,
  .as-card,
  .nt-card,
  .myp-card,
  .mp-card,
  .pv-card,
  .bu-card,
  .ct-card,
  .hiw-card,
  .sp-card,
  .ab-card,
  .rg-card {
    border-radius: 8px !important;
  }

  .ep-actions,
  .su-actions,
  .as-actions,
  .db-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ep-btn,
  .su-btn,
  .as-btn,
  .db-btn {
    width: 100%;
  }
}
