.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: #4b49ac;
}

/* 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: #4b49ac;
  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: #eeeef7;
}
.branch-list-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4b49ac;
  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;
}