.ellipsis-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 170px;
  z-index: 1050;
  overflow: hidden;
}
.ellipsis-dropdown-menu.show {
  display: block;
}
.ellipsis-dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
  color: #3e4b5b;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.ellipsis-dropdown-item:hover {
  background: #f4f7fa;
  color: #0E7C7B;
}

/* Overlay */
.branch-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1055;
}
.branch-drawer-overlay.show {
  display: block;
}

/* Drawer */
.branch-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 320px;
  height: 100%;
  background: #fff;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.12);
  transition: right 0.28s cubic-bezier(.4,0,.2,1);
}
.branch-drawer.show {
  right: 0;
}

/* Drawer header */
.branch-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8ecf0;
}
.branch-drawer-title {
  margin: 0;
  font-weight: 600;
  color: #3e4b5b;
}
.branch-drawer-close {
  background: none;
  border: none;
  font-size: 14px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}
.branch-drawer-close:hover {
  background: #f4f7fa;
  color: #dc3545;
}

/* ── Search Bar Fix ── */
.branch-drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid #e8ecf0;
}
.branch-drawer-search .input-group {
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f7fa;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}
.branch-drawer-search .input-group-prepend {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  margin: 0;
}
.branch-drawer-search .input-group-text {
  background: transparent;
  border: none;
  padding: 10px 10px 10px 12px;
  color: #aaa;
  font-size: 14px;
  line-height: 1;
}
.branch-drawer-search .form-control {
  background: transparent;
  border: none;
  box-shadow: none !important;
  outline: none !important;
  padding: 10px 12px 10px 0;
  font-size: 13px;
  color: #3e4b5b;
  flex: 1;
  min-width: 0;
}
.branch-drawer-search .form-control::placeholder {
  color: #bbb;
  font-size: 13px;
}
.branch-drawer-search .input-group:focus-within {
  border-color: #0E7C7B;
  background: #fff;
}
.branch-drawer-search .input-group:focus-within .input-group-text,
.branch-drawer-search .input-group:focus-within .form-control {
  background: transparent;
}

/* Branch list */
.branch-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.branch-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.12s;
}
.branch-list-item:hover {
  background: #f4f7fa;
}
.branch-list-item.selected {
  background: #E7F4F3;
}
.branch-list-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0E7C7B;
  cursor: pointer;
  flex-shrink: 0;
}
.branch-item-info {
  flex: 1;
}
.branch-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #3e4b5b;
  margin: 0;
}
.branch-item-code {
  font-size: 11px;
  color: #98a6ad;
  margin: 0;
}
.branch-item-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Footer */
.branch-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #e8ecf0;
}
/* FitOS branding: logo sizing */
.navbar .navbar-brand-wrapper .navbar-brand.brand-logo img {
  height: 34px;
  width: auto;
}
.navbar .navbar-brand-wrapper .brand-logo-mini img {
  height: 34px;
  width: auto;
}
.auth .brand-logo img {
  width: 170px;
}

/* Logged-in user (navbar, top right) */
.nav-user-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0E7C7B;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.nav-user-meta {
  flex-direction: column;
  line-height: 1.25;
  text-align: left;
}
.nav-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #3e4b5b;
}
.nav-user-contact {
  font-size: 12px;
  color: #6c7383;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-user-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 250px;
  z-index: 1050;
  overflow: hidden;
}
.nav-user-menu.show {
  display: block;
}
.nav-user-divider {
  border-top: 1px solid #e8ecf0;
  margin-top: 6px;
}
.nav-user-menu-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e8ecf0;
  margin-bottom: 6px;
}
.nav-user-role {
  font-size: 12px;
  color: #98a6ad;
}
.nav-user-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  font-size: 13px;
  color: #3e4b5b;
  word-break: break-all;
}
.nav-user-detail i {
  color: #0E7C7B;
}
